Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2734609pxb; Mon, 31 Jan 2022 03:11:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxG6tPPrVMIVtIqGloYDDEsQVRHBBCo6nYpu7g1ADwWzunu18N7E1ccWMMko/u30H0ii+H X-Received: by 2002:a63:4e58:: with SMTP id o24mr16214981pgl.374.1643627503929; Mon, 31 Jan 2022 03:11:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643627503; cv=none; d=google.com; s=arc-20160816; b=rkxdeg7kRdPdKYiD5naMbS/GRrSE3EPqOp6iq5AbVGBlvMyTs3Ut/HZyEhof1M5RHy 4EzCEGKuWxTZk0oGmIvBuV8AW6sxKJMUQBLvgFxn5O8oRvAOAeMTaClfWzhqpAQ31WUk zaBr3KQY4OUz2bx3bwL68ALnGbi28qitAM+w7loJr1Zh6LywUqQacDfUWUNkBP0Qlkz9 UgLXOZtGmYqCNuE55f7LrVDPB2RkNanxIux9KKGatc0KJcXc9b8tTYTQcawSUdpJJulo 0DQifp3sAP9oLN5AH9MSW+HmI7TkX44gpPD1tTtwfN2GUj1Umbu92KBrzHn+l31bHBLu e0fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uf8qWeDju8EH3M4vP62u102f0sClYZhITwuykA+5lcI=; b=r3DNST9oi9WclR6k157bJvLGWXwtzokhFr6u0TiaT6TaLrixT0KRWOE1DTYaurboeG CbeKBSQWwMbjjbZ2JdgV7p+mhumxunkA1qtOBX4vwEpZGtE9MdoqvOy+noU7Th15yZko wbV9pMw7L8aWdDgO9ZOw1yDBhoHOGHOWN5PvOenL6CkUrxW6xjPhxiL/lII2FVT0k3Vo JKBMgqbGjAhB7N6QXbefv6frGmbt+I6lQ23SHnJyM7PQBdqiR13GEcOMMOZctD615Och 5hbPnC0xdL2SLu4MZ3+WiQJClQe84nzfrc974P6f0ID4AzAUvLHBrmBdJdx6QtCLewA+ tArA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=S2yemxHQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gf11si9303409pjb.71.2022.01.31.03.11.33; Mon, 31 Jan 2022 03:11:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=S2yemxHQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344395AbiA1POQ (ORCPT + 99 others); Fri, 28 Jan 2022 10:14:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231818AbiA1POD (ORCPT ); Fri, 28 Jan 2022 10:14:03 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80EFFC061714 for ; Fri, 28 Jan 2022 07:14:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=uf8qWeDju8EH3M4vP62u102f0sClYZhITwuykA+5lcI=; b=S2yemxHQ9pSElwsy3naRSvLYzs q1fjmb9VL3m6rkOpr3oO+YkxYiyDOKYj3wMXLgjP0Ty1xiwtL0Npy6j5jRzL3UBd+9uzL2Uax0FuO giJDrPWLK5UyWJpeEhr4Fl54O3oPpA7a2hHPtdrZU1DKiZD6rPmHGHOLcZsHYCL7oqpFn+sMh58pl /PYtdCSUFrstJ0zAfrs2bn66HPvAwROdw/UIvhB2gkGBo2uaY1/Lc7wRlakjn9r5j2ePIZLrnBRcg +L5UiHAbiVWGLfGjFVEkjohfo5ijZTKsS0uHU3hMxEROOGxzglFYRHNy4M4Yrz96xE2LQKFj4/Yn1 lV1ggqvA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDSwl-004aWZ-7E; Fri, 28 Jan 2022 15:13:55 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 3BCC330002E; Fri, 28 Jan 2022 16:13:54 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1FE7A2142D5E8; Fri, 28 Jan 2022 16:13:54 +0100 (CET) Date: Fri, 28 Jan 2022 16:13:54 +0100 From: Peter Zijlstra To: "Huang, Ying" Cc: Srikar Dronamraju , Mel Gorman , linux-kernel@vger.kernel.org, Ingo Molnar , Rik van Riel Subject: Re: [RFC PATCH 1/2] NUMA balancing: fix NUMA topology type for memory tiering system Message-ID: References: <20220128023842.1946583-1-ying.huang@intel.com> <20220128052345.GA618915@linux.vnet.ibm.com> <87czkctiz9.fsf@yhuang6-desk2.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87czkctiz9.fsf@yhuang6-desk2.ccr.corp.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 28, 2022 at 03:30:50PM +0800, Huang, Ying wrote: > Srikar Dronamraju writes: > > > * Huang Ying [2022-01-28 10:38:41]: > > > >> > >> One possible fix is to ignore CPU-less nodes when detecting NUMA > >> topology type in init_numa_topology_type(). That works well for the > >> example system. Is it good in general for any system with CPU-less > >> nodes? > >> > > > > A CPUless node at the time online doesn't necessarily mean a CPUless node > > for the entire boot. For example: On PowerVM Lpars, aka powerpc systems, > > some of the nodes may start as CPUless nodes and then CPUS may get > > populated/hotplugged on them. > > Got it! > > > Hence I am not sure if adding a check for CPUless nodes at node online may > > work for such systems. > > How about something as below? I'm thinking that might not be enough in that scenario; if we're going to consistently skip CPU-less nodes (as I really think we should) then __sched_domains_numa_masks_set() is not sufficient for the hotplug case since sched_domains_numa_levels and sched_max_numa_distance can also change. This means we need to re-do more of sched_init_numa() and possibly re-alloc some of those arrays etc.. Same for offline ofc.