From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DCCA621771C for ; Thu, 29 Jan 2026 17:08:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.9 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769706495; cv=fail; b=jGtFFcVy0YIyxOQGlXha8+zS2TTLag5W6WkDtrnCw+buqURzCabgdhJAVJYuySX1rsAxAAxlRCTr1cgazswK8R/pmugtfNC+6gf+/wVYF2ZseBYqSj5CbJy1cgErCOTUtz0onA67pJ3shfRRKNL3kNx2uG6SfPZjepKrLx75jtQ= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769706495; c=relaxed/simple; bh=WJC/5B5A210Hw5BG9SlkiFSZd9Q0iHMhDk74x0LAFHg=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=XIBq38VeP6KZ0do7lfhFzCFUdaMoeuO+P5c/RYvL4dF0+JJFN2sSNKAD6YVNv8UYXopk03f6yJq3PAG8BPdcICWBvEl9FiSEpa2vYQHibsEdIkwsfVhCQeDtU9gE14OJpy6xF3fqvpUhTKhlmttTrzDoERvmQ2DqktbXvNmDHQA= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QypnBIKc; arc=fail smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QypnBIKc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1769706494; x=1801242494; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=WJC/5B5A210Hw5BG9SlkiFSZd9Q0iHMhDk74x0LAFHg=; b=QypnBIKcfunbS2I7039RzAGc5CZLOuamOfzi9XjGlAy20K5bu6wVkJn2 WqIxpqpTnAo+N50mwuiunC+rEGnTXEZ9mILBKpScJa23WlRvMxB4ZrJos gjE9gNb0JTX/8hWVoeUkudjoy+6qD/lq+bCO1bJhw90/B5ukSGBXpBCup zyTPMGP590unIR6cMu8A7V7nEN6p0sRouidyDt0zTRDwrykv6f01g+Gj6 c6kRot40uv5tXhKqIG5UKA+KTwNg6TiN5qa9N4kSKy3rZa1NqvQfs2KWG Sp/XLUuk+SbU8VVi8XR2c7B6+hps8zCL2gUpRW40YwQJHx0V6UzcgIZqa w==; X-CSE-ConnectionGUID: DrYpty+dSZSJmFRZKEcYZA== X-CSE-MsgGUID: EFJBRm5TRKqKQcfOlDeJ+A== X-IronPort-AV: E=McAfee;i="6800,10657,11686"; a="93609639" X-IronPort-AV: E=Sophos;i="6.21,261,1763452800"; d="scan'208";a="93609639" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2026 09:08:05 -0800 X-CSE-ConnectionGUID: xXEY0FOnTpy/k2wWhp7Y0g== X-CSE-MsgGUID: KpXHgN4ZS0qve7C0zDu1uQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,261,1763452800"; d="scan'208";a="213588702" Received: from fmsmsx903.amr.corp.intel.com ([10.18.126.92]) by orviesa005.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2026 09:08:05 -0800 Received: from FMSMSX902.amr.corp.intel.com (10.18.126.91) by fmsmsx903.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Thu, 29 Jan 2026 09:08:04 -0800 Received: from fmsedg902.ED.cps.intel.com (10.1.192.144) by FMSMSX902.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35 via Frontend Transport; Thu, 29 Jan 2026 09:08:04 -0800 Received: from CH4PR04CU002.outbound.protection.outlook.com (40.107.201.27) by edgegateway.intel.com (192.55.55.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.35; Thu, 29 Jan 2026 09:08:03 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H6bOFQaTXNwaxD49nmRbFlH7aOVw9CF1VgM76ei8y2S61AV5RwU3S8/gZ4pDXo8XubHDfZSILBs5B4zXiY9REzibJMjo65rgjm4ePTpTYq8nlNQ+VGxDqCOIbiJO0CKTKaBoDDmFPy8I4NafgeSuZo99fWjvK+NHK6389DmkJ78D3IUbrT1g2XwBEaKk9MUGW2eHFBi2awIGUMDNhs1Ol0WIzVMMtF4be114cWy2r1/wxkHqGezCpDPhI5VTfnHsC7Qu/KstLDc1SyaRGKgEiiOlWevxi+Z25QoVLFSNpKlNKUavZ2y4rQKRSbYigds7ThIIfgn6e0L6MEyJy/HkIw== 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=W+zLCCIbkh3lLcDCejxxy8lliZ7hHXZEhQSS+aK7/7s=; b=o65zCglzFJ3V1wyRaYt93CKRoi4hvm+7sz0kI7ZsPdlDPe04Czg0Ws9Br7iaTAfpakVAn91jUX1aYB7o4tfD4/Z516YVoF5EkL1OeVsKvlGkXeVSZ0mKgJ4zXk3GtQb+aY+pQT33Z+k6HV0zM2lBDJQkSqndpAdYWhzRbVNIjHo2aEs4r7ytiMQMFaPCze/1q4EAZIoDGpftDwGgDOZjU+eeYRH9+2WTXu+6zYeRLltL+y4DqQsQC2cBIqj4XxwbRdBYiqe4hMeOivlZIjfNEhVsT+CuXlIIYOkwvX7TsZqLaNNF3m8/sMYoD/cY7iMxik4uDc/ZzO9xfxp9+ame1g== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7925.namprd11.prod.outlook.com (2603:10b6:8:f8::18) by SN7PR11MB7707.namprd11.prod.outlook.com (2603:10b6:806:322::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9564.7; Thu, 29 Jan 2026 17:07:55 +0000 Received: from DS0PR11MB7925.namprd11.prod.outlook.com ([fe80::60af:89a0:65dc:9c84]) by DS0PR11MB7925.namprd11.prod.outlook.com ([fe80::60af:89a0:65dc:9c84%3]) with mapi id 15.20.9564.007; Thu, 29 Jan 2026 17:07:53 +0000 Message-ID: <00ad5958-dc5f-4d18-ad24-9de607912bf8@intel.com> Date: Thu, 29 Jan 2026 09:07:51 -0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/7] stop_machine: Introduce stop_machine_nmi() To: Thomas Gleixner , CC: , , , , , References: <20260125014224.249901-1-chang.seok.bae@intel.com> <20260125014224.249901-2-chang.seok.bae@intel.com> <87o6me9nd0.ffs@tglx> Content-Language: en-US From: "Chang S. Bae" In-Reply-To: <87o6me9nd0.ffs@tglx> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BYAPR11CA0047.namprd11.prod.outlook.com (2603:10b6:a03:80::24) To DS0PR11MB7925.namprd11.prod.outlook.com (2603:10b6:8:f8::18) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7925:EE_|SN7PR11MB7707:EE_ X-MS-Office365-Filtering-Correlation-Id: d4333c9b-c2c3-422a-794e-08de5f58f0ad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?bVpvZGRyUEtwVjVZR3dteTZZTEd5TWgvU1BRRDFiN3lHZVpwYlpORVVieDJI?= =?utf-8?B?RUp1UGtCTTNzQ25PUG9ER1dTaTNnSGgvZGlwblFVQ2VIakJsOEhKOGFXeXRW?= =?utf-8?B?ZkFlTFR3emhsSkwyYXNLNG9xTjU2eGRNWmUvKzk1ZytXSWttekppUjk0NHlN?= =?utf-8?B?M2lXSUNPNmFoYmVnWXF2OWltRk1wSzc0aXI0bDZTb2dLQ2xmTFBUY2IwTkJY?= =?utf-8?B?cjNiV1hjNEpLU0hTeUJNNTYydHNGdUx2TldLSHFOY0ZlamhFblA3SUNxUFFo?= =?utf-8?B?VFNKR2FrcEhTR253eFFpUS8yZTUvbW1sYkZtd3ExRCt6Wmo0elowRUNQQjJx?= =?utf-8?B?NGE2SzAwQXcrV0k0WUUraWg0Tk1ST0hxcXVOaXdwWjRXVnZianRWSmVLYlc0?= =?utf-8?B?RkJnc3pzaWdJYnZzZmdtNTJrUmRFZHBQOS9MaXlZWnJXa21VdFhybExMZ0hr?= =?utf-8?B?ck5NdjBCU29CR2NVUTVPQU1nMUlad0JRakNn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2tlZ0lJREtxaW84RHkxZGpVV3RabFVOWERCVWJiaUEzdEpSa21q?= =?utf-8?B?R3pSUDFaRFVibEpQaUtRSnBmY0NIV0hyZU5IWHNES213UElIOEtZSy9ORG9C?= =?utf-8?B?TDJ6NUh0SXJ5cVcrYm1VYmpFZTZXQThWbFYzZCtVdjZDbndyMytnMCtXWko5?= =?utf-8?B?d1Bha05VV2ZqbTJ6VHNqTEt2OUlubVZjQ29lZjcxRkdqRVB2YmZDSDh5VXdh?= =?utf-8?B?VktEc0Q1Q1pRblRDWld6T0YxaXhWYkVmN1hxcm42ZFhHRS9TcmU5TFdOQVNr?= =?utf-8?B?cjFtc0ttc0hIanZTVlFobTVRT2dUNTNWM3I1SUdhcmU3bENhVVdlYW1jNXdL?= =?utf-8?B?dnBxRGh6NEQ1S1dQSW1rNStEeG1DbCtqbnBrRjViemlhREZmcEZPS25xZ1RM?= =?utf-8?B?NzFhZVlFQS8wVmdrbXZFVHZVUDAxNUNkQ0dlNkRWL2phNlZVeXNQN3V2bDQ0?= =?utf-8?B?cExrSlRPT085MkdxcUZxY0FHWFB0RUJsSlF6dEU3dkVwYUdMWFNQbTBRMHB3?= =?utf-8?B?b0xLWWp1a1pxWldzaE82cEVWeCtkbTFIL25GYkZQcFloWGE4NWJUdmpJM1ow?= =?utf-8?B?ZTB4bDcvaU1IYXFkdW9vQjlMQkhHYWQ1VnlkcU9hOXp3VzBWNmdBMTlPcjJ1?= =?utf-8?B?OHlCQ3pXR3ZLeE1JM1dwV3FvalhxVUhtNm9NWHFFZEsvQ1lYMm1zYjZmZk5G?= =?utf-8?Q?Qmr22KE4vSuvsncAuzdV7S5rX?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR11MB7925.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(366016)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount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B?SmxxVzkvNDU1ZnN5ZE5IcG5YaEJBWUNZWXpyOHk1c2UvWWQzQXg1UndGcW9J?= =?utf-8?B?ZnIvUFlsdkxyRVRYZDdMWHNTbDI5QlRLNFl5clJuZzZqMEREV0pMem15ZDFx?= =?utf-8?B?SHZzTTF6YndKWTQ4alU1aVViaHd3RXVkNHV5Tk1PaUxVSGRtMW55R1ZwdFI0?= =?utf-8?B?eHU3TXNBczNKSENlS2hvTkMrNExMZ0pFT0VYNFpKSEQzMjU5dGtiTmN3SUVD?= =?utf-8?B?eTNTVEVTK0dJb2RyeEZ0OGpXQm42WjFIRll5MTFRajRhREh0UlM5cldBVWVa?= =?utf-8?B?SDZ2c1lEYWMrRFdzV2dCNWc2NTdOZHAxWGpCQ0FIdnJlcStTL0ZuOWQ4eGZZ?= =?utf-8?B?QUp0MEFlc2xBcnRmeXlJeDk5Q29XNS9KQWRBcm5iOVFUc2dBT1kyTEdncUIr?= =?utf-8?B?SHVjQ09acEdMWkdPd1Z1TjVmRjRBd1lTOVZmdDFldWJvaWMwT0JBVFpMdFJZ?= =?utf-8?B?cXE1VjlOTFZhRmFySUZrbExJcVJwRTFMMzh6YnlYWVU5blFYMjRsMCtPTG5B?= =?utf-8?B?TmpMREZyVjk2Z2ZmQndZSk0xNXRUbFlPWXY2L3JNKzZWc1lCdWtMUT09?= X-MS-Exchange-CrossTenant-Network-Message-Id: d4333c9b-c2c3-422a-794e-08de5f58f0ad X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7925.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2026 17:07:53.4822 (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: PSx+5F8zsVkDdwhPVhRGwOKO+A9ol0bOYCbFqIDvt7cuCCNSNqTVw9V8hoRSkrq3nUCfh3Xq6rUntTZ3uYDjj54b1GS5/DZ7FiQIuXd3Qe8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7707 X-OriginatorOrg: intel.com On 1/28/2026 12:02 AM, Thomas Gleixner wrote: > On Sun, Jan 25 2026 at 01:42, Chang S. Bae wrote: >> +/** >> + * stop_machine_nmi: freeze the machine and run this function in NMI context >> + * @fn: the function to run >> + * @data: the data ptr for the @fn() >> + * @cpus: the cpus to run the @fn() on (NULL = any online cpu) > > Please format these tabular, use uppercase letters to start the > explanation, use CPU[s] all over the place and write out words instead > of using made up abbreviations. This is documentation not twitter. > > * @fn: The function to invoke > * @data: The data pointer for @fn() > * @cpus: A cpumask containing the CPUs to run fn() on > > Also this NULL == any online CPU is just made up. What's wrong with > cpu_online_mask? > >> + >> +bool noinstr stop_machine_nmi_handler(void); >> +DECLARE_STATIC_KEY_FALSE(stop_machine_nmi_handler_enable); >> +static __always_inline bool stop_machine_nmi_handler_enabled(void) > > Can you please separate the declarations from the inline with an empty > new line? This glued together way to write it is unreadable. Yes, I fixed them all on my local right now. > >> +{ >> + return static_branch_unlikely(&stop_machine_nmi_handler_enable); >> +} >> + >> #else /* CONFIG_SMP || CONFIG_HOTPLUG_CPU */ >> >> static __always_inline int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data, >> @@ -186,5 +217,24 @@ stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data, >> return stop_machine(fn, data, cpus); >> } >> >> +/* stop_machine_nmi() is only supported in SMP systems. */ >> +static __always_inline int stop_machine_nmi(cpu_stop_fn_t fn, void *data, >> + const struct cpumask *cpus) > > Align the second line argument with the first argument above. > > See https://www.kernel.org/doc/html/latest/process/maintainer-tip.html Sorry for lot of misalignment issues in this change that I missed out. >> +{ >> + return -EINVAL; >> +} >> + > >> + >> +void arch_send_self_nmi(void); >> #endif /* _LINUX_STOP_MACHINE */ >> diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c >> index 3fe6b0c99f3d..189b4b108d13 100644 >> --- a/kernel/stop_machine.c >> +++ b/kernel/stop_machine.c >> @@ -174,6 +174,8 @@ struct multi_stop_data { >> >> enum multi_stop_state state; >> atomic_t thread_ack; >> + >> + bool use_nmi; >> }; >> >> static void set_state(struct multi_stop_data *msdata, >> @@ -197,6 +199,42 @@ notrace void __weak stop_machine_yield(const struct cpumask *cpumask) >> cpu_relax(); >> } >> >> +struct stop_machine_nmi_ctrl { >> + bool nmi_enabled; >> + struct multi_stop_data *msdata; >> + int err; > > Please align the struct member names tabular. See documentation. Fixed. > >> +}; >> + >> +DEFINE_STATIC_KEY_FALSE(stop_machine_nmi_handler_enable); >> +static DEFINE_PER_CPU(struct stop_machine_nmi_ctrl, stop_machine_nmi_ctrl); >> + >> +static void enable_nmi_handler(struct multi_stop_data *msdata) >> +{ >> + this_cpu_write(stop_machine_nmi_ctrl.msdata, msdata); >> + this_cpu_write(stop_machine_nmi_ctrl.nmi_enabled, true); >> +} >> + >> +void __weak arch_send_self_nmi(void) >> +{ >> + /* Arch code must implement this to support stop_machine_nmi() */ > > Architecture Fixed. > >> +} > > Also this weak function is wrong. > > All of this NMI mode needs to be guarded with a config option as it > otherwise is compiled in unconditionally and any accidental usage on an > architecture which does not support this will result in a undecodable > malfunction. There is a world outside of x86. > > With that arch_send_self_nmi() becomes a plain declaration in a header. I see. > >> + >> +bool noinstr stop_machine_nmi_handler(void) >> +{ >> + struct multi_stop_data *msdata; >> + int err; >> + >> + if (!raw_cpu_read(stop_machine_nmi_ctrl.nmi_enabled)) >> + return false; >> + >> + raw_cpu_write(stop_machine_nmi_ctrl.nmi_enabled, false); >> + >> + msdata = raw_cpu_read(stop_machine_nmi_ctrl.msdata); >> + err = msdata->fn(msdata->data); >> + raw_cpu_write(stop_machine_nmi_ctrl.err, err); >> + return true; >> +} >> + >> /* This is the cpu_stop function which stops the CPU. */ >> static int multi_cpu_stop(void *data) >> { >> @@ -234,8 +272,15 @@ static int multi_cpu_stop(void *data) >> hard_irq_disable(); >> break; >> case MULTI_STOP_RUN: >> - if (is_active) >> - err = msdata->fn(msdata->data); >> + if (is_active) { >> + if (msdata->use_nmi) { >> + enable_nmi_handler(msdata); >> + arch_send_self_nmi(); >> + err = raw_cpu_read(stop_machine_nmi_ctrl.err); >> + } else { >> + err = msdata->fn(msdata->data); >> + } > > And this wants to become > > if (IS_ENABLED(CONFIG_STOMP_MACHINE_NMI) && msdata->use_nmi) > err = stop_this_cpu_nmi(msdata); > else > err = msdata->fn(msdata->data); Although that config option is very clear and makes tons of sense, the latter reads like a (silent) fallback path for a stop_machine_nmi() invocation with CONFIG_STOMP_MACHINE_NMI=n. Maybe this might be clear to reject the NMI option right away with something like: stop_machine_cpuslocked_nmi(...) { if (!IS_ENABLED(CONFIG_STOMP_MACHINE_NMI)) return -EOPNOTSUPP; ... }; >> >> -int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data, >> - const struct cpumask *cpus) >> +static int __stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data, >> + const struct cpumask *cpus, bool use_nmi) > > The argument alignment was correct before.... Sigh... fixed, again. >> +int stop_machine_nmi(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus) >> +{ >> + int ret; >> + >> + cpus_read_lock(); >> + ret = stop_machine_cpuslocked_nmi(fn, data, cpus); >> + cpus_read_unlock(); >> + >> + return ret; >> +} >> +EXPORT_SYMBOL_GPL(stop_machine_nmi); > > Why needs this to be exported? No module has any business with stomp > machine. Not at all. Removed. I really appreciate your time and effort for the review!