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 3CA01C36010 for ; Mon, 7 Apr 2025 09:49:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CE61F6B0008; Mon, 7 Apr 2025 05:49:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C92056B000A; Mon, 7 Apr 2025 05:49:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B3E286B000C; Mon, 7 Apr 2025 05:49:32 -0400 (EDT) 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 938916B0008 for ; Mon, 7 Apr 2025 05:49:32 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E8DB214114F for ; Mon, 7 Apr 2025 09:49:33 +0000 (UTC) X-FDA: 83306775426.19.AA7AB77 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf13.hostedemail.com (Postfix) with ESMTP id C030420010 for ; Mon, 7 Apr 2025 09:49:31 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=none; spf=pass (imf13.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1744019372; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8x9tKcOxnDqQ4/NhO1QV7blV/SVnzfjwCCWA8Oxr3H8=; b=jnip45yDp66QAN6V0TtFgjfU7QQ1bIISJvCgVF4wzq+UqAsQhnHrLKKTwyRoDkCpRjTrZl uk5Nih0QbxcQHOxpfjXFg9Mu7OXBYfixGpD82nDdmrGdFQjtEsu1793vF+Nl/u+2e7AXzW j73dj9qNyyMG7bR2j9E2D5wq2rWb0o4= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=none; spf=pass (imf13.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1744019372; a=rsa-sha256; cv=none; b=hJLWgtkNd8Zwt3EoUcNqsPex/qruXG0nHOPAUs609QeeRrDwzYlC0wM5KA82VPS1jMWIvV yQx6y7LIVRFP8r6lJVDZugfUM0p3MWEtVfSszUn/nRAKTTcXYIOxVmjhiM6jRFtYvw7jsv gQwPmJwj7oYQDNB84X5ADi1R2iL+Xw0= Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4ZWPXz3SPbz67lLG; Mon, 7 Apr 2025 17:48:35 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 701A71400DB; Mon, 7 Apr 2025 17:49:27 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 7 Apr 2025 11:49:26 +0200 Date: Mon, 7 Apr 2025 10:49:24 +0100 From: Jonathan Cameron To: Dan Williams CC: Rakie Kim , , , , , , , , , , , , Subject: Re: [PATCH v6 2/3] mm/mempolicy: Prepare weighted interleave sysfs for memory hotplug Message-ID: <20250407104924.00001dbb@huawei.com> In-Reply-To: <67f0157e498c9_464ec294df@dwillia2-xfh.jf.intel.com.notmuch> References: <20250404074623.1179-1-rakie.kim@sk.com> <20250404074623.1179-3-rakie.kim@sk.com> <20250404140559.00001112@huawei.com> <67f0157e498c9_464ec294df@dwillia2-xfh.jf.intel.com.notmuch> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.177.66] X-ClientProxiedBy: lhrpeml100002.china.huawei.com (7.191.160.241) To frapeml500008.china.huawei.com (7.182.85.71) X-Rspamd-Queue-Id: C030420010 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: z9tdp5y3jgf4qr8agdqt4nudeet7g8rt X-HE-Tag: 1744019371-42300 X-HE-Meta: U2FsdGVkX190cEHMgrnfzipe76wSFs/dSht5Z5LqCCa1S9dXUVy5KD5aY5q5lyfZnqzNOTnJOsuMMTCSL/YLT6/FFg5NrLcIcLziDJnE5F9aenvPkpBmPjo5oM2Etm4mDUzhIv0N479ommIb4FGJF9pGwy80GU4oN5zCSaGL6zMMIW4fM42y9rVrlsX5wZfHfDy447h8lUAKLPkEkjttzqFq8SlOeAFwPA2xo+NpyjrF0jiIA7yFhJ5Xt6DCLUdTDAQl3Z+m9JrVm/5CSct+cq4ylTgWNpQ8qS1PmzAKhcbAgDBK4RtIy4SB+l4UhaV/WQXyUN6FuB5B4g4UILkhtDA00nH7HlvZ+J12VGlz3inqRZi0NwYs4hVqRAmW6QNcuscusZLfVxachU3YLpLOfz2pDAAUBEQN15IGEzm12MFbJ8COsOuTjhTknh8L9UfmZetS5z1g9GRtKbe3HgJ0xMF2arxKvx6NO1Yf/HhJosAzEZfC8rREU6lAXCAunlTbcKqctJiLmKXADRv28BUondS0+1dML79UMpWWkAAr7kZTrCK9gXy7XFH3nBEiKFOqSEheTwKpGptTwhysACbfRSGUYEc5DHnl/r4No7JZek9LhuAVs8KuLZGXDPHQnMQ/gyVcBch7aCr0eULejzNOvdy3m0njayAh2CdmvVt6Hs8D/ymUJqTI39UAkZJk/hdidmd5gmeZm1+PE8RJlOhRDrml0Ycg/VOW31Zm2Pt83L1hjidydVEf7lQjW4wheO+YyyK+0/pKfDvzuW2hvs+Mwa8pEMECXfY5vPLXmqhSaHfNsjttgPGdWZ+RfjrVpng551fmtXLogrnZ7md41zuCFDqlq323BdEEy5f4nF3mwpuaDfRc9cCjnXDfUvK1633PX9Sb8WvsNtZahnHE4rMD6IcnPjMp0miWI6jEMzbHSC8= 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: On Fri, 4 Apr 2025 10:23:10 -0700 Dan Williams wrote: > Jonathan Cameron wrote: > > On Fri, 4 Apr 2025 16:46:20 +0900 > > Rakie Kim wrote: > > > > > Previously, the weighted interleave sysfs structure was statically > > > managed during initialization. This prevented new nodes from being > > > recognized when memory hotplug events occurred, limiting the ability > > > to update or extend sysfs entries dynamically at runtime. > > > > > > To address this, this patch refactors the sysfs infrastructure and > > > encapsulates it within a new structure, `sysfs_wi_group`, which holds > > > both the kobject and an array of node attribute pointers. > > > > > > By allocating this group structure globally, the per-node sysfs > > > attributes can be managed beyond initialization time, enabling > > > external modules to insert or remove node entries in response to > > > events such as memory hotplug or node online/offline transitions. > > > > > > Instead of allocating all per-node sysfs attributes at once, the > > > initialization path now uses the existing sysfs_wi_node_add() and > > > sysfs_wi_node_delete() helpers. This refactoring makes it possible > > > to modularly manage per-node sysfs entries and ensures the > > > infrastructure is ready for runtime extension. > > > > > > Signed-off-by: Rakie Kim > > > Signed-off-by: Honggyu Kim > > > Signed-off-by: Yunjeong Mun > > > Reviewed-by: Gregory Price > > Hi Rakie, > > > > Some things I was requesting in patch 1 are done here. > > Mostly I think what is wanted is moving some of that > > refactoring back to that patch rather than here. > > > > Some of the label and function naming needs another look. > > > > Jonathan > [..] > > > @@ -3430,27 +3437,24 @@ static ssize_t node_store(struct kobject *kobj, struct kobj_attribute *attr, > > > return count; > > > } > > > > > > -static struct iw_node_attr **node_attrs; > > > - > > > -static void sysfs_wi_node_release(struct iw_node_attr *node_attr, > > > - struct kobject *parent) > > > +static void sysfs_wi_node_delete(int nid) > > > > Maybe stick to release naming to match the sysfs_wi_release() > > below? I don't really care about this. > > I had asked for "delete" to pair with "add" and to not get confused with > a final kobject_put() callback. > Fair enough.