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 040BCC19F32 for ; Fri, 7 Mar 2025 15:56:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A9C6E280004; Fri, 7 Mar 2025 10:56:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A2605280002; Fri, 7 Mar 2025 10:56:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 89F92280004; Fri, 7 Mar 2025 10:56:08 -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 68304280002 for ; Fri, 7 Mar 2025 10:56:08 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id A22BC120D07 for ; Fri, 7 Mar 2025 15:56:09 +0000 (UTC) X-FDA: 83195206458.13.08A43C3 Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) by imf03.hostedemail.com (Postfix) with ESMTP id C685A20008 for ; Fri, 7 Mar 2025 15:56:07 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b="m/+3xg6U"; spf=pass (imf03.hostedemail.com: domain of gourry@gourry.net designates 209.85.219.46 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=1741362967; 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=F0TiHKXqWd6IMW2qctayQwsULMdhPuc62rBxsjJYxs4=; b=Jl0FlKmwDXkvMsPzS/qkWB/AhQBF9G2Wji/fZ3HAA0i/8X+2Sjy0CZsOobxT4tXzNL/WGA Pd4b8E9eeeKlIVhJTYv1kYAyAh7ctyToB5i309VNBSJ2zyryf+vnNaVEMZXwz/3ckFnPot H9zY/pKi5LXTeekt3b87TDLblguzrqs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1741362967; a=rsa-sha256; cv=none; b=rZ0nVflYyaL6en0NiOdGcPO7tNVWS1zmlyYBzgOB30nV2cgrXOcEF8Osbq9HnlLaxt/p6F 0bSxG9xn4jhgzXafFCcML4vU5noB9fSzINzbefSwmVWLO+0oiceT/S4xZHd/2yBqh3aSHR FNHCzmqkBdnNZ7ohKAYxps1kwGwOutM= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b="m/+3xg6U"; spf=pass (imf03.hostedemail.com: domain of gourry@gourry.net designates 209.85.219.46 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-6dcd4f1aaccso30830446d6.2 for ; Fri, 07 Mar 2025 07:56:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1741362967; x=1741967767; 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=F0TiHKXqWd6IMW2qctayQwsULMdhPuc62rBxsjJYxs4=; b=m/+3xg6UeRSxPJ0cCw1Q0fmbNa9ZwlfP0JX0bNLY17C9TfJAC3OSGLt4272jDmZbZg X7o/1UmLLxMPJaL8BHs2+CCc+Rf3n5JaR/VoDk9qKr36ol05/GF9l2UdkkfR5xLsHw1T Miz9GLwO2eiivsVHwBJZaKMZNUqSGbcEJ3HHTRPaXSbenTbwJKCeqImXLp1mNye2n7Pz loWPFi992Z5JBHtkYT0zgguuEZouzEn3b7XfeXPerGMKeuGwqTRGw9L/8HIBYgzEQpIY BKXCV0h/tIe9UyhPYnfLkziQOLieRAOtjBQejHVgNvgxe0eJEuJYlhjojIIHUpmOSpCB Xvuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741362967; x=1741967767; 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=F0TiHKXqWd6IMW2qctayQwsULMdhPuc62rBxsjJYxs4=; b=fqMZWvyDUuBu4jqGKFOuIdmS1oLISbZGU1TGL/Skvud8r0jyJj5LgC327l/RTAvJPd MAWLJVFcykGPiEOw6LkenuaDdEguKmMkaYsUAmbpvqQ5dZbZ9v+QM326wAX/6p9aMDc7 7sUFOJewZrqmepd0R+m7HX0gRSejIuCWDEEv0JN3ieL6SqZc25JZ6sqaEKW6AKiXVAgN tZc3aazTtArjRk4UZvHTpyhvP4es5Vh8q7mb9OZGFEEHNEFhV1PmK4gqa/GPlRNBaLPW AxPu/9se8U5Ui/OgA2diTj51kKfRX4TuJ5W+JrK7D/H++iwYSixoutzbgR1k8jcaP+fT 8lnQ== X-Forwarded-Encrypted: i=1; AJvYcCUPm60dZGXZZY7Mir4O8Gr0EOTdD2uQeVs++kWFzycbcmR9KKv3A78/ylFHRYuOVILIILc8S6Aifg==@kvack.org X-Gm-Message-State: AOJu0Yw/yvN3CLj8nJUbRwpzQYzGxSwxyYMtBbyfLqvObwKNAQ4LWKlD E/0E+ltMmmEQng6zh1ztsGfBn2YeBT8aQ0LyViZW/XMUF0N66kET8dKIyySe2qQ= X-Gm-Gg: ASbGncuQIv8fDaZR9v5TD6QlReyzxhGBXC60MXeONyzuO6aLNWloirZPkU4Gg/VHubT msksS8DqZdvf7sIFeRgrdtzgRopGJXJwVJXOLUtfDtlipsYjxkjnN0d0TSnIOmUqN6UDtQdl/XO a+hGn9hig0SkL7eWRRRGC5qo1EqJTl+tof5QQIw2zZrxFHknT6/w1PbR8iPUSRyNDo39zrOPxMS KZ8aVnRXUlYcUprndL3s4eq676v7OvdyBXRNVMfrf7OrjVINyxZoadzxbBRdVlu36joVKjA8NM8 XKv4odNOgqI94GbwjY+OirxYTNmBzDnitPffoRL65/8x+DLmSZniIbrEZhmVUihi9nRixEgagnF YxMFblcqLKqEINEiwEagJvMpAypc= X-Google-Smtp-Source: AGHT+IH7XtAc5bjChzL2elX0bnoZp9NgerKacTnFzM1lw35j/6Z2QDCgMu/vxv1bPHPCUZ3/1APJLg== X-Received: by 2002:a05:6214:29ef:b0:6d4:25c4:e775 with SMTP id 6a1803df08f44-6e9006203a1mr52531866d6.15.1741362966855; Fri, 07 Mar 2025 07:56:06 -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 6a1803df08f44-6e8f707c4cbsm21148286d6.22.2025.03.07.07.56.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Mar 2025 07:56:06 -0800 (PST) Date: Fri, 7 Mar 2025 10:56:04 -0500 From: Gregory Price To: Rakie Kim Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, joshua.hahnjy@gmail.com, dan.j.williams@intel.com, ying.huang@linux.alibaba.com, kernel_team@skhynix.com, honggyu.kim@sk.com, yunjeong.mun@sk.com Subject: Re: [PATCH 0/4] mm/mempolicy: Add memory hotplug support in weighted interleave Message-ID: References: <20250307063534.540-1-rakie.kim@sk.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250307063534.540-1-rakie.kim@sk.com> X-Stat-Signature: itecrbgwm3gx7fgx5u8bktpef6ktfwha X-Rspamd-Queue-Id: C685A20008 X-Rspam-User: X-Rspamd-Server: rspam01 X-H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8rlQq8nkgOWq9ZCBtm2mKhipdmSvgk0Cj8mF215YDGDPQRcNolXriZSnZ4yUqVjX2Zz7rPDS6lVbqZnm7yoqxk/YJC9xAOdlgGVXgPuE/RDSziiDdh6CIATbAohRxH1i5fxXwNOlSnK5ZqxycC/KAwhyjCwifodw+kdAd7Lat/9aeqE1XE2L3gBrCEcN1Yp2PeioNHzp13mDRBdVuVcDzmr7Z/iwzsNr73qu3fhsfPuFD87qjWVLb+pNKGpfAPnQ8Udes+uxr9XQH9gz4TZ32+23oLgXWS7dkb9TN/Q3JxV9znC0kufgZFVK+wQpTfaKpx+mmRhyz4uiiQYHlJsS4akdYYyYGx1akv1CZK65zo2g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000022, 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 Fri, Mar 07, 2025 at 03:35:29PM +0900, Rakie Kim wrote: > Unnecessary sysfs entries: Nodes without memory were included in sysfs > at boot. > Missing hotplug support: Nodes that became online after initialization > were not recognized, causing incomplete interleave configurations. This comment is misleading. Nodes can "come online" but they are absolutely detected during init - as nodes cannot be "hotplugged" themselves. Resources can be added *to* nodes, but nodes themselves cannot be added or removed. I think what you're trying to say here is: 1) The current system creates 1 entry per possible node (explicitly) 2) Not all nodes may have memory at all times (memory can be hotplugged) 3) It would be nice to let sysfs and weighted interleave omit memoryless nodes until those nodes had memory hotplugged into them. > Dynamic sysfs updates for hotplugged nodes New memory nodes are > recognized and integrated via the memory hotplug mechanism. > Subsequent patches refine this functionality: > Just going to reiterate that that there's no such this as a hotplug node or "new nodes" - only nodes that have their attributes changed (i.e. !N_MEMORY -> N_MEMORY). The node exists, it may just not have anything associated with it. Maybe semantic nits, but it matters. The nodes are present and can be operated on before memory comes online, and that has implications for users. Depending on how that hardware comes online, it may or may not report its performance data prior to memory hotplug. If it doesn't report its performance data, then hiding the node before it hotplugs memory means a user can't pre-configure the system for when the memory is added (which could be used immediately). Hiding the node until hotplug also means we have hidden state. We need to capture pre-hotplug reported performance data so that if it comes online the auto-calculation of weights is correct. But if the user has already switched from auto to manual mode, then a node suddenly appearing will have an unknown state. This is why I initially chose to just expose N_POSSIBLE entries in sysfs, because the transition state causes hidden information - and that felt worse than extra entries. I suppose I should add some documentation somewhere that discusses this issue. I think the underlying issue you're dealing with is that the system is creating more nodes for you than it should. ~Gregory