From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) (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 07DB33DA5CF for ; Wed, 18 Mar 2026 14:14:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773843260; cv=none; b=EvtrH/8N51NxyjykFICSC2OojSlSbbgEqH18d6612zpRaRE8B+bD7ZDSeFPuinmn377RUFOHwpccDlDYO2++5HwF0mwECEBSEgLZCmv5qRmLEXS1YyQbkZ2zqr3W6kPC/2XqElZV4Lf5omjAJHtBWbdzbPv62+UhkkBMKaQu11k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773843260; c=relaxed/simple; bh=B9PFdOx6lpXYTrO2aSnsdU+3WY7GtmUYJ7fm+Hts//8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hu3kzDLf15xpRLrPfyINoqvLwsGpgyRlPk8vU59Qj89VvKQNuFmsS4ARkBGo4JhsyJTYvq1v1OKrJXMgNTlP/P1HuNj0qdxpRQmagS7kIzbk0I0NrE+B/kek+5cZQ9S64/CVwcloa2WJnvFpwG/TUSpW3OxBBp77nL983JiZb0M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org; spf=pass smtp.mailfrom=goodmis.org; arc=none smtp.client-ip=216.40.44.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=goodmis.org Received: from omf05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E68F01A0764; Wed, 18 Mar 2026 14:14:16 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: rostedt@goodmis.org) by omf05.hostedemail.com (Postfix) with ESMTPA id 2A3C920011; Wed, 18 Mar 2026 14:14:14 +0000 (UTC) Date: Wed, 18 Mar 2026 10:14:42 -0400 From: Steven Rostedt To: "Chuyi Zhou" Cc: , , , , , , , , , , , Subject: Re: [PATCH v3 02/12] smp: Enable preemption early in smp_call_function_single Message-ID: <20260318101442.371c69ae@gandalf.local.home> In-Reply-To: <20260318045638.1572777-3-zhouchuyi@bytedance.com> References: <20260318045638.1572777-1-zhouchuyi@bytedance.com> <20260318045638.1572777-3-zhouchuyi@bytedance.com> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: chr1auppzzu3rm4w5pi4maxtf43oy9aa X-Rspamd-Server: rspamout04 X-Rspamd-Queue-Id: 2A3C920011 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Session-ID: U2FsdGVkX1+ztplbnUkAA1mD7YcGFVBLX9QJWsX4LyA= X-HE-Tag: 1773843254-216248 X-HE-Meta: U2FsdGVkX19DCH7RiGpWLbLZ+2Adn+4sMg42fYgQfg5Ju9+Ak5qNIJKJFa/PhOaJAYpjrjmdTwL9rKtIAFeKXTfeKz2rEdDQFiIfLp5N7BgeATKkHc0SphzCPGQlmPEIE78EmkGXh+E8RGiuli7Zeb7yDRVKZTkg1LRua6j23qsVjk5sn4jQ8ZGrQhLmadJfzvbrzKEiJeJ6fzUOdCKJGuJSFioqpoV0g9TWCD9k6ptqdpNstCFgzZXPKxZiV+cPNwGn0BfL4v+4SRB2R3I5FpBd5WTQ1SIQ1F7RWjTOzqfZlHQNJba9KvE3kZG0oFQZOYWLb68aPOvq+7K+5vFpbE/Rc0cboX7a80OxuEGwxuB/DmCTDtQqxxqb3IsRy3Ds8MMF0wcIndULLLF+dlOkJENQYKgpwfbEK00CbHCkIaH0+3rJN968WA== On Wed, 18 Mar 2026 12:56:28 +0800 "Chuyi Zhou" wrote: > diff --git a/kernel/smp.c b/kernel/smp.c > index fc1f7a964616..b603d4229f95 100644 > --- a/kernel/smp.c > +++ b/kernel/smp.c > @@ -685,11 +685,16 @@ int smp_call_function_single(int cpu, smp_call_func_t func, void *info, > > err = generic_exec_single(cpu, csd); > > + /* > + * @csd is stack-allocated when @wait is true. No concurrent access > + * except from the IPI completion path, so we can re-enable preemption > + * early to reduce latency. > + */ Thanks for the comment. I walked through the code and this looks fine to me. > + put_cpu(); > + > if (wait) > csd_lock_wait(csd); > > - put_cpu(); > - > return err; Reviewed-by: Steven Rostedt (Google) -- Steve