Re: [PATCH 1/11] ksm: allow trees per NUMA node
From: Hugh Dickins
Date: Mon Jan 28 2013 - 20:38:25 EST
On Mon, 28 Jan 2013, Andrew Morton wrote:
> On Fri, 25 Jan 2013 17:54:53 -0800 (PST)
> Hugh Dickins <hughd@xxxxxxxxxx> wrote:
>
> > +/* Zeroed when merging across nodes is not allowed */
> > +static unsigned int ksm_merge_across_nodes = 1;
>
> I spose this should be __read_mostly. If __read_mostly is not really a
> synonym for __make_write_often_storage_slower. I continue to harbor
> fear, uncertainty and doubt about this...
Could do. No strong feeling, but I think I'd rather it share its
cacheline with other KSM-related stuff, than be off mixed up with
unrelateds. I think there's a much stronger case for __read_mostly
when it's a library thing accessed by different subsystems.
You're right that this variable is accessed significantly more often
that the other KSM tunables, so deserves a __read_mostly more than
they do. But where to stop? Similar reluctance led me to avoid
using "unlikely" throughout ksm.c, unlikely as some conditions are
(I'm aghast to see that Andrea sneaked in a "likely" :).
Hugh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/