[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140307124831.69b50f829ed34de8651fa461@linux-foundation.org>
Date: Fri, 7 Mar 2014 12:48:31 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Andi Kleen <andi@...stfloor.org>
Cc: David Rientjes <rientjes@...gle.com>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...e.cz>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Christoph Lameter <cl@...ux-foundation.org>,
Pekka Enberg <penberg@...nel.org>, Tejun Heo <tj@...nel.org>,
Mel Gorman <mgorman@...e.de>, Oleg Nesterov <oleg@...hat.com>,
Rik van Riel <riel@...hat.com>,
Jianguo Wu <wujianguo@...wei.com>,
Tim Hockin <thockin@...gle.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, cgroups@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [patch 03/11] mm, mempolicy: remove per-process flag
On Fri, 07 Mar 2014 09:20:39 -0800 Andi Kleen <andi@...stfloor.org> wrote:
> David Rientjes <rientjes@...gle.com> writes:
> >
> > Per-process flags are a scarce resource so we should free them up
> > whenever possible and make them available. We'll be using it shortly for
> > memcg oom reserves.
>
> I'm not convinced TCP_RR is a meaningfull benchmark for slab.
>
> The shortness seems like an artificial problem.
>
> Just add another flag word to the task_struct? That would seem
> to be the obvious way. People will need it sooner or later anyways.
>
This is basically what the patch does:
@@ -3259,7 +3259,7 @@ __do_cache_alloc(struct kmem_cache *cach
{
void *objp;
- if (unlikely(current->flags & (PF_SPREAD_SLAB | PF_MEMPOLICY))) {
+ if (current->mempolicy || unlikely(current->flags & PF_SPREAD_SLAB)) {
objp = alternate_node_alloc(cache, flags);
if (objp)
goto out;
It runs when slab goes into the page allocator for backing store (ie:
relatively rarely). It adds one test-n-branch when a mempolicy is
active and actually removes instructions when no mempolicy is active.
This patch won't be making any difference to anything.
--
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