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=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 132FDC83003 for ; Wed, 29 Apr 2020 12:22:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C566121BE5 for ; Wed, 29 Apr 2020 12:22:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C566121BE5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 615358E001E; Wed, 29 Apr 2020 08:22:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5C4E68E0001; Wed, 29 Apr 2020 08:22:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4661E8E001E; Wed, 29 Apr 2020 08:22:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id 2B11A8E0001 for ; Wed, 29 Apr 2020 08:22:15 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id E8A97181AEF00 for ; Wed, 29 Apr 2020 12:22:14 +0000 (UTC) X-FDA: 76760804988.29.earth42_87fff8c8af51b X-HE-Tag: earth42_87fff8c8af51b X-Filterd-Recvd-Size: 4856 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Wed, 29 Apr 2020 12:22:14 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id j2so2250641wrs.9 for ; Wed, 29 Apr 2020 05:22:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F1Vyi5oIpMniiJ1X1bwh1/7tqzVkkRj08pWhRZE7c+M=; b=FHAMeU/f5nedH3jSAvGMGd2zpKp9JIRsNNPx2B08p7mm/JIVlg8ybMK+Ptx8k7dDrO K+teqkC90Qb6j1+TGOLozQGuN5C+ZS+X8jBz+q1ncPyrChxGoBpETdI50CSX4frCCThc BDtscX3/ZMF0iwv+W04ZqPxF+qyLCBb3xt4CEcSoqNKCa3Wkk0L1a5fFYuNCCDT1vHhP KsgX8JQ66Ra8acWFmP0zVtui6L0XAnFY+dKTyBwKzOdqYFcjLhxUZbpqsC9Y6wIt80N4 Tv8vqHe+cgqD/uJDeKI4sG14Tu7veYJwBsdrurKwXHCbpoBfGZV/c1CNpNclpqgZ2g0o DPsg== X-Gm-Message-State: AGi0PuYOs49LT6j+iV9DzmJn0/I6lR/dtHKFcZlLuu6VorXPUoCU6mbv qHKD5NKm2u+G9ug3B4uEewU= X-Google-Smtp-Source: APiQypKnWBYUo6BP7xM7bZ+TgaJBDEnHFZi4EuKVmDYQRCUHS4sHLGy0+C//6II7OWTEW5xn6unxsw== X-Received: by 2002:a5d:6a8b:: with SMTP id s11mr38386766wru.258.1588162933425; Wed, 29 Apr 2020 05:22:13 -0700 (PDT) Received: from localhost (ip-37-188-130-62.eurotel.cz. [37.188.130.62]) by smtp.gmail.com with ESMTPSA id n25sm7497026wmk.9.2020.04.29.05.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 05:22:12 -0700 (PDT) Date: Wed, 29 Apr 2020 14:22:11 +0200 From: Michal Hocko To: Srikar Dronamraju Cc: Andrew Morton , linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mel Gorman , Vlastimil Babka , "Kirill A. Shutemov" , Christopher Lameter , Michael Ellerman , Linus Torvalds Subject: Re: [PATCH v2 3/3] mm/page_alloc: Keep memoryless cpuless node 0 offline Message-ID: <20200429122211.GD28637@dhcp22.suse.cz> References: <20200428093836.27190-1-srikar@linux.vnet.ibm.com> <20200428093836.27190-4-srikar@linux.vnet.ibm.com> <20200428165912.ca1eadefbac56d740e6e8fd1@linux-foundation.org> <20200429014145.GD19958@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200429014145.GD19958@linux.vnet.ibm.com> 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 Wed 29-04-20 07:11:45, Srikar Dronamraju wrote: > > > > > > By marking, N_ONLINE as NODE_MASK_NONE, lets stop assuming that Node 0 is > > > always online. > > > > > > ... > > > > > > --- a/mm/page_alloc.c > > > +++ b/mm/page_alloc.c > > > @@ -116,8 +116,10 @@ EXPORT_SYMBOL(latent_entropy); > > > */ > > > nodemask_t node_states[NR_NODE_STATES] __read_mostly = { > > > [N_POSSIBLE] = NODE_MASK_ALL, > > > +#ifdef CONFIG_NUMA > > > + [N_ONLINE] = NODE_MASK_NONE, > > > +#else > > > [N_ONLINE] = { { [0] = 1UL } }, > > > -#ifndef CONFIG_NUMA > > > [N_NORMAL_MEMORY] = { { [0] = 1UL } }, > > > #ifdef CONFIG_HIGHMEM > > > [N_HIGH_MEMORY] = { { [0] = 1UL } }, > > > > So on all other NUMA machines, when does node 0 get marked online? > > > > This change means that for some time during boot, such machines will > > now be running with node 0 marked as offline. What are the > > implications of this? Will something break? > > Till the nodes are detected, marking Node 0 as online tends to be redundant. > Because the system doesn't know if its a NUMA or a non-NUMA system. > Once we detect the nodes, we online them immediately. Hence I don't see any > side-effects or negative implications of this change. > > However if I am missing anything, please do let me know. > > >From my part, I have tested this on > 1. Non-NUMA Single node but CPUs and memory coming from zero node. > 2. Non-NUMA Single node but CPUs and memory coming from non-zero node. > 3. NUMA Multi node but with CPUs and memory from node 0. > 4. NUMA Multi node but with no CPUs and memory from node 0. Have you tested on something else than ppc? Each arch does the NUMA setup separately and this is a big mess. E.g. x86 marks even memory less nodes (see init_memory_less_node) as online. Honestly I have hard time to evaluate the effect of this patch. It makes some sense to assume all nodes offline before they get online but this is a land mine territory. I am also not sure what kind of problem this is going to address. You have mentioned numa balancing without many details. -- Michal Hocko SUSE Labs