* Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated
[not found] ` <20060128165549.262f2b90.akpm@osdl.org>
@ 2006-01-29 5:38 ` Andi Kleen
0 siblings, 0 replies; only message in thread
From: Andi Kleen @ 2006-01-29 5:38 UTC (permalink / raw)
To: Andrew Morton
Cc: Benjamin LaHaise, dada1, kiran, davem, linux-kernel, shai, netdev,
pravins, linux-arch
[adding linux-arch]
On Sunday 29 January 2006 01:55, Andrew Morton wrote:
> Benjamin LaHaise <bcrl@kvack.org> wrote:
> > On Sat, Jan 28, 2006 at 01:28:20AM +0100, Eric Dumazet wrote:
> > > We might use atomic_long_t only (and no spinlocks)
> > > Something like this ?
> >
> > Erk, complex and slow... Try using local_t instead, which is
> > substantially cheaper on the P4 as it doesn't use the lock prefix and act
> > as a memory barrier. See asm/local.h.
>
> local_t isn't much use until we get rid of asm-generic/local.h. Bloaty,
> racy with nested interrupts.
It is just implemented wrong. It should use
local_irq_save()/local_irq_restore() instead. But my bigger problem
with local_t is these few architectures (IA64, PPC64) who implement it
with atomic_t. This means we can't replace local statistics counters
with local_t because it would be regression for them. I haven't done the
benchmarks yet, but I suspect both IA64 and PPC64 really should
just turn off interrupts.
-Andi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-29 5:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20060126185649.GB3651@localhost.localdomain>
[not found] ` <20060129004459.GA24099@kvack.org>
[not found] ` <20060128165549.262f2b90.akpm@osdl.org>
2006-01-29 5:38 ` [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).