Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3809161ybh; Tue, 17 Mar 2020 07:02:04 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvCf4comQi0QqLB9DwzQNnOu9+EORWmWl5xQ4KyNy9IIYWr2zWn2lJBMFTbiAsMYP8Hj3CR X-Received: by 2002:a9d:4b98:: with SMTP id k24mr3673572otf.26.1584453724829; Tue, 17 Mar 2020 07:02:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584453724; cv=none; d=google.com; s=arc-20160816; b=tP7g4G16X86bEikzLiMjFjlgSG7zotI9GV1l88wTGLJlha9cQQX+cAK4RHl2RNsdWR N7v64KAsP6lf/87uGS5xO7EvS37Ypj1qtz1sxggGDRPk8c+CPsxPPbnN2E0HBTDyFlkb eFRHMM+Z0da9wgBMgcVR7QfSlGkZXbfJcIIpb+tQ1imwWlkWOhec6TE+I+IaHJ6rz2e0 NrlE5ddhuJuqI2wl0QfqaX7bIsWV6fqfrpGF0yApmt0pvHyMHGrhl6TKnKGnzkKzY1Ml vsqqAiil2akVqfhP+mUHrMO52qOLJjaOhZX0RZ82nP7rQEcHzvG8ZIiDPpbAqmd9OITE rGJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ItWRufudZgPZEpQ32ItzaAQQhZEgI2/DOHgrwuATrtI=; b=jLofZsgNAdGy8PzYbVVRUFz/YGsbBWwRyYuVD0ZYf1Xltx/J9deoJWQt7A+ya5wYBE SQqZ9zZgwfFpXzSVDzzHn/3+AaJIEqzkIXI56V2kDLYow6oRwOwUsBYcKbhMAbQmgtH9 XhOl6hs3/1+9ljl+gl4qM+kazxFMnTaZ14+MOjXXcH/wpTyTL6Yll/WNbCRy6wjWp6hm CsYnqzk3KvHiqUeUPvwm2qiW9bxiQLq7LkEwYKBkjzkgnnqdi50lH60InwMLSnFnLPG4 4Dlzhei1L4KB0OyfUVYsGpZu1iT4W50JSEYr6nhMajqQJ0ObSGboDYicCoBna1Pu2xwz X+Jg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si1866845otn.64.2020.03.17.07.01.49; Tue, 17 Mar 2020 07:02:04 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726278AbgCQOB2 (ORCPT + 99 others); Tue, 17 Mar 2020 10:01:28 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41938 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbgCQOB1 (ORCPT ); Tue, 17 Mar 2020 10:01:27 -0400 Received: by mail-wr1-f66.google.com with SMTP id f11so9042077wrp.8 for ; Tue, 17 Mar 2020 07:01:26 -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=ItWRufudZgPZEpQ32ItzaAQQhZEgI2/DOHgrwuATrtI=; b=AKe2A5VVlB745pcJoCozKTovRj+h68UfzaTz8kcEWm1FYg2s6mXpYIK6W0NRwcKtiZ d8gAPj/EBOMSV7bAFFR3B92falxQmjz574rRHh4xJga2SunEIl8+DDAJ9R6b75VIAwqW 9pdrOb76du9+eG1L4UZGvgg2FDOYMwerO4nvJW0DwwgIhD06n9K95ffMxo3Twg5S2V+2 AncuofGHzscOfVUJ2uaf0fKlvqgBJXNVmGwv5DwcrNLG6ccNDv709RSP2xVB82mkLqNs WxwfCy5zqIPzmyI3JR9ogQJsJPwELobkL3tcI00n251wtHQ/3CfZET2Ps3SDgqio+jVy eh4g== X-Gm-Message-State: ANhLgQ0AkxSqOQ+O9shpPJJjQhIr8qmKpAWKG5IPLeU4N6AW60xwS+pu Mk97XQ/hzZDK0DqBDO0iZzY= X-Received: by 2002:adf:e883:: with SMTP id d3mr6169893wrm.75.1584453685337; Tue, 17 Mar 2020 07:01:25 -0700 (PDT) Received: from localhost (ip-37-188-255-121.eurotel.cz. [37.188.255.121]) by smtp.gmail.com with ESMTPSA id q8sm81107wrc.8.2020.03.17.07.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Mar 2020 07:01:24 -0700 (PDT) Date: Tue, 17 Mar 2020 15:01:22 +0100 From: Michal Hocko To: Vlastimil Babka Cc: Srikar Dronamraju , Sachin Sant , Linus Torvalds , LKML , linux-mm@kvack.org, Mel Gorman , "Kirill A. Shutemov" , Andrew Morton , linuxppc-dev@lists.ozlabs.org, Christopher Lameter , Joonsoo Kim , Kirill Tkhai Subject: Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus Message-ID: <20200317140122.GQ26018@dhcp22.suse.cz> References: <20200311115735.GM23944@dhcp22.suse.cz> <20200312052707.GA3277@linux.vnet.ibm.com> <5e5c736a-a88c-7c76-fc3d-7bc765e8dcba@suse.cz> <20200312131438.GB3277@linux.vnet.ibm.com> <61437352-8b54-38fa-4471-044a65c9d05a@suse.cz> <20200312161310.GC3277@linux.vnet.ibm.com> <20200316090652.GC11482@dhcp22.suse.cz> <65b99db6-3bdf-6caa-74e5-6d6b681f16b5@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65b99db6-3bdf-6caa-74e5-6d6b681f16b5@suse.cz> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 17-03-20 14:44:45, Vlastimil Babka wrote: > On 3/16/20 10:06 AM, Michal Hocko wrote: > > On Thu 12-03-20 17:41:58, Vlastimil Babka wrote: > > [...] > >> with nid present in: > >> N_POSSIBLE - pgdat might not exist, node_to_mem_node() must return some online > > > > I would rather have a dummy pgdat for those. Have a look at > > $ git grep "NODE_DATA.*->" | wc -l > > 63 > > > > Who knows how many else we have there. I haven't looked more closely. > > Besides that what is a real reason to not have pgdat ther and force all > > users of a $random node from those that the platform considers possible > > for special casing? Is that a memory overhead? Is that really a thing? > > I guess we can ignore memory overhead. I guess there only might be some concern > that for nodes that are initially offline, we will allocate the pgdat on a > different node, and after they are online, it will stay on a different node with > more access latency from local cpus. If we only allocate for online nodes, it > can always be local? But I guess it doesn't matter that much. This is not the case even now because of chicke&egg. You need a memory to allocate from and that memory has to be managed somewhere per node (pgdat). Keep in mind we do not have the bootmem allocator for the hotplug. Have a look at hotadd_new_pgdat and when it is called. There are some attempts to allocate memmap from the hotpluged memory but I am not sure we can do the whole thing without pgdat in place. If we can then can come up with some replace the pgdat magic. But still I am not even sure this is something we really have to optimize for. -- Michal Hocko SUSE Labs