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

Paul Jackson
2005-12-12T10:02:27Z

> Please do use __read_mostly for new kmem_cache :
>
> static kmem_cache_t *cpuset_cache __read_mostly;

Is there any downside to this? I ask because accesses through
this 'cpuset_cache' pointer are rather infrequent - only when
the sysadmin or the batch scheduler is creating or removing
cpusets, which for the purposes of 'back of the envelope'
estimates, might be once a minute or less. Further, it is
not at all a performance critical path.

So I really don't give a dang if it takes a few milliseconds
to pick up this pointer, at least so far as cpusets matters.

That said, would you still advise marking this __read_mostly?

Andrew wrote:
> We've been shuffling towards removing kmem_cache_t in favour of `struct
> kmem_cache',

So I suppose what I should really have is:

static struct kmem_cache *cpuset_cache __read_mostly;

??

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401