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 22398C0218F for ; Sun, 2 Feb 2025 14:12:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 56C89280004; Sun, 2 Feb 2025 09:12:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 51CC7280002; Sun, 2 Feb 2025 09:12:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3E459280004; Sun, 2 Feb 2025 09:12:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 20F7F280002 for ; Sun, 2 Feb 2025 09:12:54 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 9015BC148D for ; Sun, 2 Feb 2025 14:12:53 +0000 (UTC) X-FDA: 83075195826.22.F63626C Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) by imf14.hostedemail.com (Postfix) with ESMTP id B9073100005 for ; Sun, 2 Feb 2025 14:12:51 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=D55Cx7pQ; spf=pass (imf14.hostedemail.com: domain of joshua.hahnjy@gmail.com designates 209.85.128.179 as permitted sender) smtp.mailfrom=joshua.hahnjy@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738505571; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=OP/ULsuhS2l/WjnpV3aP5975AuU0qKrgS7YueBktGqU=; b=U2qfQtnKqNZzayKgippHCq+FtoGCF33a40OPwmH0w88vwq56TNl8Kt4//ZHv77K8rJDCUy JIfZ+idk1T4iCtH9B2qmh/++vPD2DVQd7x37MWSte1WgT4DBjPiElXWpYBV8N7yYP40XJ4 qSfS1K3iJdtavsD0klCY4jOo5wFc2jg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738505571; a=rsa-sha256; cv=none; b=2O5kpVu9o0huD2wK62Q8MeRhRlWLYjAQgcLv+CPLwwQ0wU+Z+6yhn8EWIuO8HTmRN16kwD WIpI8oGLsrlpAWaXjcusUb+9gwj2wlMQi8y6m7TRPK3X7Sn053uY+O94AjjcwYC0F/aBaw 7UavfpXAoGvelqHNYIm/myjw5Dh744w= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=D55Cx7pQ; spf=pass (imf14.hostedemail.com: domain of joshua.hahnjy@gmail.com designates 209.85.128.179 as permitted sender) smtp.mailfrom=joshua.hahnjy@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-6f277a1ecfdso19255677b3.2 for ; Sun, 02 Feb 2025 06:12:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738505571; x=1739110371; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OP/ULsuhS2l/WjnpV3aP5975AuU0qKrgS7YueBktGqU=; b=D55Cx7pQdzqpvoJtdPmK7Sg4HMe0Cr943rm7T7ochmJqqObhx90U+N2KPJIFDPF9Uq azRSKCjciCgslQjkFbdiegOym73crgAuut4RLHgo3cr78KVkco7oE7hknf2Txdr9gdFM IO5WyHuflxT08xAGK1A+1Rf+DKPHEYJjw709087nAVZiHBF5DdPYRR8pGzs1+Dm6aoA/ y2sEUwMW+7BFIts7w39V6vqAdG3Du6wcSACERoXAl4Fu8A0w4dTokOhgDiiSh4Hlpr7I PAgoJjEvRmRqLFQN6b28mv6R9aVh9dZsk6EPy1W9H58Ico1r4e+Eotyzy+KaLRC4GkaC LoKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738505571; x=1739110371; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OP/ULsuhS2l/WjnpV3aP5975AuU0qKrgS7YueBktGqU=; b=vO5cuJ98av8kPIrNnh85/RjZFTgvrVr/O1oPZguNA9ILXOdaiOMEVrpAQK8A8xto/+ JqHYCRsFxbl/QHv7gtdQBEaYb9dKPCi2es5XMwm6VyaxZDQzAnyAvgJmajVjlReHUBxl 8DqVkWzo5FgBNkHzc5OuuKDc0Rpd7R1uQSHsqFZ8cI3VAKQ7gYSNBIZo8SYCbG9YOGs9 WsuD9QeJ98on0M9A8sdjaLaeUCae9alumya9olhVfmQF0Ci/VlQjZN/2n91RLzMoQcda b1AIu9qnsGzXO2Q5BlyVILqj7xRtwbBNr5JoUqww/vnfp2JTS/eQFdEUsH1tXOHG2/xR mRDQ== X-Forwarded-Encrypted: i=1; AJvYcCUJqoDh79JKw4p9JLSk6FJahFkmWPUOsY1ikA6MCW+H3cbU1FKb8yuwwlldP2aZMqoL5BsEfhapqg==@kvack.org X-Gm-Message-State: AOJu0YxAVDyRTVTi3Yq1N/PA7dwuTtmklW9Ap23aZzWcXvS6Q6hhfJLc CcQd0F9dmTuJISlxe1ydnkVlRrOoOUTehrwutc5uyTRwpvNWMeK/ X-Gm-Gg: ASbGncty7OUfWbUDKp5/qMeLT10VFlzGK+rzbu1oPpCkXKdfFrEp1JR4Ot9kRvob1Qm Zvu/H2dCIeBcSxNn1uCb2P9mzhmwSLOWvZ3eUqBmNS/Xn4BfndewY6svp9fr3isBkxT856WoQjL e/qYP8EqZzLFRpgyHJTT3uq3Bwwl6mEJYCD5c5LRzL+XqoYvr/XlLK2T86ngtEAZGW+b2nlttph PdJ0swyrFKzrXEWzu3jbNVYL5FZZ6D3ZNKZ1V5sVkuLaCv/6gTHiMmB1cLWaR/LElmtp7fsbHth FVsFM40hiJE6zg== X-Google-Smtp-Source: AGHT+IFJs8bjsu60rsjFrfo0Bqk9SgH1Gw8S19VwGfxOIrB19mypYyxFGAIAa0MS1NyLIlbLgZr4Yw== X-Received: by 2002:a05:690c:610a:b0:6f9:4413:3db8 with SMTP id 00721157ae682-6f944133f86mr38193097b3.0.1738505570824; Sun, 02 Feb 2025 06:12:50 -0800 (PST) Received: from localhost ([2a03:2880:25ff:1::]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6f8c46061fbsm17109507b3.17.2025.02.02.06.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Feb 2025 06:12:49 -0800 (PST) From: Joshua Hahn To: Honggyu Kim Cc: Gregory Price , ying.huang@linux.alibaba.com, rafael@kernel.org, lenb@kernel.org, gregkh@linuxfoundation.org, akpm@linux-foundation.org, honggyu.kim@sk.com, 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, kernel_team@skhynix.com, 42.hyeyoo@gmail.com Subject: Re: [PATCH v4] Weighted Interleave Auto-tuning Date: Sun, 2 Feb 2025 06:12:45 -0800 Message-ID: <20250202141247.2219681-1-joshua.hahnjy@gmail.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <9edfb12f-5e1d-4de0-b124-37053125a7e0@gmail.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Sign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pAPni/cKM 6CqpIpde hOyHTsxEmC9VcwvChnZtQjiC9UiUmKxaTTQv74/iJiOEfwcAZ1FyyCjwOImlQWbL1KVLdhbpD7GABnRNnR0ABc9I70iaFWzb2HXTuZRV4Y/m3xI0tZgYRrwHA80kOfK3+xfKv1i7FK1BC3QWTmeidLpa+dAYctkOLz0aanYYBURTGAT1wlxcrT2RNLNzf9s/RdWnva8JRRcjClmEL5R0o8M+OccO40vqvezexis8M+BARLhtAsFkShPRh2D4t25+SyJ90TNVK3EjHmaSy6EOTNQtOMH2RV5bIGu2jFQ9BwCiq158CWzjxhUtVlEPgkDTrWv1JD+V0hL1TN3NULOQdkEzXPAEzgB4cjbGd7Hnc3rbAq995UC/cX1JjuFEXIL7OIevL3ok9lCnLDsI8ntjgbJ/Cm0KKuhWqOBYHwmMojzqXuI7z0+Fzh+ZUheE5uPdgUAhnlodCFAN08x1VTRdOjaH8/Xdhh99+n4ifgBwfH6WDGpQOXCNT7DROXY1rOgxmk8GYawgQYoQBam+QiZ9s7lZrBA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.001520, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi Honggyu, On Sun, 2 Feb 2025 22:51:34 +0900 Honggyu Kim wrote: > On 2/2/25 01:53, Gregory Price wrote: > > On Sat, Feb 01, 2025 at 11:49:31AM -0500, Gregory Price wrote: > >>> 1. the auto mode set the weights as 10:5:1 for node{0-2}. > >>> 2. node2 is offlined, then recalculation makes it as 2:1 for node{0,1}. > > > > Point of clarification here: a hot-unplug event won't cause > > recalculation. > > > > What actually causes re-weight is hot-plug reporting new capacity. > > So do you mean re-weight is done only when a new node is onlined while > offline doesn't trigger re-weight? > > I see node_set_perf_attrs() does recalculation by calling > mempolicy_set_node_perf(), then reduce_interleave_weights(). > > But I'm not sure if the re-weight is done via node_set_perf_attrs() only > when a new node is onlined. > > Could you please explain where I can find it? Just chiming in to add some clarification: Your analysis above is correct; reduce_interleave_weights() is only called in 2 spots: once when the mode is switched from manual --> auto, and the other when new bandwidth data is available, which calls node_set_perf_attrs() and so on. In all other scenarios, iw_table is preserved, and all values inside remain the same without manual changes. 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. > > So in this scenario, the weight will remain the same for node2. > > If it's true, my scenario is wrong. > > Thanks, > Honggyu > > > > >>> 3. the auto sysfs interface is set to 0 to make it manual mode. Please let me know if this makes sense. Thank you for your review as always, and have a great day! Joshua