lkml.org 
[lkml]   [2000]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] Merge softirq, local_irq_count, local_bh_count
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.159 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site