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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10CF1C02192 for ; Mon, 3 Feb 2025 15:38:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 209A56B007B; Mon, 3 Feb 2025 10:38:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1B9B86B0082; Mon, 3 Feb 2025 10:38:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 05AB06B0083; Mon, 3 Feb 2025 10:38:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id DA2526B007B for ; Mon, 3 Feb 2025 10:38:13 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 77354AE5E4 for ; Mon, 3 Feb 2025 15:38:13 +0000 (UTC) X-FDA: 83079039666.29.9E1A066 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by imf24.hostedemail.com (Postfix) with ESMTP id 7F32F180002 for ; Mon, 3 Feb 2025 15:38:11 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=GkF04gCp; spf=pass (imf24.hostedemail.com: domain of gourry@gourry.net designates 209.85.222.181 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738597091; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+QutC4Bp0kBOkNqLV2m+TxVs5qOyu/Uk1tkI4OgwW1k=; b=7ZhEz3ikc35vANAAazDbElQyqhaagycqzVaHs2syLMy1g6UtFkhWnCnm2nUihGVGmspL3s fg1bgwuPraoEGpv5/YClunBczsHtxKScCFwrkxicTC+P1OgeCqc6TP5LcnBFMU53k6qQJp rMHJzCSn8FAZZ92hJ/Q5CZQN+cucViE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738597091; a=rsa-sha256; cv=none; b=TKMPuKKznTEd3995uplqaxI8W7h8pPXZjJ63NXIIIsuKpgtnbLs83JwJtABRwMvt3rgfWk DPA01/3DU4/fvg6XxbmbK/kzFfuTIRJcbzHEByVax3S51pIPx5sFifuHCiioIEWd5BUa1f b8uRLIsL0crRHv2sSozAkQz0glI+JWs= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=GkF04gCp; spf=pass (imf24.hostedemail.com: domain of gourry@gourry.net designates 209.85.222.181 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-7b6e8814842so461749885a.0 for ; Mon, 03 Feb 2025 07:38:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1738597090; x=1739201890; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=+QutC4Bp0kBOkNqLV2m+TxVs5qOyu/Uk1tkI4OgwW1k=; b=GkF04gCp652nc2MelSxqj8BJVn3Vh0hUxZS0bEbRp5IyfXS55bkZueldGjBe1B2Afl lBEMYDp1SD7oNPRk6MluOq6tLesNRxJoteDjFDAzIXTgpHIRIA3sSCL3kMyzsV0nmSI7 yFLZP8WNEENXmaI3zAwcEyu474Su0LGDCtGr7GLgGD5RiKYrDd8VbpiIgAQyb0KomHCc P2LUzyyTdVj+yhQTCY9uyE+ZBHW1XU0Qzw6totA030VQMtsyZu8FFVikmUz0NKFb6P0X WgOXxAmrLDC2zqfhD82VFovqlCQVgz35kI8EdoI2W1Zx6hMtlfOxOO9gLQTOO9bWcS3g nN4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738597090; x=1739201890; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+QutC4Bp0kBOkNqLV2m+TxVs5qOyu/Uk1tkI4OgwW1k=; b=KmUJ+rfVtti0usN4we1nTBk6P0b9XLQM5+i14ggQpjBMjt69S273U4UvVOtyU8oeFn vV1ITOLFD8jNQhHBZqAgh0iWK+9WCu80QiFhJ56QdWTyGJRZqZsVhQ8SAmuwNuJoc5BF 6aCkISrAajv/LA+hXB15Nx+PJWVTprnlX9qtFz9eQeaITMTDxQHpvG3SBpzWhhTbzO09 sLmNWE1XXrSd8+OOFuc94hRpPzdsjqrk4zbguMxF5d+iy43HxIkOHYmRxG+MOuUXfLOy EzQ8Auzi4k3I6jzDgOE/uzQs6fluHksWvNxuKpp2pk/gwnXSKFRvl16ECf8mD86RcIci Ev4g== X-Forwarded-Encrypted: i=1; AJvYcCX+r/+i/qVPpU5ppsKqNksFuXdJQjE1bdPbjKs4xJWJ1Zzdb16uA5WNMn15spgcwFYklhE234uLeQ==@kvack.org X-Gm-Message-State: AOJu0Ywe0MsXp2DXWtKMbEWtwkqdRECa7LOBKiqQFrhdfx4tphrpV0Bv NnUbfVBns+0L+6T7q/QMX7vgjifJspD/sDXZhq7fb9McL6uustIutQkQz5O+p24= X-Gm-Gg: ASbGncsNnG2d5ed3c7m88CIhm2t2hP4C4I6eh7m//1QAsQH29ygs60G6Ir0bIXB/W+r 63+BbktX1c8XE+rn7nvo+6mwoxBAXAVhnLEueVU5ML1ZN/0c5poqay0Iif23JoUWjTOtMFcwGU4 3K+NSh7q6+n/0MJxPN8MzEIcQGRv+ilsDdK/7dTC6Cs3d4lARMLn7iD9qHUGMwpod0TLhp3caZe ys+R7qpNDylmEe88YnntvlwLgr2sqDlP2RjNi1ZGZTGHveO3+nvMpNH2GOPMWQf+f8S1PVMDpIr J+8OblQQo1dSx0IMWQY3sdn/3jFdQA0Yxug44+M74B2zaLiAn8wyNnUO/sSxX6vhmVfa2Fr+qQ= = X-Google-Smtp-Source: AGHT+IGxWDdk+Y4hr1K+s/2L7RjMtvZ20ECCW0rUX0INQ/Bh4CjR5iJqI4t7BrTH3xZyekIHEtevZg== X-Received: by 2002:a05:620a:2588:b0:7b6:deaa:3191 with SMTP id af79cd13be357-7bffcd9c454mr3554895485a.55.1738597090459; Mon, 03 Feb 2025 07:38:10 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7c00a8d0573sm538247685a.37.2025.02.03.07.38.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2025 07:38:10 -0800 (PST) Date: Mon, 3 Feb 2025 10:38:06 -0500 From: Gregory Price To: Honggyu Kim Cc: Joshua Hahn , kernel_team@skhynix.com, ying.huang@linux.alibaba.com, rafael@kernel.org, lenb@kernel.org, gregkh@linuxfoundation.org, akpm@linux-foundation.org, rakie.kim@sk.com, dan.j.williams@intel.com, Jonathan.Cameron@huawei.com, dave.jiang@intel.com, horen.chuang@linux.dev, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-mm@kvack.org, kernel-team@meta.com, 42.hyeyoo@gmail.com, Honggyu Kim Subject: Re: [PATCH v4] Weighted Interleave Auto-tuning Message-ID: References: <20250202141247.2219681-1-joshua.hahnjy@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: tpyybm3s1orchn87tkfhynyfuhxt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uf9vtyNWuqPIjr3l+AsDI0T22PlJPyQm9XXDypOXwHuEyCR0BbNXWmcHUxlkCNofGZqkHCkpPmI/aE03dgHZSc76lr28aR9M1lJ5bouJeHk8iPwukOzKIRGGIGGseetKDRt3TU4RJOtcxLUnwBq5No9JMfd6OiXtdq1eMjzT9g9dqr/9KPWO2f4+UPJwUK59SZO+FtJ25Gon1tM+Pi7KEN46eGdaBo39NxV2LhOQka4gEYNK+gaFULZgDeOtYm5gF766cQnaktiVQISv5Hty8Dic1my1z82Z63nhb5MWcbSRTJqHoVa1jLGDxxcVddJkiTs6dnH8Gp12HnARAIYDmEeqDJqEA2v7Qi9X0I0+nFCKJnwVB7Cxqa5B8RwOl4WXR8z8br4koLvtgNEYOYHcjVV4QLg== 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: List-Subscribe: List-Unsubscribe: On Mon, Feb 03, 2025 at 09:44:29PM +0900, Honggyu Kim wrote: > Hi Joshua, > > > A node offlining (or even onlining with no new bandwidth information) > > will just mean that the node inherits whatever value is stored in > > iw_table at that moment, whether that contains the default values > > created on init or the last values that it had taken. > > It looks the call sequence is as follows. > > cxl_region_perf_attrs_callback() > -> cxl_region_update_coordinates() > -> node_set_perf_attrs() > -> mempolicy_set_node_perf() > -> reduce_interleave_weights() > > I haven't searched all the paths of cxl_region_perf_attrs_callback() via > cxlr->memory_notifier.notifier_call callback pointer, but maybe this > function is not called when a node is offlined, then I get node > offlining doesn't trigger re-weight calculation. This function is called any time a memory block status changes. static int cxl_region_perf_attrs_callback(struct notifier_block *nb, unsigned long action, void *arg) { ... if (nid == NUMA_NO_NODE || action != MEM_ONLINE) return NOTIFY_DONE; ... } But it doesn't do anything if it's not a call to online a memory block, so the cached performance data in mempolicy won't change when blocks are taken offline. So the time the scenario you are proposing can arrise is when the device does not provide performance information (missing CDAT). If a user sets manual mode - they're on the hook to manage everything. This is system-wide setting - not a per-task setting. We've yet to see any strong use-case for individual task weights. If there is a use case for a task not being subject to system-wide weight changes then it's a use case for task-local weights. ~Gregory