Messages in this thread | | | From | Russell King <> | Subject | Re: [RFC] Merge softirq, local_irq_count, local_bh_count | Date | Thu, 27 Jul 2000 23:22:38 +0100 (BST) |
| |
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/
| |