From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 3BE6E3F9278 for ; Fri, 26 Jun 2026 14:42:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782484961; cv=none; b=QC9tyGdd7S8xNtblB/QU8kRD/FBYKhD07zntuII06V1yM6w2oUzOJQNHmeSoZCyiU3jN/jfI4WfxB7EJhe7mRwgMs7+VoTuYQ6U3nr15U5CzF1uMc+ZGzUtCeIr4z2dCUZ7bmcmrbcBtxrn0L8XwBW1QA818LZ0gbdNUeeahbQI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782484961; c=relaxed/simple; bh=0jUZtAQXTrkcCRI8prCzZxil3RfrfyVSdDyzCpHDbAw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=VsU1UHT19SlDFgTSlkggeAK36F8EHtkax3F3pk2YcfFaqE+1O54tZ1FAYN/MlspRozGLFrIPwiK0Pgb0aG2DTAii8vM3MELkkQ6qjipw0lqr/4ha8QiqOYTZets8kvo4bIVb1S0+8GDpl0eHsy6v3ZPr4OtO79c7eyLvrT5iyrg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TAYaE+ye; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TAYaE+ye" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17D111F000E9; Fri, 26 Jun 2026 14:42:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782484959; bh=9qND9JYme4pPeKOUvGUUNp0udPhueZGjgIGiuGkfH5s=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=TAYaE+yeVepomRackI0PSxGBGd4A5CLYtAZi1k5mRfcmoHfBjwfQI1nGitWvKYNL0 LnQJXDIz6aGP9MrxCpzj6dYkd2/JQCMECE/pb3BKpAO0sWTuSo8cD3YgVXwi/UO6G6 e2c3YZzpth55ahBx9oDBBAU3qQ19d7gMibZdv373TebYevNSKFf/zSd0nhLMy0vqes MONIVdU/ZbcNCek4aXHD8eztO77Jr/7gTZNsymPGSQr5wa9Xckd5HNZgrrrILMFGBZ 57EgXH8Ptyb+NGVGQU1uofGDsb3pypiXHe5g2HQrmbFQAk219u4ARIAsL6uzNRlo21 4J8OM7i1rcBcQ== From: Thomas Gleixner To: Chuyi Zhou , mingo@redhat.com, luto@kernel.org, peterz@infradead.org, paulmck@kernel.org, muchun.song@linux.dev, bp@alien8.de, dave.hansen@linux.intel.com, pbonzini@redhat.com, bigeasy@linutronix.de, clrkwllms@kernel.org, rostedt@goodmis.org, nadav.amit@gmail.com, vkuznets@redhat.com Cc: linux-kernel@vger.kernel.org, Chuyi Zhou Subject: Re: [PATCH v8 07/14] smp: Remove preempt_disable() from smp_call_function() In-Reply-To: <20260616111127.966468-8-zhouchuyi@bytedance.com> References: <20260616111127.966468-1-zhouchuyi@bytedance.com> <20260616111127.966468-8-zhouchuyi@bytedance.com> Date: Fri, 26 Jun 2026 16:42:37 +0200 Message-ID: <87se69icrm.ffs@fw13> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Tue, Jun 16 2026 at 19:11, Chuyi Zhou wrote: > Now smp_call_function_many_cond() internally handles the preemption logic, > so smp_call_function() does not need to explicitly disable preemption. > Remove preempt_{enable, disable} from smp_call_function(). Add a new line before the last sentence and this becomes a nice and good change log. > Signed-off-by: Chuyi Zhou > Reviewed-by: Muchun Song > Reviewed-by: Sebastian Andrzej Siewior > Tested-by: Paul E. McKenney > --- > kernel/smp.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/kernel/smp.c b/kernel/smp.c > index 390e6526574c..096d857dc3a5 100644 > --- a/kernel/smp.c > +++ b/kernel/smp.c > @@ -1012,9 +1012,8 @@ EXPORT_SYMBOL(smp_call_function_many); > */ > void smp_call_function(smp_call_func_t func, void *info, int wait) > { > - preempt_disable(); > - smp_call_function_many(cpu_online_mask, func, info, wait); > - preempt_enable(); > + smp_call_function_many_cond(cpu_online_mask, func, info, > + wait ? SCF_WAIT : 0, NULL); Again. If you need a line break align the second line argument with the first argument of the line above. It's documented coding style.