From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wanpeng Li Subject: Re: [PATCH] slub: Don't throw away partial remote slabs if there is no local memory Date: Tue, 21 Jan 2014 10:20:42 +0800 Message-ID: <32317.3556280837$1390270896@news.gmane.org> References: <20140107132100.5b5ad198@kryten> <20140107074136.GA4011@lge.com> <52dce7fe.e5e6420a.5ff6.ffff84a0SMTPIN_ADDED_BROKEN@mx.google.com> Reply-To: Wanpeng Li Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" To: Christoph Lameter Cc: nacc@linux.vnet.ibm.com, penberg@kernel.org, linux-mm@kvack.org, Han Pingtian , paulus@samba.org, Anton Blanchard , mpm@selenic.com, Joonsoo Kim , linuxppc-dev@lists.ozlabs.org List-Id: linux-mm.kvack.org On Mon, Jan 20, 2014 at 04:13:30PM -0600, Christoph Lameter wrote: >On Mon, 20 Jan 2014, Wanpeng Li wrote: > >> >+ enum zone_type high_zoneidx = gfp_zone(flags); >> > >> >+ if (!node_present_pages(searchnode)) { >> >+ zonelist = node_zonelist(searchnode, flags); >> >+ for_each_zone_zonelist(zone, z, zonelist, high_zoneidx) { >> >+ searchnode = zone_to_nid(zone); >> >+ if (node_present_pages(searchnode)) >> >+ break; >> >+ } >> >+ } >> > object = get_partial_node(s, get_node(s, searchnode), c, flags); >> > if (object || node != NUMA_NO_NODE) >> > return object; >> > >> >> The patch fix the bug. However, the kernel crashed very quickly after running >> stress tests for a short while: > >This is not a good way of fixing it. How about not asking for memory from >nodes that are memoryless? Use numa_mem_id() which gives you the next node >that has memory instead of numa_node_id() (gives you the current node >regardless if it has memory or not). Thanks for your pointing out, I will do it and retest it later. Regards, Wanpeng Li