From patchwork Thu Nov 7 15:27:36 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: 13866635 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 EAEB2D4336F for ; Thu, 7 Nov 2024 15:27:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 74E026B0085; Thu, 7 Nov 2024 10:27:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6FEBC6B0088; Thu, 7 Nov 2024 10:27:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5C5D36B0089; Thu, 7 Nov 2024 10:27:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 3E00F6B0085 for ; Thu, 7 Nov 2024 10:27:42 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id EED60120871 for ; Thu, 7 Nov 2024 15:27:41 +0000 (UTC) X-FDA: 82759678386.28.6CF4F81 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf28.hostedemail.com (Postfix) with ESMTP id 45292C0021 for ; Thu, 7 Nov 2024 15:27:03 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=4gWnbb0J; dkim=pass header.d=linutronix.de header.s=2020e header.b=ZxTtCI6C; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf28.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730993089; a=rsa-sha256; cv=none; b=nzhuXeGZ4KbaUG70q9gHLFj6RW1aSBiAD1ZWL4yYnf0hcDxpwlJ791BNVur/vKkd540yT/ JssqG9lB0Az4zwoYIoW+FU8x2YiltHUi1Ig227phVGphAkpzTnqVFYXS4E/o3STJDkg5cr 50ydbk52tg2NVtQsnyN3oQ2vqi7+w+s= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=4gWnbb0J; dkim=pass header.d=linutronix.de header.s=2020e header.b=ZxTtCI6C; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf28.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730993089; 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=D9GAkp6axrm31ZMYGbMxCuOZ4EkrG3h1hb4DuwNIX7w=; b=Pcwjcyb3fZneXyWSHVubx6gnm8h1pFcJCh1g0hlaDXzObFlll46oUQQj9AFBxkMo4WcqYF wKpNqEdZjgXsqP2i4nY6OSqwKynfwG0AeKA5VjiQYS095i1wlW2G32kNiH81s22rhvj/Tz eQKuLPrrIcDy8NEchUtrxNz3s4i73GE= Date: Thu, 7 Nov 2024 16:27:36 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730993257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=D9GAkp6axrm31ZMYGbMxCuOZ4EkrG3h1hb4DuwNIX7w=; b=4gWnbb0JPA6louZB7MhLxMUhWSLppTnsLQbINltZYCdkRoFvDAOb8+j8uG1uTAQ31JdCBw 8bq2UJJC8T03kvvs8d9RqMv7kYIY8H147SAnH7YP+jVL3eCAIFbzk2URYTOyr0nZc6cYKo AitVwZZe8xTdc9dIk7S/lbQnDuh1aDKS8uNBTInwEVbJ0r7mMDIznyADV1VSwmw1u/bVnY I2lprx7i6DVpgJ0dV+DcIs87c3MlalAbPOO/L3q1nD9qMM9CiTOj9ZvHyc0O1fbqKPjdVk uYLcT3kZz0zGuryquAThpQ3caFZsH2LksUvyBtOo7XUP5SLyCaaIiUPwTaGUhg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730993257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=D9GAkp6axrm31ZMYGbMxCuOZ4EkrG3h1hb4DuwNIX7w=; b=ZxTtCI6CCJFS73eVuWExDYOllEmHp7Pxsrcs7aU7TeuBaqEJUgzfINiHhmE64uY9O5/NXf 4Bbi4xp5gjVmDpDg== From: Sebastian Andrzej Siewior 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 Subject: [PATCH v2 4/3] scftorture: Wait until scf_cleanup_handler() completes. Message-ID: <20241107152736.BJPBLXGO@linutronix.de> References: <20241107111821.3417762-1-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20241107111821.3417762-1-bigeasy@linutronix.de> X-Stat-Signature: ixxfcsrppk8njmc48zbfz7ekecgn13rg X-Rspamd-Queue-Id: 45292C0021 X-Rspamd-Server: rspam08 X-Rspam-User: X-HE-Tag: 1730993223-862138 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sIc1704BmBXepIeu6/zKxhdgNJVvpfRVHJrJNUS5B+M73vo8Oj2SEI4qvyfIxnNYQ3LPEKHbSM8PEyPGsZ/uMNLXoI+gFPqbItrO8RY81euCgBuWpJfhBvhMXpf630ygSB6Yn9iITgw0xDDf1Qp2K+FBcZ/7JDHGXBRo04VNgifS3kREhO6fMcwVJAoefxgLVkIvYPt3p24kWBnQJvSQmBJw== 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. 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 1268a91af5d88..ee8831096c091 100644 --- a/kernel/scftorture.c +++ b/kernel/scftorture.c @@ -552,7 +552,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!