[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150327120240.GC23123@twins.programming.kicks-ass.net>
Date: Fri, 27 Mar 2015 13:02:40 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Christoph Lameter <cl@...ux.com>
Cc: Viresh Kumar <viresh.kumar@...aro.org>,
Andrew Morton <akpm@...ux-foundation.org>, hannes@...xchg.org,
Linaro Kernel Mailman List <linaro-kernel@...ts.linaro.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
vinmenon@...eaurora.org, shashim@...eaurora.org,
Michal Hocko <mhocko@...e.cz>, mgorman@...e.de,
dave@...olabs.net, koct9i@...il.com,
Linux Memory Management List <linux-mm@...ck.org>,
Suresh Siddha <suresh.b.siddha@...el.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC] vmstat: Avoid waking up idle-cpu to service shepherd work
On Fri, Mar 27, 2015 at 06:11:44AM -0500, Christoph Lameter wrote:
> On Fri, 27 Mar 2015, Peter Zijlstra wrote:
>
> > > We could align the base on 8 bytes to gain an extra bit in the pointer
> > > and use that bit to indicate the running state. Then these sites can
> > > spin on that bit while we can change the actual base pointer.
> >
> > Even though tvec_base has ____cacheline_aligned stuck on, most are
> > allocated using kzalloc_node() which does not actually respect that but
> > already guarantees a minimum u64 alignment, so I think we can use that
> > third bit without too much magic.
>
> Create a new slab cache for this purpose that does the proper aligning?
That is certainly a possibility, but we'll only ever allocate nr_cpus-1
entries from it, a whole new slab cache might be overkill.
What's not clear to me is why that thing is allocated at all, AFAICT
something like:
static DEFINE_PER_CPU(struct tvec_base, tvec_bases);
Should do the right thing and be much simpler.
--
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