Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2176782imm; Thu, 2 Aug 2018 07:25:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfAcy0X06UVbuob99NrCfrdfZxjxm/8x9bAQ/Niovtyfw1u+NKAH1pQLKHl0rYfH9xew3sy X-Received: by 2002:a17:902:24c7:: with SMTP id l7-v6mr2622368plg.170.1533219937746; Thu, 02 Aug 2018 07:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533219937; cv=none; d=google.com; s=arc-20160816; b=taXQIoqR2ePPV9O3dSZa5R2h8ZAWYRPDyO8tBQ6JnYRzy08L6q2PV+SKqdpYsVNRVK cVU0zwu7FgcdtldpwCLjxlOUffNXCNIT0Ywpfm1L2luKZIw9sFZKlAy8GDMaBk0vu8ck WuYRiK4OY9tPnf26ve/WkvrxGhRmsFkZMw1eiO63PYXg9NQQzgFAJ3An9SOip8ywkAcw l4422E+KUrHCixgfEw+mya8hwutTM5lron6kSKX9Ws6kckKiccdCLpmvDnaTgIhlVRaS shZ4RWep0qAnOHSfc8YN0AnPCSbWHHXH7yvkXutkAngE5zWH/mPlcz7kfHfc/VATB0Oz j1Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=TZHZCuOGpfv1PH3LJ01C+/chhxlSrHrZo/bEl+NXhUI=; b=OMUKbplGr096o4v9U1hVYPp2XLqUBj18CgItLdT+pZOhO4wd4ENHOSgo3BAE1+D17p H0tgAYwndBvgZCa1V/4Yeu/mVXAeUS8dgSrxyQ9g2OEJuudIxj2rnOGhmXnDagDkdBTX lk4nxtoBfGExuJv8EF+Vsg6AewNZW153YupYIMLrkii3//lz0DM0S57jGam71jTlD40u S8kcN6NOALTOcnifH0XQgYQPl9suu3T0n2m8p7qK82tAIYMqO6CfH1z4UI1CQ6DxmdfR ne4NkNylMhJ68byLtxgv1MV50yIWCOquO5Z0NwLY5zU9aAEndlqrXJ7W8AMjdBxsXVkN e8QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=H0B2ETwb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r23-v6si2244731pgb.623.2018.08.02.07.25.23; Thu, 02 Aug 2018 07:25:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=H0B2ETwb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387543AbeHBQPB (ORCPT + 99 others); Thu, 2 Aug 2018 12:15:01 -0400 Received: from a9-99.smtp-out.amazonses.com ([54.240.9.99]:45974 "EHLO a9-99.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387504AbeHBQPA (ORCPT ); Thu, 2 Aug 2018 12:15:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1533219814; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=y6bulpRbEjfHIFhEoTfMdi3LypqJNGhWx4XpQySka6E=; b=H0B2ETwbICTy/Zab4/DHdxumCbtnMTuqzwHCV8TcPTgkSJBlmM0tvoZ8vyYwj5nE kbWITil3eplsvNJYeLFM2yV/d7Cbuq6I2zI1nUKra5mvvs0RkXIHWcZa5YtZd6B4ufB VgvK5ctPnOV0pJrrB6B9JjEhusWxocPmfQRj8j5U= Date: Thu, 2 Aug 2018 14:23:34 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Jeremy Linton cc: linux-mm@kvack.org, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, mhocko@suse.com, vbabka@suse.cz, Punit.Agrawal@arm.com, Lorenzo.Pieralisi@arm.com, linux-arm-kernel@lists.infradead.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Subject: Re: [RFC 1/2] slub: Avoid trying to allocate memory on offline nodes In-Reply-To: <20180801200418.1325826-2-jeremy.linton@arm.com> Message-ID: <01000164fb05bba7-1804e794-a08d-4ee0-b842-c44c89647716-000000@email.amazonses.com> References: <20180801200418.1325826-1-jeremy.linton@arm.com> <20180801200418.1325826-2-jeremy.linton@arm.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2018.08.02-54.240.9.99 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 1 Aug 2018, Jeremy Linton wrote: > diff --git a/mm/slub.c b/mm/slub.c > index 51258eff4178..e03719bac1e2 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -2519,6 +2519,8 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, > if (unlikely(!node_match(page, searchnode))) { > stat(s, ALLOC_NODE_MISMATCH); > deactivate_slab(s, page, c->freelist, c); > + if (!node_online(searchnode)) > + node = NUMA_NO_NODE; > goto new_slab; > } > } > Would it not be better to implement this check in the page allocator? There is also the issue of how to fallback to the nearest node. NUMA_NO_NODE should fallback to the current memory allocation policy but it seems by inserting it here you would end up just with the default node for the processor.