[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140507094316.GG23991@suse.de>
Date: Wed, 7 May 2014 10:43:16 +0100
From: Mel Gorman <mgorman@...e.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Linux-MM <linux-mm@...ck.org>,
Linux-FSDevel <linux-fsdevel@...r.kernel.org>,
Johannes Weiner <hannes@...xchg.org>,
Vlastimil Babka <vbabka@...e.cz>, Jan Kara <jack@...e.cz>,
Michal Hocko <mhocko@...e.cz>, Hugh Dickins <hughd@...gle.com>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 03/17] mm: page_alloc: Use jump labels to avoid checking
number_of_cpusets
On Wed, May 07, 2014 at 11:04:21AM +0200, Peter Zijlstra wrote:
> On Tue, May 06, 2014 at 11:21:18PM +0100, Mel Gorman wrote:
> > On Tue, May 06, 2014 at 10:23:50PM +0200, Peter Zijlstra wrote:
>
> > > Why the HAVE_JUMP_LABEL and number_of_cpusets thing? When
> > > !HAVE_JUMP_LABEL the static_key thing reverts to an atomic_t and
> > > static_key_false() becomes:
> > >
> >
> > Because number_of_cpusets is used to size a kmalloc(). Potentially I could
> > abuse the internals of static keys and use the value of key->enabled but
> > that felt like abuse of the API.
>
> But are those ifdefs worth the saving of 4 bytes of .data?
>
> That said, I see no real problem adding static_key_count().
I thought it would be considered API abuse as I always viewed the labels
as being a enabled/disabled thing with the existence of the ref count
being an internal implementation detail. I'll take this approach.
Thanks.
--
Mel Gorman
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists