Re: 2.6.16-rc6-mm2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Andi Kleen <[email protected]> wrote:

> > below is an updated patch that includes fixups for i386 - but the real 
> > fix should be to properly reduce the per-arch local.h footprint to the 
> > bare minimum possible, and to do this fix on the asm-generic headers.
> 
> I think an even better approach would be to use local_save_flags() / 
> local_restore_flags () and then use a normal increment and get rid of 
> smp_processor_id completely.

local_irq_save()/local_irq_restore() you must have meant :-)

> I've never seen any evidence that the complex and bloated code 
> generated by this is any better that just enabling/disabling 
> interrupts.
> 
> In the x86 world P4 has costly cli/sti, but I wouldn't expect that 
> problem to be very widespread.

i think you are right - but if someone goes the trouble of implementing 
per-arch support for local increments then i'm not against it. (except 
if the generated code is grossly inefficient) There are architectures 
where cli/sti hurts alot.

In any case, on x86 we should switch to a cli/sti implementation indeed 
- it will quite likely have alot smaller footprint than __per_cpu_offset 
based approaches.

Although on x86_64 we'd probably be pretty OK if all per-cpu variables 
were in the PDA and were thus at a constant %gs-relative offset. But for 
now we only have data_offset in the PDA so there's one more unnecessary 
indirection.

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux