linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
	Boqun Feng <boqun.feng@gmail.com>, Marco Elver <elver@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Tomas Gleixner <tglx@linutronix.de>,
	Vlastimil Babka <vbabka@suse.cz>,
	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.
Date: Thu, 7 Nov 2024 16:27:36 +0100	[thread overview]
Message-ID: <20241107152736.BJPBLXGO@linutronix.de> (raw)
In-Reply-To: <20241107111821.3417762-1-bigeasy@linutronix.de>

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 <bigeasy@linutronix.de>
---
 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!
-- 
2.45.2



  parent reply	other threads:[~2024-11-07 15:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07 11:13 [PATCH v2 0/3] scftorture: Avoid kfree from IRQ context Sebastian Andrzej Siewior
2024-11-07 11:13 ` [PATCH v2 1/3] scftorture: Avoid additional div operation Sebastian Andrzej Siewior
2024-11-07 11:13 ` [PATCH v2 2/3] scftorture: Move memory allocation outside of preempt_disable region Sebastian Andrzej Siewior
2024-11-07 11:13 ` [PATCH v2 3/3] scftorture: Use a lock-less list to free memory Sebastian Andrzej Siewior
2024-11-07 18:31   ` Paul E. McKenney
2024-11-07 20:45   ` Boqun Feng
2024-11-07 21:53     ` Paul E. McKenney
2024-11-08 10:32     ` Sebastian Andrzej Siewior
2024-11-07 15:27 ` Sebastian Andrzej Siewior [this message]
2024-11-07 19:05 ` [PATCH v2 0/3] scftorture: Avoid kfree from IRQ context Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241107152736.BJPBLXGO@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=boqun.feng@gmail.com \
    --cc=cl@linux.com \
    --cc=elver@google.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=longman@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=penberg@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rientjes@google.com \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox