From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by kanga.kvack.org (Postfix) with ESMTP id 521016B0031 for ; Fri, 7 Mar 2014 15:48:34 -0500 (EST) Received: by mail-pb0-f50.google.com with SMTP id md12so4645372pbc.23 for ; Fri, 07 Mar 2014 12:48:34 -0800 (PST) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org. [140.211.169.12]) by mx.google.com with ESMTP id ha5si9441327pbc.300.2014.03.07.12.48.32 for ; Fri, 07 Mar 2014 12:48:33 -0800 (PST) Date: Fri, 7 Mar 2014 12:48:31 -0800 From: Andrew Morton Subject: Re: [patch 03/11] mm, mempolicy: remove per-process flag Message-Id: <20140307124831.69b50f829ed34de8651fa461@linux-foundation.org> In-Reply-To: <877g866i3c.fsf@tassilo.jf.intel.com> References: <877g866i3c.fsf@tassilo.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Andi Kleen Cc: David Rientjes , Johannes Weiner , Michal Hocko , KAMEZAWA Hiroyuki , Christoph Lameter , Pekka Enberg , Tejun Heo , Mel Gorman , Oleg Nesterov , Rik van Riel , Jianguo Wu , Tim Hockin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-doc@vger.kernel.org On Fri, 07 Mar 2014 09:20:39 -0800 Andi Kleen wrote: > David Rientjes 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org