[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-kernel
Subject: Re: [RFC] Merge softirq, local_irq_count, local_bh_count
From: Russell King <rmk () arm ! linux ! org ! uk>
Date: 2000-07-27 22:22:38
[Download RAW message or body]
Keith Owens writes:
> Except for the places where cpu is a variable instead of smp_processor_id(),
> those places might generate array access code.
They shouldn't do - GCC should realise that code like:
int this_cpu = 0;
array_access[this_cpu].foo = 0;
array_access[this_cpu].bar = 1;
can be optimised. So long as "this_cpu" remains an auto variable, then
it should be ok.
> I thought about using a
> single set of macros and always defining irq_stat[NR_CPUS], trusting to
> gcc to optimize the array access away for UP but decided to err on the
> side of caution.
We relied on it before, so why can't we rely on it again?
> As for readability, almost all the existing code
> defines SMP and UP versions, at least this patch reduces to one
> definition instead of one per arch with subtly different definitions.
There's no argument there. Its only that it can be improved further
with very little effort.
_____
|_____| ------------------------------------------------- ---+---+-
| | 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/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic