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 DA4AFE77188 for ; Sun, 22 Dec 2024 08:29:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 330EC6B007B; Sun, 22 Dec 2024 03:29:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2DE1D6B0082; Sun, 22 Dec 2024 03:29:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A6096B0083; Sun, 22 Dec 2024 03:29:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id F05E06B007B for ; Sun, 22 Dec 2024 03:29:40 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 9A3B8140B99 for ; Sun, 22 Dec 2024 08:29:40 +0000 (UTC) X-FDA: 82921919640.19.4ED2915 Received: from out30-112.freemail.mail.aliyun.com (out30-112.freemail.mail.aliyun.com [115.124.30.112]) by imf05.hostedemail.com (Postfix) with ESMTP id E72A0100012 for ; Sun, 22 Dec 2024 08:28:26 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b=g6dh5Olt; dmarc=pass (policy=none) header.from=linux.alibaba.com; spf=pass (imf05.hostedemail.com: domain of ying.huang@linux.alibaba.com designates 115.124.30.112 as permitted sender) smtp.mailfrom=ying.huang@linux.alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734856161; a=rsa-sha256; cv=none; b=s9WXKelc3wk/Ctjagh13uPIb9mDYWSdWr/Y7UmPheMGo4V6WCVWSFR/FKmb4kmj4rLoOGE Er2AWtMWAILvqmeU8A5/NmlwlsxWfpTA82oBgIbIBHBvsqODcdDjHu6pwjnzb6NFmowFvN GNzXmGFZ8cI4vE8vsJsOe5X1d4XLUac= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b=g6dh5Olt; dmarc=pass (policy=none) header.from=linux.alibaba.com; spf=pass (imf05.hostedemail.com: domain of ying.huang@linux.alibaba.com designates 115.124.30.112 as permitted sender) smtp.mailfrom=ying.huang@linux.alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734856161; 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=QHFYpz+OzLsCaVCAYPPWt+cWFpBmzJ/IKFichnBF9as=; b=d03srrWMyj5hvPfq5GvgDmnfVKGMx+XtJYDyCUWxmqpbZI53xa64vBP/xQn1O8cI4sDKKC S8v4jPyBQWpZupsqFcCFHJ9528xtXzwLcueenVnwzGNT7TIbj7gAEs0joXO/1FpUvsFR/4 mS++o8CIpq5Snpqj7XRxO1rnkeOZE8s= DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1734856173; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=QHFYpz+OzLsCaVCAYPPWt+cWFpBmzJ/IKFichnBF9as=; b=g6dh5Olt6vbWLqNM3FjLucTp8pRx+qj8XCanqtiC7zIrLXDJcgeBhUw0+FxxnIQ1GsI/jZk8uWi90i36P+eYbp9frnS0f2WKyjBIRWqOvJGhI6ZEtdo7vMJhqBwznSWwbU2s1r/KVoEeI/haiykZrWkNTGyEquNFK3wKlPh3TDg= Received: from DESKTOP-5N7EMDA(mailfrom:ying.huang@linux.alibaba.com fp:SMTPD_---0WLyNENU_1734856170 cluster:ay36) by smtp.aliyun-inc.com; Sun, 22 Dec 2024 16:29:31 +0800 From: "Huang, Ying" To: Gregory Price Cc: Joshua Hahn , hyeonggon.yoo@sk.com, kernel_team@skhynix.com, "rafael@kernel.org" , "lenb@kernel.org" , "gregkh@linuxfoundation.org" , "akpm@linux-foundation.org" , =?utf-8?B?6rmA7ZmN6recKEtJTSBIT05HR1lVKQ==?= System SW , =?utf-8?B?6rmA65296riwKEtJTSBSQUtJRSk=?= 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: (Gregory Price's message of "Sat, 21 Dec 2024 09:58:08 -0500") References: <4ddfa283-eb64-4032-880b-c19b07e407e1@sk.com> <20241213195754.2676135-1-joshua.hahnjy@gmail.com> <87jzbtr315.fsf@DESKTOP-5N7EMDA> Date: Sun, 22 Dec 2024 16:29:30 +0800 Message-ID: <87ldw8i0id.fsf@DESKTOP-5N7EMDA> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: E72A0100012 X-Stat-Signature: 4darh6wtsich9ushi4xz1kpnx9xy19hf X-HE-Tag: 1734856106-93962 X-HE-Meta: U2FsdGVkX192XuCmkNqX5M8u3meT4xmJiO2IjBA6gDuder9gxJdBp/Q4d43wzDfKN3C94joJs0PTatQ8tvDheKZwHI5CxwRYGeTz6K1I7k9pR4GKgMu7ieUbsa6oYV+efwX9pu3jwHIsmvfU71Ydu1oP9aWjpxw7I0v6Ltf5klw7iCkTjLufLt5//hfAB68oGxhPkRVE/mDA3kv806VmZ7byWBE/UUUWfjokeNy64SAb9X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Sqv7qST9Gp8VubOj+z/e9w76LESZxkDKJYSe6qwekL5dRL4GPM9u23tdD3QO5TixkKC9HWCMR4WPijJ8wlT2kuGhaSVRvssFZ+idJUtMBbz4fJjIOBSUP/EL86gIc4LS92iGq31kWfVUD1rL7fJmVdSg2nzj+3Og== 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: Gregory Price writes: > On Sat, Dec 21, 2024 at 01:57:58PM +0800, Huang, Ying wrote: >> 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] > >> > >> > 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. >> > > We discussed this and decided it was confusing no matter what we did. > > If new data comes in (CDAT data from a hotplug event), then the weights > are now wrong for the new global state - regardless of whether the user > set a weight manually or not. This also allowed us to simplify the > implementation a bit. > > But if generally we need to preserve user settings, then I think the > best we can do to provide a sane system is ignore the user setting when > re-weighting on a hotplug event. > > e.g. user has not set a value > > default_values [5,2,-] <- 1 node not set, expected to be hotplugged > user_values [-,-,-] <- user has not set values > effective [5,2,-] > > hotplug event > default_values [2,1,1] - reweight has occurred > user_values [-,-,-] > effective [2,1,1] > > e.g. user has set a value > > default_values [5,2,-] <- 1 node not set, expected to be hotplugged > user_values [4,-,-] <- user has only set one value > effective [4,2,-] > > hotplug event > default_values [2,1,1] - reweight has occurred > user_values [4,-,-] > effective [4,1,1] Another choice is that if the user set a value, he/she set all values effectively. Even if he/she doesn't set the other values, he/she thinks that the other values are good, and more importantly, the ratio is good. If so, default_values [5,2,-] <- 1 node not set, expected to be hotplugged user_values [4,2,0] <- user has only set one value, not populated nodes have value 0 effective [4,2,0] hotplug event default_values [2,1,1] - reweight has occurred user_values [4,2,0] effective [4,2,0] In this way, 0 becomes a valid value too. What do you think about this? > So default values get updated, but user values get left alone. > > If that's sane we'll fix it up. --- Best Regards, Huang, Ying