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 F157AE77188 for ; Sun, 22 Dec 2024 16:55:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 490766B007B; Sun, 22 Dec 2024 11:55:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 440766B0082; Sun, 22 Dec 2024 11:55:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 308036B0083; Sun, 22 Dec 2024 11:55:02 -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 146CA6B007B for ; Sun, 22 Dec 2024 11:55:02 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id C6206A081C for ; Sun, 22 Dec 2024 16:55:01 +0000 (UTC) X-FDA: 82923194382.28.6DE52FF Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by imf24.hostedemail.com (Postfix) with ESMTP id 032DF18000A for ; Sun, 22 Dec 2024 16:54:54 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=DJPjIrJq; spf=pass (imf24.hostedemail.com: domain of gourry@gourry.net designates 209.85.210.174 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734886465; a=rsa-sha256; cv=none; b=2lCFs3GR/Y9mbmDpMq3HxsiBTsquyGQKWcAkr3Nnvui9qzNSv2RJtGE/2LcFQN8Nj1STJe VHQIvY/zG8MTQsyqBh9iestGaHTX4cwMMgj/xVeXkPVf+YkkZ6nmUlOUQ+KrPLlEfywige qbNtxb30tgok3kNlxSYD8ESIifmIGGo= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=DJPjIrJq; spf=pass (imf24.hostedemail.com: domain of gourry@gourry.net designates 209.85.210.174 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=1734886465; 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=cwFeOkelH/d76YL3GbRBJ14O8JH9pLtT8BqJFo+zIGo=; b=toUpKU+QCto3CXr+DKBLYpholWaNj9V0ez19E8508LcmcoiQWaGJa9XXzEngEhritwfPee ukpb9II1y1E8c37L0jCslFUwihTqL5TkRKc0judl39iyRNP68jpc2vqBzm3XfIIYjKwRRx wrJ7oD+wnuDtiYBjkhXiCzhNIg5BwDQ= Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-72764c995e5so2116898b3a.2 for ; Sun, 22 Dec 2024 08:54:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1734886498; x=1735491298; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=cwFeOkelH/d76YL3GbRBJ14O8JH9pLtT8BqJFo+zIGo=; b=DJPjIrJq658fpdLwE4v1CNmmoes4KO0VKUkkasoXB1RtYzAfMBkNLhvVgVELMhuSPZ YbPhLOZuj6VzjChv5U82INOkn1g2ClXhddCOTlSEeeR4WXSFacze0QjM+UtW6w6LXbjX u3mi+BVEOY4SSFUdZMcKqniiWDHlmv5cVPR/b77KtiDjQx8IZu7gcOldkFfb8bwuomOk RLX8291rRE12Pp56w6LgfEDfaNtovKSwTSfmh3XoPXlBmwPr8H0PcE6jAo4jpO77Lawf LxJ18FdarqAciYrxfClSs51I8qcY3OPEuKubFwnG9w8/eCvo5HA+VGAVrusSVnwJ/pvT ZvFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734886498; x=1735491298; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cwFeOkelH/d76YL3GbRBJ14O8JH9pLtT8BqJFo+zIGo=; b=Co1cXo2ODfpWsNfpZy5RMMgDMwyyJINWxqLrOxh3mjlMNFNPjMHldCrSKy2eGcL5Oc nUQ6c22jCncwt2Jg9wqDOGYe3dudcgxxQswyft7WtI3t5sYYncozwTz16sK6gKnGodQN ZyP0xtzOOwDw+vzf/oPk6cezcYW7074lQubE6IVJ8DjmhTfeoicha145PzI6u+eje5G+ wb8R4eEIA8OwAZeYxqpO7b6molde/GPbv6FyDv2Au2R31XYgygPBJbP48Ge0KO2256ey YzNRbL9W4HIWSCNwp6Ryqn6I5D8vBrtJCMiPiwxGBt7w6e+0MZoGpaCuKUMOBmO2wgja LEyw== X-Forwarded-Encrypted: i=1; AJvYcCXdMTXp8kD09RZZUhLJPTKlbnFuvD8EH+JZrcIZKFwMSxohRW/gwvuV/jxfBn4UMBlBqKT0ticgLA==@kvack.org X-Gm-Message-State: AOJu0Yx1Xex+/KScd40KTo+rUybLEAcwoGeV/6QYLfOO45wrl2wWweb4 Npz2olp0loz4ay62i1pAF13g/+T/fNuWhdcHRuS7Kc74NgRQbC6rQ3DTjjMh/hY= X-Gm-Gg: ASbGncu6BxKkPUPHa0cBwKIGKFKRrIf67QPruf8/U/2sGD4Bjh2vS4Lu/nWwkE7RqRF nK33osfTRmeKuRACSwIUwbCw4k6L+z4PZGTXq5txRt/P0nHHVS8zag7VKSDg9HYOjhjcavhQIDf 4yRZCDcOO4g1E5pA9Fc+VQ8PdsPPlY5J7Fm89LlLg6dhG2gc+Y41PggkdGGRAwwFFPR4fbpIevz a9n7lGtTjtWgehoAHA+dq8JdqErGgBNTIEaJQFdcTo5mf0NinJ03NwbAr9ip5sRFoOKjqEgmYz/ 3/DIpjQ= X-Google-Smtp-Source: AGHT+IGHojiWxv+R+SlzYUtKZ8OeWCiY4TrI+YqHVqyA+5s7qFOMJpjjEP2lL3tQQSQnG7005vWmfg== X-Received: by 2002:a05:6a20:258c:b0:1db:915b:ab11 with SMTP id adf61e73a8af0-1e5e04946b1mr18102850637.24.1734886498529; Sun, 22 Dec 2024 08:54:58 -0800 (PST) Received: from gourry-fedora-PF4VCD3F ([75.167.163.61]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-842aba72f44sm5911738a12.15.2024.12.22.08.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2024 08:54:58 -0800 (PST) From: Gregory Price X-Google-Original-From: Gregory Price Date: Sun, 22 Dec 2024 11:54:54 -0500 To: "Huang, Ying" Cc: Gregory Price , 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 Message-ID: References: <4ddfa283-eb64-4032-880b-c19b07e407e1@sk.com> <20241213195754.2676135-1-joshua.hahnjy@gmail.com> <87jzbtr315.fsf@DESKTOP-5N7EMDA> <87ldw8i0id.fsf@DESKTOP-5N7EMDA> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ldw8i0id.fsf@DESKTOP-5N7EMDA> X-Rspamd-Queue-Id: 032DF18000A X-Stat-Signature: 6megyk9hxk4jwxrbfww5oisby78wt9dz X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1734886494-830266 X-HE-Meta: U2FsdGVkX19nl8rTGeSLSxw/KW33XzIcB8Cg15RCjo2Qtg30r/p8J+vgGBTQaTeBMz6wrYMImrRrBuUK7ScUuQAy9v9jJg5OFyo2+KKOkoBg/UGvi7FXGsjfUE1GRHIf0/jkHLduIZQRnmqw8ZSkREW6+0yGmXl3Fx45RGGrsqVm/r3x/oA7s8HRy2G4DUfyhVLIMNxwwBEendIvtqXXp9MIlRNPpgRLT546w/7CGok0Vle5NeyVwcL5HyLb0wMYSsIrZlQHZyzzMmAiVmAJdAb9XHPmiuiPVQzQRw7k27mJ1SCcEApIdmT4TOvCvCHySVOzkvMr136O7G/VIr5grZcE8sEM0/qipBrUsrLjSaUmgwhzM39OkCbvnE8mh8LcmqNMGNig+aNmu4ExGKhAdYm6KhGWLB5yZrpO39ekiY3+nT4p9Yy6M+pTLMLUYFi8M3Fex+dUAOLW44u/ZlDgcpd9FweOT1qcVcsgFCeZ3uabn4tSLUUTwjFgJ58LVfZJ3AbA1eGb9WXuuNaQq7gQ5zwYKZQDNy0u+xWZNjiETWpvPYc9vdAmtcHAyvGKHPew88KmprSsZpn514YWJwBceFF/1Ijx6QcE1IkTw6NYbwZZW5xqJLimYqXQVtTr5ssRIAxPHf/pelNou1WjFh80ODKBRuymb1VYKdTfie1dbu/DlirdoXDeLJPjhZjrDvHVP1H5EiUV6SZEls5/dOLZdM+1l6OSgXLa5Mb8xvJQslrpc/GfYollhVS/9KiNRr2mY60iHRLHS5nQAcvFAPzvv+hXh6uhB5R5aqP7yT48LT/SaqPU4HQ85YD346bV9hpIEqdzMSkgNg+4S+26TDa6Q3rwvr867Wz+KyjuF3ZwuWLcSa0dO+mKXV9ORlNECLFW3GTWl0R2B59kJYtLlco9OsxZp39ge5X5/HpTlpu3xEFXOmPrjKyQVIfT6ursVSzTnFHnpuHj7daLcq8r7uT aeurcwi4 45bYgwHK/iG1Fu1uNuvXSLWyNRfrWtgjE9pA4K7tTubzWKB+qJ1LAln2gaiBGGMfkcOcpQ9+ptjYjwpt+FspLeOyS68f+QNT7NUoTEp/TD/NBH/4unI6j6vPv2vrKnxk1eoyM9GPDg6YSRZZ4P1k43VFhRfOeiRcF4mUpbu0uGSMWKbGXfJJvMyobF1hK6axRD05s+uxTc7uZs+ApS4Wy0FqKvicGaqlOtyZ7sHYDFfwPVEvVAvi+OLEzEFgvT2l+2sPVVMO1aCtPfJRJpGAYMaIDnZqSbjtYtr/kNjJQijgKjaN6UYJh13kqlkzAtid5n0+Fn2EL5dyx59GWLhZAjLz3iS2SeQ7aJ5CuCThvAI0YywNa5Lt6+gxs9K6Zaawn74U4qZd3NNuKOcnUSvjXCOeeO0t57AXirGKMtr5UYH6BeQ9AUk+b7ihmofGF7otY0XFOvf6oR52VrnvuZL1Y7VikLWVJt+pO/hqLKDrIEMSAyeVBcVcypsRIkA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.148397, 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 Sun, Dec 22, 2024 at 04:29:30PM +0800, Huang, Ying wrote: > Gregory Price writes: > > > On Sat, Dec 21, 2024 at 01:57:58PM +0800, Huang, Ying wrote: > > 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. This is probably the actual way to go. > 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? > We decided when implementing weights that 0 was a special value that reverts to the system default: Writing an empty string or `0` will reset the weight to the system default. The system default may be set by the kernel or drivers at boot or during hotplug events. I'm ok pulling the default weights in collectively once the first one is written, but 0 is an invalid value which causes issues. We went through that when we initially implemented the feature w/ task-local weights and why the help function overrides it to 1 if it's ever seen. We'll revert back to our initial implementation w/ default_iw_table and iw_table - where iw_table contains user-defined weights. Writing a 0 to iw_table[N] will allow get_il_weight() to retrieve default_iw_table[N] as the docs imply it should. ~Gregory