Re: [RFC] Merge softirq, local_irq_count, local_bh_count

From: Russell King (rmk@arm.linux.org.uk)
Date: Thu Jul 27 2000 - 15:37:14 EST


Keith Owens writes:
> ftp://ftp.ocs.com.au/pub/2.4.0-test5-pre6-softirq-bh-merge.gz is a
> merge of softirq, local_irq_count and local_bh_count into one
> structure. The aim was :-

There appears to be some crud in there, particularly:

+#ifdef CONFIG_SMP
+irq_cpustat_t irq_stat[NR_CPUS];
+#else
+irq_cpustat_t irq_stat;
+#endif

Since:

        irq_cpustat_t irqstat[1];

takes the same space as:

        irq_cpustat_t irqstat;

In addition:

        smp_processor_id()

on a non-SMP machine is:

        #define smp_processor_id() 0

Removing all the #ifdef crud causes:

1. No performance penalty
2. No space penalty
3. Makes the code easier to read

This has to be a win.
   _____
  |_____| ------------------------------------------------- ---+---+-
  | | Russell King rmk@arm.linux.org.uk --- ---
  | | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
  | +-+-+ --- -+-
  / | THE developer of ARM Linux |+| /|\
 / | | | --- |
    +-+-+ ------------------------------------------------- /\\\ |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:24 EST