From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e39.co.us.ibm.com (e39.co.us.ibm.com [32.97.110.160]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1679B2C0091 for ; Wed, 5 Feb 2014 11:14:15 +1100 (EST) Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 4 Feb 2014 17:14:10 -0700 Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 3B1D26E803C for ; Tue, 4 Feb 2014 19:14:03 -0500 (EST) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by b01cxnp22034.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s150E7dg6291782 for ; Wed, 5 Feb 2014 00:14:07 GMT Received: from d01av02.pok.ibm.com (localhost [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s150E5aA030508 for ; Tue, 4 Feb 2014 19:14:07 -0500 Date: Tue, 4 Feb 2014 16:13:52 -0800 From: Nishanth Aravamudan To: Christoph Lameter Subject: Re: [PATCH] slub: Don't throw away partial remote slabs if there is no local memory Message-ID: <20140205001352.GC10101@linux.vnet.ibm.com> References: <20140125001643.GA25344@linux.vnet.ibm.com> <20140125011041.GB25344@linux.vnet.ibm.com> <20140127055805.GA2471@lge.com> <20140128182947.GA1591@linux.vnet.ibm.com> <20140203230026.GA15383@linux.vnet.ibm.com> <20140204072630.GB10101@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Cc: Han Pingtian , David Rientjes , penberg@kernel.org, linux-mm@kvack.org, paulus@samba.org, Anton Blanchard , mpm@selenic.com, Joonsoo Kim , linuxppc-dev@lists.ozlabs.org, Wanpeng Li List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 04.02.2014 [14:39:32 -0600], Christoph Lameter wrote: > On Mon, 3 Feb 2014, Nishanth Aravamudan wrote: > > > Yes, sorry for my lack of clarity. I meant Joonsoo's latest patch for > > the $SUBJECT issue. > > Hmmm... I am not sure that this is a general solution. The fallback to > other nodes can not only occur because a node has no memory as his patch > assumes. Thanks, Christoph. I see your point. Something in this area would be nice, though, as it does produce a fairly significant bump in the slab usage on our test system. > If the target node allocation fails (for whatever reason) then I would > recommend for simplicities sake to change the target node to > NUMA_NO_NODE and just take whatever is in the current cpu slab. A more > complex solution would be to look through partial lists in increasing > distance to find a partially used slab that is reasonable close to the > current node. Slab has logic like that in fallback_alloc(). Slubs > get_any_partial() function does something close to what you want. I apologize for my own ignorance, but I'm having trouble following. Anton's original patch did fallback to the current cpu slab, but I'm not sure any NUMA_NO_NODE change is necessary there. At the point we're deactivating the slab (in the current code, in __slab_alloc()), we have successfully allocated from somewhere, it's just not on the node we expected to be on. So perhaps you are saying to make a change lower in the code? I'm not sure where it makes sense to change the target node in that case. I'd appreciate any guidance you can give. Thanks, Nish From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qc0-f180.google.com (mail-qc0-f180.google.com [209.85.216.180]) by kanga.kvack.org (Postfix) with ESMTP id 8B7DF6B003A for ; Tue, 4 Feb 2014 19:14:10 -0500 (EST) Received: by mail-qc0-f180.google.com with SMTP id i17so14784749qcy.25 for ; Tue, 04 Feb 2014 16:14:10 -0800 (PST) Received: from e7.ny.us.ibm.com (e7.ny.us.ibm.com. [32.97.182.137]) by mx.google.com with ESMTPS id d69si19193533qge.138.2014.02.04.16.14.09 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 04 Feb 2014 16:14:10 -0800 (PST) Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 4 Feb 2014 19:14:09 -0500 Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 3822138C8059 for ; Tue, 4 Feb 2014 19:14:06 -0500 (EST) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by b01cxnp22036.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s150E6rm3735916 for ; Wed, 5 Feb 2014 00:14:06 GMT Received: from d01av02.pok.ibm.com (localhost [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s150E5a2030508 for ; Tue, 4 Feb 2014 19:14:06 -0500 Date: Tue, 4 Feb 2014 16:13:52 -0800 From: Nishanth Aravamudan Subject: Re: [PATCH] slub: Don't throw away partial remote slabs if there is no local memory Message-ID: <20140205001352.GC10101@linux.vnet.ibm.com> References: <20140125001643.GA25344@linux.vnet.ibm.com> <20140125011041.GB25344@linux.vnet.ibm.com> <20140127055805.GA2471@lge.com> <20140128182947.GA1591@linux.vnet.ibm.com> <20140203230026.GA15383@linux.vnet.ibm.com> <20140204072630.GB10101@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Christoph Lameter Cc: Han Pingtian , mpm@selenic.com, penberg@kernel.org, linux-mm@kvack.org, paulus@samba.org, Anton Blanchard , David Rientjes , Joonsoo Kim , linuxppc-dev@lists.ozlabs.org, Wanpeng Li On 04.02.2014 [14:39:32 -0600], Christoph Lameter wrote: > On Mon, 3 Feb 2014, Nishanth Aravamudan wrote: > > > Yes, sorry for my lack of clarity. I meant Joonsoo's latest patch for > > the $SUBJECT issue. > > Hmmm... I am not sure that this is a general solution. The fallback to > other nodes can not only occur because a node has no memory as his patch > assumes. Thanks, Christoph. I see your point. Something in this area would be nice, though, as it does produce a fairly significant bump in the slab usage on our test system. > If the target node allocation fails (for whatever reason) then I would > recommend for simplicities sake to change the target node to > NUMA_NO_NODE and just take whatever is in the current cpu slab. A more > complex solution would be to look through partial lists in increasing > distance to find a partially used slab that is reasonable close to the > current node. Slab has logic like that in fallback_alloc(). Slubs > get_any_partial() function does something close to what you want. I apologize for my own ignorance, but I'm having trouble following. Anton's original patch did fallback to the current cpu slab, but I'm not sure any NUMA_NO_NODE change is necessary there. At the point we're deactivating the slab (in the current code, in __slab_alloc()), we have successfully allocated from somewhere, it's just not on the node we expected to be on. So perhaps you are saying to make a change lower in the code? I'm not sure where it makes sense to change the target node in that case. I'd appreciate any guidance you can give. Thanks, Nish -- 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