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 876AEC36002 for ; Wed, 9 Apr 2025 18:52:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3198E6B0199; Wed, 9 Apr 2025 14:52:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2CA216B019A; Wed, 9 Apr 2025 14:52:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 144676B019B; Wed, 9 Apr 2025 14:52:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E60DF6B0199 for ; Wed, 9 Apr 2025 14:52:17 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 070E41A1377 for ; Wed, 9 Apr 2025 18:52:18 +0000 (UTC) X-FDA: 83315400756.09.6D7E34A Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by imf12.hostedemail.com (Postfix) with ESMTP id D7ADE4000D for ; Wed, 9 Apr 2025 18:52:13 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Vi5XIYpb; dmarc=pass (policy=none) header.from=intel.com; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); spf=pass (imf12.hostedemail.com: domain of dan.j.williams@intel.com designates 192.198.163.18 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1744224734; a=rsa-sha256; cv=fail; b=rANWgWmi9sUQmLSlsPv8peWgk/T4nVKlgQ4/1L0uTnrqyQKOIDBMiT8HACMUsD8boJFm+y ZfWkFOLNzuXGPQvKFWL5rwM1NcqCHkdpEyM+aHoIEsOVZh2UD+5/i4wjOWmU6wRFzVzOAJ NcLgzuTPpe50R8CQPUhAeVC1fiRsBNs= ARC-Authentication-Results: i=2; imf12.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Vi5XIYpb; dmarc=pass (policy=none) header.from=intel.com; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); spf=pass (imf12.hostedemail.com: domain of dan.j.williams@intel.com designates 192.198.163.18 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1744224734; 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=8mlBATlTdxhb6PAfanlMfdmDzBPjlNDbx74Obl8O9nc=; b=IwvZdaOv6VspacU3HScF1CkAgeN1gLwfem+WTvoVnTlfxZh/FxOhixcpVIXTfm+z9L3Rh2 9qfnb+YsF24I9Yu3UmhInoNS/Z1IvQ7Ib+HDf9NRL9Oi6wr6gHEPZHy4/1/OTonWt5RhdU gKQbtqwEagVFI+jPbLKoZ/kLhpQtEmg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744224734; x=1775760734; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=T1jL5QYIe7qGVD+puVj1RTECQgFKziDjDzsipJzb5e0=; b=Vi5XIYpbLJO1HbDsqePO1uWMYgsbiO1M4fG61U1Con5fW23kNB3Md3ZF WvpEJ65MtTvmTmbLONiaqlerekLUwaqRlKhl87WGPtxgB4e1Ab4Iu77Sr LImjHFr6Y4ocSuwU9JsPoUKbqUCpksOxuvJf+FJKNsy3tXHazgus4BKsX uQOyJHtkrLUJaSNoay4tUdPbJ62Q9M5j/PCMRDmNWUrAeMoyo7Co7PpTB lT0BOvlLmldXeVvbe0ygTRalGL6Sp22DnJnRPT2t7HI8qO+f8Cemn3JkX wOtPCCWdliEfmR/HLEpJ9t56Jsw5Q6eRZ5fSem8Od+UDJFk58WYGGO221 w==; X-CSE-ConnectionGUID: qqV3qfFqRsiFL3Y1XCL19w== X-CSE-MsgGUID: 2tOe6EbnTwet7N+Sj2SnWA== X-IronPort-AV: E=McAfee;i="6700,10204,11399"; a="44963948" X-IronPort-AV: E=Sophos;i="6.15,201,1739865600"; d="scan'208";a="44963948" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2025 11:52:11 -0700 X-CSE-ConnectionGUID: QPehiNGJS6WpZYge66kLpg== X-CSE-MsgGUID: FiPBqwezR1eLprBt1GDdAA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,201,1739865600"; d="scan'208";a="129504255" Received: from orsmsx903.amr.corp.intel.com ([10.22.229.25]) by fmviesa009.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2025 11:52:08 -0700 Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by ORSMSX903.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Wed, 9 Apr 2025 11:52:08 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14 via Frontend Transport; Wed, 9 Apr 2025 11:52:07 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.44; Wed, 9 Apr 2025 11:52:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PsYGeE99tXEq0PBFy60B4BHywnz3p1TuX3y4iGecAMAH4v3Y5kxIGhnnyucGzlmWfI5N523GHxN4ETL5kK7LceQ7PMoYwI/b6POHjCIxgg4rzoqYBhwaIQ//ZJ1HCrMG/s5DxCjeSF7MlxuJ99lvbJUk0Jjp9QAed9ffCWIoK692oQfYSUe4hMV0IIvFizHhEW3xeMvESBtws0a4Wa1CwJ93ucowLaFqmYIvUsSC2ehA27r+YaVGtxcEnFOsHiz122wGfCGHq49xFuDTX+KhEPLvtniUVa/eaQi05ztS/Ylfhd0dnwF06cdhNYlnMLHH212pecA98lBW7TFJuR6TZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8mlBATlTdxhb6PAfanlMfdmDzBPjlNDbx74Obl8O9nc=; b=xT3/GCqMeutSHcqJzSWzGe5Ebt+IknFLnEizVTYNXZzgo5FVgbAlvPcZWc8RpMp95w3yXJJE0332zm5Lf7r/XllRz7NpL0fZGhpKd9VUibZHKMdJh1I+fjAdgRlBWnQADYYEo2E500D+noLkMA7nnhxLDjpGU0H/cbL7/J3rwi/CsBPSkNRRoRGYd0aMWMcnseT6hMWSb5B2Y9NiU+TiQ9KsUCuH7yFnpJX4XqPEhcUOGV42Fh+4lWkk3jl81Pe9DZvMzzuG0D6VanlsjOf4VuST152ZZG1z3gnGDuNPnUDik/ms9pH3x6GAth/aLQ6rUOY8UwMz/rUDTkRauFwAOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) by SA0PR11MB4640.namprd11.prod.outlook.com (2603:10b6:806:9b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8632.21; Wed, 9 Apr 2025 18:51:39 +0000 Received: from PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::6b05:74cf:a304:ecd8]) by PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::6b05:74cf:a304:ecd8%3]) with mapi id 15.20.8606.033; Wed, 9 Apr 2025 18:51:39 +0000 Date: Wed, 9 Apr 2025 11:51:36 -0700 From: Dan Williams To: Rakie Kim , Dan Williams CC: , , , , , , , , , , , , , Subject: Re: [PATCH v7 2/3] mm/mempolicy: Prepare weighted interleave sysfs for memory hotplug Message-ID: <67f6c1b89cd6a_71fe294bf@dwillia2-xfh.jf.intel.com.notmuch> References: <20250409055618.512-1-rakie.kim@sk.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20250409055618.512-1-rakie.kim@sk.com> X-ClientProxiedBy: MW4PR03CA0275.namprd03.prod.outlook.com (2603:10b6:303:b5::10) To PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH8PR11MB8107:EE_|SA0PR11MB4640:EE_ X-MS-Office365-Filtering-Correlation-Id: 43e1f4ef-9384-4933-adc8-08dd77978fcc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024|7416014|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?/RtwYJpGJQS4uzJAR7645cLGUb9oDrvFxs6s7rWlJTcELhONk7tfF0I8EoRy?= =?us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IAQhknmIhxdTrAmBpb49lrpM7i+qL+?= =?us-ascii?Q?/GMl6dYBiAFeLVEwXmZXDfFc5NYG4bUpjBH7wATIiqpoOXpGADAlwKCdm976?= =?us-ascii?Q?e/Mwdk1mI4mmgIqo45pshuUJjlfsdI9OBze0TkklN/vyEOpE778F4fff3wll?= =?us-ascii?Q?1hYpsEjuXoDU5FWg0hrfMBq2Q35ED5u0Jmgc16AnXVzMWXsDXL+oix4dpR1e?= =?us-ascii?Q?4OaJhIrpJLedu7sA+fx5tpLLGQmIe7xt4Kb1qAwkGZOld4kYXBefCqjuFbOI?= =?us-ascii?Q?4UwJDMaxTpBj5nop7QT0tJjlLI5iqrOJEzvQOBQMGW52gIICDkcG/9MNWMr6?= =?us-ascii?Q?woCgnGfsGP4/gcKgaZFfMjl+30NGsSm1Y5LVlzyQELlzo0Ao6ndZimQHB3jX?= =?us-ascii?Q?sfwTFqQ5qMxE/Ks2KCh4ZTomTGZ8or/rU7duv16CPOVeuLduy1K8k/M3fDMs?= =?us-ascii?Q?u5fTSyXttcu552HtF4BmG8qQOjd5o+Sr78vMe4MOt9FuiyTvgRNZppTziC2V?= =?us-ascii?Q?5zpTYf1g8GA=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH8PR11MB8107.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024)(7416014)(7053199007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?m+sGjF8DsYp61woVxou7U/LUd08rnNCL5FJtvIr5rCWOpdioZz9LvA8vBZHz?= =?us-ascii?Q?j8oveVNKbmHF4zVn/qZXT2MTGml63VG6TI4GLGs5bTABP0YlFJ8RSje1NER/?= =?us-ascii?Q?nhN/H8miH01tWocFLXZ/RcS9bbtZanyJTqarvMKXKcKAKzGkNK5/7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ntdNiOAmAGt0OKiFwMyEwe1c4x4OnmG5?= =?us-ascii?Q?KxYfsYCdJTadzogH1sPJASTm8r9JC/kdLLllr9m+qPfyJ+L5UeE8SJm3r8+q?= =?us-ascii?Q?A5UtyCcbbrOAr1iZGuqXTo5baw33x6ywp92ZxXYdJSvdv6ib3IwFMhw3nDks?= =?us-ascii?Q?pAXKPXyIEOAOCAEqsRBNYtlHfFbq/dfjhbd32A5fU9c4qJE0kQM1V6VQ+11z?= =?us-ascii?Q?oXqmwZFpZhgmYvNIFqUWt74olTrPg81VJuX2OhtueaKWgDS2NZUZR43Y8jWn?= =?us-ascii?Q?8UCLxTs6p80b85s8Yuc3EcMqAgPE3Cjhw7frfQncgE7XaZ/CW5RNAI3P9zym?= =?us-ascii?Q?T+hzcGmCtjlCieDONeqwhDmEvS8tK9/3YUZa6HQGSqiNQYvjyhjPrXJ++6u/?= =?us-ascii?Q?ZMOtNBLDdxq0qYALIHxBHfSVWudVgrBWVSBlTBBcthRFtLsVe3NoMJpqvUZk?= =?us-ascii?Q?4ny4QMeZMvKWFp354cSxU/b46P/KT3r45yFsGu0IV2uTmljwkiXAF3XGr7sW?= =?us-ascii?Q?DZnNNZiy5UGaJtnAIqAiJFMHuBXDmGEPOx4sHj4MxbEAtybUzPeaTIZ7yhGZ?= =?us-ascii?Q?gA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 43e1f4ef-9384-4933-adc8-08dd77978fcc X-MS-Exchange-CrossTenant-AuthSource: PH8PR11MB8107.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2025 18:51:39.4530 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hS1eCwSOyaH+2zYVQYYmzeKnj0J2cS5s2X4knGAEHBS4c/kYJSkJF3bsuMkuPSfgKxU2EkA0AT/Vp0q2x5rwD9iZmZgotR5YzjSAbZu8Bn8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4640 X-OriginatorOrg: intel.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: D7ADE4000D X-Stat-Signature: cjn4sbqsbzdtkk67f1wejz4jneby9qjz X-Rspam-User: X-HE-Tag: 1744224733-927768 X-HE-Meta: U2FsdGVkX19yz8+hzxRdKp8YP79jbGfCh+Taiit//3CTLzRlXTF17CjfViKZPPbS9fxO4ezvXL8BNRuZfS/xoyRJ1isqwDIrssBAccAYAHdFB8+7p9/5q89ZoamsP3c/KX5Sz1VSl74me91Q+7TNwm1A43xw2OxHJzKdSM0F1tGfcKhbu8b11wQn+3Td8f7bT9L3QlMfpZ/TwYl9R/iMkLMnsuyyt+eBzQQbsvMd0rnT2aVNKMDu9k3Uwohpq99d866MMVysAZDu0cGj9AL87BVWc3D4ngzWtoQ4qO9esAjHv5N0kSeOctKoo8LurU1GqP7GKF0Fc3O1k3WW4BUNLSUWc8S+9Idb5SszLCEYiyMKmZrUZbLfeQ4NyTY3jiLzGSaaeLfPTCRAJZN+hw/06hxCkoW7woJiYz2qCv+q0gQD99Ml1Jhy0KDyM/MUXYCtvN3siIdiHRSz97+TPJlz6QnOg0fEoBqDgriKEsNmfbYVgZqgVTYJwUIY2pjHq5KTY0DTNRmVtyjbu9a5HhH50JK88rY62dlIds9j65F6OlIS62P/yDgENDJgiUMZutik2l1ZnwBUkHYa5urlw0qpaCPPT3oxU7hGFxzDhE+Xm1Lmu0TKntVLK3G2ntvmh2GpkePOgZHvdgAH4CqOTmESCT9RI1F0sFVVdAdM0UTyqIlG3Yy7WvomQ0rkCUr7BPiKYWSQ60L7Uz8Lfurw/cucDwDC32NR2QIX2rXI5jHHVgTaPWXB96j86NIdSazwr/9FC4aO8N+NEj+ert8nKl3GTF4Ct3IdIQ7K6aEQ+5fVkPPeROuO1Wd5ec2y6DGNBEFf3jqkY5OJ8EceVxwsR98aEC0m2jawzOtxw/czehejPrIwr8JbmV6SIYoA+yv9yh4hQ1FHttbO+C6TRGgZcKm6icVAbPe7wH8t6ECGN8eQbUuFUhDvJtocPigHAiBHV41E6YaMq0PL3O8D/Vs9us1 wKgsQWzy bkK2fIR8ud42xRsr69OLWEAoRSbhCjuqld8Am1UasOicPpEWC27w8BauALfcMGi+3NlIDROhpTDG1xDrewAzk4sHu/bboYZWUs/nMBvsVk7KMy5paBZIT5u3JVQkVbyAoAu2qzIRsy5a8SK+PpAU1A7e5xoxzKKUGXe5hDErDOvtAyelr+FQiPo5XIP+EmNR8D5Ss5asR+yjtA1aiRGcC7HircWvrb+JnBbPOd/h3C9ejPRDDaA27m2LvmwW6cEKD3je7G+9m9jHbumAzUTme4dYL+ufGbjJm15Kq3ekPlE5tiGRplfwnGvFixDRBMhonU7xwDaD/DrxKqSaKxIKrllRL8OirS6Jfm/MThzil3r3glpEwlYAFZkUMi/Q9IfAnqhls8Kg2JNGkHco1n3hoFV3q9VuKteYafAcERXf0C1NpQaOMGXHZlUhJKFBF7ORxyxa/JRZOkWcFqU1RPx6Zp8QcvZzRR+92PxVchlgEeyIARqU2hdcBXn6I63KhyGdyBnP+BkoC+t2p0HlLhYvozt06T2kPZ3Icg7eE+jgJk6rCysWhpFtVmTlpnS3Pq+ILfft1MGmfohUxw7heVBOB2/54arrncZef9m+Dvf1ILOiOO2cbmf+huBnHJzLnXr+C55yFJixF0Owqb+0= 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: Rakie Kim wrote: > On Tue, 8 Apr 2025 20:54:48 -0700 Dan Williams wrote: > > Dan Williams wrote: > > > 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 > > > > --- > > > > mm/mempolicy.c | 61 ++++++++++++++++++++++++-------------------------- > > > > 1 file changed, 29 insertions(+), 32 deletions(-) > > > > > > > > diff --git a/mm/mempolicy.c b/mm/mempolicy.c > > > > index 0da102aa1cfc..988575f29c53 100644 > > > > --- a/mm/mempolicy.c > > > > +++ b/mm/mempolicy.c > > > > @@ -3419,6 +3419,13 @@ struct iw_node_attr { > > > > int nid; > > > > }; > > > > > > > > +struct sysfs_wi_group { > > > > + struct kobject wi_kobj; > > > > + struct iw_node_attr *nattrs[]; > > > > +}; > > > > + > > > > +static struct sysfs_wi_group *wi_group; > > > > + > > > > static ssize_t node_show(struct kobject *kobj, struct kobj_attribute *attr, > > > > char *buf) > > > > { > > > > @@ -3461,27 +3468,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) > > > > { > > > > - if (!node_attr) > > > > + if (!wi_group->nattrs[nid]) > > > > return; > > > > - sysfs_remove_file(parent, &node_attr->kobj_attr.attr); > > > > - kfree(node_attr->kobj_attr.attr.name); > > > > - kfree(node_attr); > > > > + > > > > + sysfs_remove_file(&wi_group->wi_kobj, > > > > + &wi_group->nattrs[nid]->kobj_attr.attr); > > > > > > This still looks broken to me, but I think this is more a problem that > > > was present in the original code. > > > > > > At this point @wi_group's reference count is zero because > > > sysfs_wi_release() has been called. However, it can only be zero if it has > > > properly transitioned through kobject_del() and final kobject_put(). It > > > follows that kobject_del() arranges for kobj->sd to be NULL. That means > > > that this *should* be hitting the WARN() in kernfs_remove_by_name_ns() > > > for the !parent case. > > > > > > So, either you are not triggering that path, or testing that path, but > > > sys_remove_file() of the child attributes should be happening *before* > > > sysfs_wi_release(). > > > > > > Did I miss something? > > > > I think the missing change is that sysfs_wi_node_add() failures need to > > be done with a sysfs_wi_node_delete() of the added attrs *before* the > > kobject_del() of @wi_group. > > Hi Dan Williams > > Thank you very much for identifying this potential issue in the code. > > As you pointed out, this seems to be a problem that was already present in > the original implementation, and I agree that it needs to be addressed. > > However, since this issue existed prior to the changes in this patch > series, I believe it would be more appropriate to fix it in a separate > follow-up patch rather than include it here. I tend to disagree. The whole motivation of this series is to get the kobject lifetime handling correct in order to add the new dynamic capability. The claimed correctness fixups are incomplete. There is time to respin this (we are only at -rc1) and get it right before landing the new dynamic capability. One of the outcomes of the "MM Process" topic at LSF/MM was that Andrew wanted more feedback on when patches are not quite ready for prime-time and I think this is an example of a patch set that deserves another spin to meet the stated goals. > I will start preparing a new patch to address this problem, and I would > greatly appreciate it if you could review it once it's ready. Will definitely review it. I will leave to Andrew if he wants an incremental fixup on top of this series, or rebase on top of a fully fixed baseline. My preference is finish fixing all the old kobject() issues and then rebase the new dynamic work on top. Either way, do not be afraid to ask Andrew to replace a series in -mm, that's a sign of the process working as expected.