From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25BD5C4332D for ; Thu, 19 Mar 2020 09:38:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D2AF720663 for ; Thu, 19 Mar 2020 09:38:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2AF720663 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 016A76B0003; Thu, 19 Mar 2020 05:38:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F093F6B0005; Thu, 19 Mar 2020 05:38:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E45F26B0006; Thu, 19 Mar 2020 05:38:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0039.hostedemail.com [216.40.44.39]) by kanga.kvack.org (Postfix) with ESMTP id C9DB06B0003 for ; Thu, 19 Mar 2020 05:38:06 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 7C9AD181AEF07 for ; Thu, 19 Mar 2020 09:38:06 +0000 (UTC) X-FDA: 76611610572.28.sheet75_63d7438567d1e X-HE-Tag: sheet75_63d7438567d1e X-Filterd-Recvd-Size: 2522 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Thu, 19 Mar 2020 09:38:05 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1E6DFACB9; Thu, 19 Mar 2020 09:38:04 +0000 (UTC) Subject: Re: [PATCH v2 1/4] mm: Check for node_online in node_present_pages To: Michael Ellerman , Michal Hocko , Srikar Dronamraju Cc: Andrew Morton , linux-mm@kvack.org, Mel Gorman , Sachin Sant , Christopher Lameter , linuxppc-dev@lists.ozlabs.org, Joonsoo Kim , Kirill Tkhai , Bharata B Rao , Nathan Lynch References: <20200318072810.9735-1-srikar@linux.vnet.ibm.com> <20200318072810.9735-2-srikar@linux.vnet.ibm.com> <20200318100256.GH21362@dhcp22.suse.cz> <2d7c55ed-0f67-bd47-e478-9726734abcc9@suse.cz> <87tv2ldw1k.fsf@mpe.ellerman.id.au> From: Vlastimil Babka Message-ID: Date: Thu, 19 Mar 2020 10:38:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <87tv2ldw1k.fsf@mpe.ellerman.id.au> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 3/19/20 1:32 AM, Michael Ellerman wrote: > Seems like a nice solution to me Thanks :) >> ----8<---- >> diff --git a/mm/slub.c b/mm/slub.c >> index 17dc00e33115..1d4f2d7a0080 100644 >> --- a/mm/slub.c >> +++ b/mm/slub.c >> @@ -1511,7 +1511,7 @@ static inline struct page *alloc_slab_page(struct kmem_cache *s, >> struct page *page; >> unsigned int order = oo_order(oo); >> >> - if (node == NUMA_NO_NODE) >> + if (node == NUMA_NO_NODE || !node_online(node)) > > Why don't we need the node_present_pages() check here? Page allocator is fine with a node without present pages, as long as there's a zonelist, which online nodes must have (ideally all possible nodes should have, and then we can remove this). SLUB on the other hand doesn't allocate cache per-cpu structures for nodes without present pages (understandably) that's why the other place includes the node_present_pages() check. Thanks