mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@kernel.org, laijs@cn.fujitsu.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
	rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
	dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com,
	bobby.prani@gmail.com,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH tip/core/rcu 04/13] rcutorture: Allow negative values of nreaders to oversubscribe
Date: Tue, 12 May 2015 15:58:04 -0700	[thread overview]
Message-ID: <1431471493-5431-4-git-send-email-paulmck@linux.vnet.ibm.com> (raw)
In-Reply-To: <1431471493-5431-1-git-send-email-paulmck@linux.vnet.ibm.com>

From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

By default, with rcutorture.nreaders equal to -1, rcutorture provisions
N-1 reader kthreads, where N is the number of CPUs.  This avoids
rcutorture-induced stalls, but also avoids heavier levels of torture.
This commit therefore allows negative values of rcutorture.nreaders
to specify larger numbers of reader kthreads, so that for example
rcutorture.nreaders=-2 provisions N kthreads and rcutorture.nreaders=-5
provisions N+3 kthreads.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 kernel/rcu/rcutorture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index a67ef6ff86b0..7294d605c481 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -1701,7 +1701,7 @@ rcu_torture_init(void)
 	if (nreaders >= 0) {
 		nrealreaders = nreaders;
 	} else {
-		nrealreaders = num_online_cpus() - 1;
+		nrealreaders = num_online_cpus() - 2 - nreaders;
 		if (nrealreaders <= 0)
 			nrealreaders = 1;
 	}
-- 
1.8.1.5


  parent reply	other threads:[~2015-05-12 22:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 22:57 [PATCH tip/core/rcu 0/13] Torture-test updates for 4.2 Paul E. McKenney
2015-05-12 22:58 ` [PATCH tip/core/rcu 01/13] locktorture: fix deadlock in 'rw_lock_irq' type Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 02/13] rcutorture: Exchange TREE03 and TREE04 geometries Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 03/13] rcutorture: Exchange TREE03 and TREE08 NR_CPUS, speed up CPU hotplug Paul E. McKenney
2015-05-12 22:58   ` Paul E. McKenney [this message]
2015-05-13  1:03     ` [PATCH tip/core/rcu 04/13] rcutorture: Allow negative values of nreaders to oversubscribe josh
2015-05-13 17:23       ` Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 05/13] locktorture: Change longdelay_us to longdelay_ms Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 06/13] rcutorture: Replace barriers with smp_store_release() and smp_load_acquire() Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 07/13] rcutorture: Test SRCU cleanup code path Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 08/13] rcutorture: TASKS_RCU set directly, so don't explicitly set it Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 09/13] rcutorture: Update configuration fragments for rcutree.rcu_fanout_exact Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 10/13] rcutorture: Make rcutorture scripts force RCU_EXPERT Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 11/13] rcutorture: Update TREE_RCU-kconfig.txt Paul E. McKenney
2015-05-13  1:06     ` josh
2015-05-13 17:28       ` Paul E. McKenney
2015-05-13 22:13         ` josh
2015-05-12 22:58   ` [PATCH tip/core/rcu 12/13] rcutorture: Display "make oldconfig" errors Paul E. McKenney
2015-05-12 22:58   ` [PATCH tip/core/rcu 13/13] rcutorture: Allow repetition factors in Kconfig-fragment lists Paul E. McKenney
2015-05-13  1:07 ` [PATCH tip/core/rcu 0/13] Torture-test updates for 4.2 josh

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=1431471493-5431-4-git-send-email-paulmck@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=bobby.prani@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=dvhart@linux.intel.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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®