From patchwork Fri Nov 8 10:39:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 13867917 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 86D0AD5E157 for ; Fri, 8 Nov 2024 10:42:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0782E6B00A0; Fri, 8 Nov 2024 05:42:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E84806B009F; Fri, 8 Nov 2024 05:42:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD0F66B009D; Fri, 8 Nov 2024 05:42:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 994D56B0099 for ; Fri, 8 Nov 2024 05:42:27 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 1DC1A1A0B79 for ; Fri, 8 Nov 2024 10:42:27 +0000 (UTC) X-FDA: 82762587684.12.F52850A Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf26.hostedemail.com (Postfix) with ESMTP id A865B140016 for ; Fri, 8 Nov 2024 10:41:57 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=hhcP8+Wo; dkim=pass header.d=linutronix.de header.s=2020e header.b=KFvBYwKh; spf=pass (imf26.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731062318; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=hZ7T3n9ji38bfDcEZMnrKQTiWeEv9uEaf9nIoN35Fps=; b=ELNDCcg2BD1K1bdIr1ddGGNEmrL8lnsjrVIBwlUzEuyNn5F7T72+J4TDazBz/mgRQosNpX C4RPL+P5n7vMbnIh1pvkoXNwkLcmK0SbsW9b/uETCC1ODS8xl7hVqA3apW5tms44MBXec6 P0caJHUIhvDNfWbbyoHFLO8noRommQ4= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=hhcP8+Wo; dkim=pass header.d=linutronix.de header.s=2020e header.b=KFvBYwKh; spf=pass (imf26.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731062318; a=rsa-sha256; cv=none; b=3JT5HxmcP/J079zuFv2UEvYqgj1iwcPdfqrmh+m1TF6jaHfxo4lhvCY6VetoTAnrlCNYjC QRZ4I4ecwJSlWt5Vl+Tk6Ukwv60KXbP2JqRO/hDdNFUlW2dTqR58HP4UCWBj6p6/kQFEj+ ybO9svhatR4/HAn0F8VHBCxBXLO4xro= From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1731062543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hZ7T3n9ji38bfDcEZMnrKQTiWeEv9uEaf9nIoN35Fps=; b=hhcP8+WoqQYG//gIZ0hHGdOdSyU2yj6omU1f7N5TVMdwHq2GbxdOEikXD6YyWgpRoXeyiy dLlWDR8Mnb0SccFh//hL0bR+W6vDt+fSiWqO7IjsrNA9Mik/wvg0YoqaWNNZhVvEMuQX2w 3frFc2smwspd0i3FXDtJ5icHSdqxqc9zIlLPIuf7b0OmBAN3nmL/e1RearU3oZyaZ21muY kDYmRG5HpF9447N78GlGMvSlYTuHLO6b6pTL2fIjcZa9/hNcSOU2PX46X7XXtzWA6z0Voi Qs27evJIdEGul1EmaRMj8gaet8r1RlZS3qb6pnTF1iiheLiQLKsDwI6q3EYCCw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1731062543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hZ7T3n9ji38bfDcEZMnrKQTiWeEv9uEaf9nIoN35Fps=; b=KFvBYwKhT7evOVi+BwnX0Mn/HduihryDoCDR9Lz7a5rjCyAy9P1BX5rp+JCGEycl5yXTZ3 4hHU0Jgn84MXGsBw== To: kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: "Paul E. McKenney" , Boqun Feng , Marco Elver , Peter Zijlstra , Tomas Gleixner , Vlastimil Babka , akpm@linux-foundation.org, cl@linux.com, iamjoonsoo.kim@lge.com, longman@redhat.com, penberg@kernel.org, rientjes@google.com, sfr@canb.auug.org.au, Sebastian Andrzej Siewior Subject: [PATCH v3 2/4] scftorture: Wait until scf_cleanup_handler() completes. Date: Fri, 8 Nov 2024 11:39:32 +0100 Message-ID: <20241108104217.3759904-3-bigeasy@linutronix.de> In-Reply-To: <20241108104217.3759904-1-bigeasy@linutronix.de> References: <20241108104217.3759904-1-bigeasy@linutronix.de> MIME-Version: 1.0 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: A865B140016 X-Stat-Signature: zi9hei73t495kucpt6qzs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gtWu5tLerBtxRNd3oVEGNUcwqfGvuj2rWET3g9ul1W2eY3wnWmDc9T/CFYsPgtj6+rSfEPxmF/HRaCyw9wV2EEAQOp4o7syVEK7a5t6tlmtrv9LHEYswAO5bFqpV/h315orKSIjxDqEuBHWkp6PyeGqoDmkEb6M4L4u20Kqkt+DnbHrii1fsoop9ULr1gmagexNnOQtKNWU44/DHTpYj1hWqJoPLD7NKf4Rc8oTziz64IJzt2ij23q+yJawioCk 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: The smp_call_function() needs to be invoked with the wait flag set to wait until scf_cleanup_handler() is done. This ensures that all SMP function calls, that have been queued earlier, complete at this point. Tested-by: Paul E. McKenney Signed-off-by: Sebastian Andrzej Siewior --- kernel/scftorture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/scftorture.c b/kernel/scftorture.c index 455cbff35a1a2..654702f75c54b 100644 --- a/kernel/scftorture.c +++ b/kernel/scftorture.c @@ -523,7 +523,7 @@ static void scf_torture_cleanup(void) torture_stop_kthread("scftorture_invoker", scf_stats_p[i].task); else goto end; - smp_call_function(scf_cleanup_handler, NULL, 0); + smp_call_function(scf_cleanup_handler, NULL, 1); torture_stop_kthread(scf_torture_stats, scf_torture_stats_task); scf_torture_stats_print(); // -After- the stats thread is stopped! kfree(scf_stats_p); // -After- the last stats print has completed!