mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <hofrat@osadl.org>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	linux-kernel@vger.kernel.org,
	Nicholas Mc Guire <hofrat@osadl.org>
Subject: [PATCH RFC] rcuperf: make timeout HZ independent
Date: Mon, 22 Aug 2016 13:21:05 +0200	[thread overview]
Message-ID: <1471864865-28040-1-git-send-email-hofrat@osadl.org> (raw)

Make the probability of ftrace dump not interfering with other writers 
grace period, HZ independent.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---

Problem found by coccinelle script

Passing in jiffies as value allows for this "fixed" delay varying by 
one order of magnitude. As it is intended to reduce the probability of 
interference this probability should not be dependent on the systems 
HZ setting. Its probably more cosmetic but I guess this is the cleaner
way for fixed delays.

Q: Could not really figure out why the _interruptible_ version is used
   here - I would assume that schedule_timeout() would be what is needed
   here, as this should simply be a fixed delay.

Patch was compile tested with: x86_64_defconfig + CONFIG_RCU_PERF_TEST=m

Patch is against 4.8.0-rc2 (localversion-next is -next-20160822)

 kernel/rcu/rcuperf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c
index 123ccbd..4cd8655 100644
--- a/kernel/rcu/rcuperf.c
+++ b/kernel/rcu/rcuperf.c
@@ -404,7 +404,8 @@ rcu_perf_writer(void *arg)
 				 perf_type, PERF_FLAG, me, MIN_MEAS);
 			if (atomic_inc_return(&n_rcu_perf_writer_finished) >=
 			    nrealwriters) {
-				schedule_timeout_interruptible(10);
+				schedule_timeout_interruptible(
+							msecs_to_jiffies(10));
 				rcu_ftrace_dump(DUMP_ALL);
 				PERFOUT_STRING("Test complete");
 				t_rcu_perf_writer_finished = t;
-- 
2.1.4

             reply	other threads:[~2016-08-22 11:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-22 11:21 Nicholas Mc Guire [this message]
2016-08-22 11:49 ` Paul E. McKenney
2016-08-22 12:19   ` Nicholas Mc Guire

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=1471864865-28040-1-git-send-email-hofrat@osadl.org \
    --to=hofrat@osadl.org \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.org \
    /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

all inboxes | Powered by JetHome®