From: Uladzislau Rezki <urezki@gmail.com>
To: "Paul E . McKenney" <paulmck@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, RCU <rcu@vger.kernel.org>,
"Paul E . McKenney" <paulmck@kernel.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Michal Hocko <mhocko@suse.com>,
Andrew Morton <akpm@linux-foundation.org>,
Daniel Axtens <dja@axtens.net>,
Frederic Weisbecker <frederic@kernel.org>,
Neeraj Upadhyay <neeraju@codeaurora.org>,
Joel Fernandes <joel@joelfernandes.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
"Theodore Y . Ts'o" <tytso@mit.edu>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Oleksiy Avramchenko <oleksiy.avramchenko@sonymobile.com>
Subject: Re: [PATCH 1/2] rcuscale: add kfree_rcu() single-argument scale test
Date: Thu, 4 Feb 2021 15:14:13 +0100 [thread overview]
Message-ID: <20210204141413.GB1904@pc638.lan> (raw)
In-Reply-To: <20210129200505.5273-1-urezki@gmail.com>
Hello, Paul.
> To stress and test a single argument of kfree_rcu() call, we
> should to have a special coverage for it. We used to have it
> in the test-suite related to vmalloc stressing. The reason is
> the rcuscale is a correct place for RCU related things.
>
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> ---
> kernel/rcu/rcuscale.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
> index 06491d5530db..e17745a155f9 100644
> --- a/kernel/rcu/rcuscale.c
> +++ b/kernel/rcu/rcuscale.c
> @@ -94,6 +94,7 @@ torture_param(bool, shutdown, RCUSCALE_SHUTDOWN,
> torture_param(int, verbose, 1, "Enable verbose debugging printk()s");
> torture_param(int, writer_holdoff, 0, "Holdoff (us) between GPs, zero to disable");
> torture_param(int, kfree_rcu_test, 0, "Do we run a kfree_rcu() scale test?");
> +torture_param(int, kfree_rcu_test_single, 0, "Do we run a kfree_rcu() single-argument scale test?");
> torture_param(int, kfree_mult, 1, "Multiple of kfree_obj size to allocate.");
>
> static char *scale_type = "rcu";
> @@ -667,10 +668,14 @@ kfree_scale_thread(void *arg)
>
> for (i = 0; i < kfree_alloc_num; i++) {
> alloc_ptr = kmalloc(kfree_mult * sizeof(struct kfree_obj), GFP_KERNEL);
> +
> if (!alloc_ptr)
> return -ENOMEM;
>
> - kfree_rcu(alloc_ptr, rh);
> + if (kfree_rcu_test_single)
> + kfree_rcu(alloc_ptr);
> + else
> + kfree_rcu(alloc_ptr, rh);
> }
>
> cond_resched();
> --
> 2.20.1
>
What is about this change? Do you have any concern or comments?
--
Vlad Rezki
next prev parent reply other threads:[~2021-02-04 14:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 20:05 [PATCH 1/2] rcuscale: add kfree_rcu() single-argument scale test Uladzislau Rezki (Sony)
2021-01-29 20:05 ` [PATCH 2/2] kvfree_rcu: Use same set of flags as for single-argument Uladzislau Rezki (Sony)
2021-02-04 22:04 ` Paul E. McKenney
2021-02-08 12:46 ` Uladzislau Rezki
2021-02-04 14:14 ` Uladzislau Rezki [this message]
2021-02-04 21:46 ` [PATCH 1/2] rcuscale: add kfree_rcu() single-argument scale test Paul E. McKenney
2021-02-09 20:13 ` Uladzislau Rezki
2021-02-10 1:00 ` Paul E. McKenney
2021-02-15 16:27 ` Uladzislau Rezki
2021-02-16 17:35 ` Paul E. McKenney
2021-02-17 17:47 ` Uladzislau Rezki
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=20210204141413.GB1904@pc638.lan \
--to=urezki@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bigeasy@linutronix.de \
--cc=dja@axtens.net \
--cc=frederic@kernel.org \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.com \
--cc=mpe@ellerman.id.au \
--cc=neeraju@codeaurora.org \
--cc=oleksiy.avramchenko@sonymobile.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).