Re: [PATCH] Cpuset: rcu optimization of page alloc hook

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

 



Nick Piggin <[email protected]> wrote:
>
> Eric Dumazet wrote:
> > Paul Jackson a écrit :
> > 
> >> +
> >> +static kmem_cache_t *cpuset_cache;
> >> +
> > 
> > 
> > Hi Paul
> > 
> > Please do use __read_mostly for new kmem_cache :
> > 
> > static kmem_cache_t *cpuset_cache __read_mostly;
> > 
> > If not, the pointer can sit in the midle of a highly modified cache 
> > line, and multiple CPUS will have memory cache misses to access the 
> > cpuset_cache, while slab code/data layout itself is very NUMA/SMP friendly.
> > 
> 
> Is it a good idea for all kmem_cache_t? If so, can we move
> __read_mostly to the type definition?
> 

Yes, I suppose that's worthwhile.

We've been shuffling towards removing kmem_cache_t in favour of `struct
kmem_cache', but this is an argument against doing that.

If we can work out how:

void foo()
{
	kmem_cache_t *p;
}

That'll barf.


-
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