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 2FD31E77184 for ; Sat, 21 Dec 2024 05:58:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 321F76B007B; Sat, 21 Dec 2024 00:58:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2AB326B0082; Sat, 21 Dec 2024 00:58:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 14CBA6B0083; Sat, 21 Dec 2024 00:58:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id EAF616B007B for ; Sat, 21 Dec 2024 00:58:09 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 5F32BC0644 for ; Sat, 21 Dec 2024 05:58:09 +0000 (UTC) X-FDA: 82917909564.30.73A4A95 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by imf04.hostedemail.com (Postfix) with ESMTP id 300C540002 for ; Sat, 21 Dec 2024 05:57:29 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b=g8LzAB0T; spf=pass (imf04.hostedemail.com: domain of ying.huang@linux.alibaba.com designates 115.124.30.130 as permitted sender) smtp.mailfrom=ying.huang@linux.alibaba.com; dmarc=pass (policy=none) header.from=linux.alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734760664; 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=6BmLQ7unvu8bhKnAukymqDC+DI3RHZRZDRA4zf6Bd9s=; b=ECXEPwbj47TeH5dnKSIcTpwWw0f5fk5q936CrNHSP09dkO1uBWMuAZgzJ/yvkGvxjPIvb1 XRIlDglKLhrjcyJBJm0eRdf1vdNtQlWF3FfocwVsZF9LiAzUecDpl3yxd6B/dQ1Xe4WsmV nMtXi3pdvL4GkFVdM2y9KQFvqUurHWI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734760664; a=rsa-sha256; cv=none; b=wvz8wSlW/YFqIIetipZKARNBjgVd34LUbvjKBUbgE/4k64FCGgQRqTXdWNBJgVeU5IIxNM 4R+CC7/hwJKVt8eDwI3KBnnZbG1hrRpsqytoSqNdLOD5S/1vzUBWL28G3PCyb+7KPCKGd/ 9xpb0VHvPT+Fvo7wPxrhln08IzDFjK8= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b=g8LzAB0T; spf=pass (imf04.hostedemail.com: domain of ying.huang@linux.alibaba.com designates 115.124.30.130 as permitted sender) smtp.mailfrom=ying.huang@linux.alibaba.com; dmarc=pass (policy=none) header.from=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1734760682; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=6BmLQ7unvu8bhKnAukymqDC+DI3RHZRZDRA4zf6Bd9s=; b=g8LzAB0TmwshF5HkyJX28rjBdg+2impixAc5f89BF8hFXXQg0yVw9d3YBaLQvliOGP84t+ODaG4A2xkhOMRm/i75/k+f2p0BeK56suF2+fcUV/LU0YgtEluvRlL+Z0YblBZR1xzy74fRM45hpYYHBvdlVN9P2BNOHjBAtmdJGX4= Received: from DESKTOP-5N7EMDA(mailfrom:ying.huang@linux.alibaba.com fp:SMTPD_---0WLvcNRy_1734760678 cluster:ay36) by smtp.aliyun-inc.com; Sat, 21 Dec 2024 13:58:00 +0800 From: "Huang, Ying" To: Joshua Hahn Cc: hyeonggon.yoo@sk.com, "gourry@gourry.net" , kernel_team@skhynix.com, "rafael@kernel.org" , "lenb@kernel.org" , "gregkh@linuxfoundation.org" , "akpm@linux-foundation.org" , =?utf-8?Q?=EA=B9=80=ED=99=8D=EA=B7=9C=28KIM?= =?utf-8?Q?_HONGGYU=29_System_SW?= , =?utf-8?Q?=EA=B9=80=EB=9D=BD=EA=B8=B0=28KIM_RAKIE?= =?utf-8?Q?=29_System_SW?= , "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" Subject: Re: [External Mail] [RFC PATCH] mm/mempolicy: Weighted interleave auto-tuning In-Reply-To: <20241213195754.2676135-1-joshua.hahnjy@gmail.com> (Joshua Hahn's message of "Fri, 13 Dec 2024 11:57:31 -0800") References: <4ddfa283-eb64-4032-880b-c19b07e407e1@sk.com> <20241213195754.2676135-1-joshua.hahnjy@gmail.com> Date: Sat, 21 Dec 2024 13:57:58 +0800 Message-ID: <87jzbtr315.fsf@DESKTOP-5N7EMDA> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 300C540002 X-Stat-Signature: 4g3zt41jy5u3n6pckni6f88ar9c7czwr X-Rspam-User: X-HE-Tag: 1734760649-215498 X-HE-Meta: U2FsdGVkX19mJq8nho1Je0PdV77rY4nOLWk8kwHQ7FKkqWR5Wc7ZvP8ASqGLKhD4dBB1e9+ifuFPF4B0LRPvqkom54ZuvvOccvOxuY4xHrg1tBAKEvfW/i2S9S8+mVjTup8rtSoGjLlbaKlThQmPghidna3gkJII+ytrz/w7t1R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lsdWqofVGH0XLHAEiEBC4N97VkwkcCOhRT1tI0uRTvKCXhH1zZ9f14QN7wUZ4PHX0++SfB5oI8LDT/QOomZBRX93JsETFAWqStSWxEZlFGawsRsc+ufY/YFX2OBmgf0yKk+igqHerczVJpzaPR3+MjbCiocbgHLJFS0SR4ElRMw6ay+CZLPcnZu68ZeAYgn0gejNsxuMSfbI5B+nUGRX8HED7w== 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: Hi, Joshua, Joshua Hahn writes: > On Fri, 13 Dec 2024 15:19:20 +0900 Hyeonggon Yoo wrote: > >> On 2024-12-11 06:54 AM, Joshua Hahn wrote: [snip] > > [-----8<-----] > >> > +What: /sys/kernel/mm/mempolicy/weighted_interleave/max_node_weight I don't think that we need a new knob for this. Just use a reasonable default value, for example, 32 or 16. If it turns out that a knob will be really helpful, we can add it at that time. For now, I don't think the requirements are clear. And, this is a new ABI and we need to maintain it almost for ever. We must be careful about new knob. >> > +Date: December 2024 >> > +Contact: Linux memory management mailing list >> > +Description: Weight limiting / scaling interface >> > + >> > + The maximum interleave weight for a memory node. When it is >> > + updated, any previous changes to interleave weights (i.e. via >> > + the nodeN sysfs interfaces) are ignored, and new weights are >> > + calculated using ACPI-reported bandwidths and scaled. >> > + >> >> At first this paragraph sounded like "previously stored weights are >> discarded after setting max_node_weight", but I think you mean >> "User can override the default values, but defaults values are >> calculated regardless of the values set by the user". Right? > > In the implementation, the first way you interpreted is the correct > description. That is, if a user manually changes a ndoe weight, > then updates the max_node_weight, the previous manual change will > be overwritten by the newly scaled values. > > Does this behavior make sense? Perhaps it makes sense to ignore > user-changed values when doing the re-scaling if a user decides to > change the max_node_weight value themselves. > > Regardless of what implementation makes sense, I can re-write the > description so that there is no ambiguity when it comes to the > expected behavior of the code. Thank you for pointing this out! I don't think that it's a good idea to override the user supplied configuration values. User configurations always have higher priority than system default configurations. IIUC, this is the general rule of Linux kernel user space interface. --- Best Regards, Huang, Ying