From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Dinakar Guniguntala <dino@in.ibm.com>
Subject: Re: v2.6.21.4-rt11
Date: Tue, 12 Jun 2007 18:27:46 -0700 [thread overview]
Message-ID: <20070613012746.GH8544@linux.vnet.ibm.com> (raw)
In-Reply-To: <20070612213758.GA6173@elte.hu>
On Tue, Jun 12, 2007 at 11:37:58PM +0200, Ingo Molnar wrote:
>
> * Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
>
> > Not a biggie for me, since I can easily do the taskset commands to
> > force the processes to spread out, but I am worried that casual users
> > of rcutorture won't know to do this -- thus not really torturing RCU.
> > It would not be hard to modify rcutorture to affinity the tasks so as
> > to spread them, but this seems a bit ugly.
>
> does it get any better if you renice them from +19 to 0? (and then back
> to +19?)
Interesting!
That did spread them evenly across two CPUs, but not across all four.
I took a look at CFS, which seems to operate in terms of milliseconds.
Since the rcu_torture_reader() code enters the scheduler on each
interation, it would not give CFS millisecond-scale bursts of CPU
consumption, perhaps not allowing it to do reasonable load balancing.
So I inserted the following code at the beginning of rcu_torture_reader():
set_user_nice(current, 19);
set_user_nice(current, 0);
for (idx = 0; idx < 1000; idx++) {
udelay(10);
}
set_user_nice(current, 19);
This worked much better:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
18600 root 39 19 0 0 0 R 50 0.0 0:09.57 rcu_torture_rea
18599 root 39 19 0 0 0 R 50 0.0 0:09.56 rcu_torture_rea
18598 root 39 19 0 0 0 R 49 0.0 0:10.33 rcu_torture_rea
18602 root 39 19 0 0 0 R 49 0.0 0:10.34 rcu_torture_rea
18596 root 39 19 0 0 0 R 47 0.0 0:09.48 rcu_torture_rea
18601 root 39 19 0 0 0 R 46 0.0 0:09.56 rcu_torture_rea
18595 root 39 19 0 0 0 R 45 0.0 0:09.23 rcu_torture_rea
18597 root 39 19 0 0 0 R 44 0.0 0:10.92 rcu_torture_rea
18590 root 39 19 0 0 0 R 10 0.0 0:02.23 rcu_torture_wri
18591 root 39 19 0 0 0 D 2 0.0 0:00.34 rcu_torture_fak
18592 root 39 19 0 0 0 D 2 0.0 0:00.35 rcu_torture_fak
18593 root 39 19 0 0 0 D 2 0.0 0:00.35 rcu_torture_fak
18594 root 39 19 0 0 0 D 2 0.0 0:00.33 rcu_torture_fak
18603 root 15 -5 0 0 0 S 1 0.0 0:00.06 rcu_torture_sta
(The first eight tasks are readers, while the last six tasks are update
and statistics threads that don't consume so much CPU, so the above is
pretty close to optimal.)
I stopped and restarted rcutorture several times, and it spread nicely
each time, at least aside from the time that makewhatis decided to fire
up just as I started rcutorture.
But this is admittedly a -very- crude hack.
One approach would be to make them all spin until a few milliseconds
after the last one was created. I would like to spread the readers
separately from the other tasks, which could be done by taking a two-stage
approach, spreading the writer and fakewriter tasks first, then spreading
the readers. This seems a bit nicer, and I will play with it a bit.
In the meantime, thoughts on more-maintainable ways of making this work?
Thanx, Paul
next prev parent reply other threads:[~2007-06-13 1:28 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-09 21:05 v2.6.21.4-rt11 Ingo Molnar
2007-06-11 1:19 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-11 7:36 ` v2.6.21.4-rt11 Ingo Molnar
2007-06-11 14:44 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-11 15:38 ` v2.6.21.4-rt11 Ingo Molnar
2007-06-11 15:55 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-11 17:18 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-11 20:44 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-11 22:18 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-12 21:37 ` v2.6.21.4-rt11 Ingo Molnar
2007-06-13 1:27 ` Paul E. McKenney [this message]
2007-06-12 6:03 ` v2.6.21.4-rt11 Eric St-Laurent
2007-06-12 7:32 ` v2.6.21.4-rt11 Ingo Molnar
2007-06-12 13:00 ` v2.6.21.4-rt11 Pallipadi, Venkatesh
2007-06-13 1:37 ` v2.6.21.4-rt11 Eric St-Laurent
2007-06-17 16:15 ` v2.6.21.4-rt11 Nelson Castillo
2007-06-17 16:43 ` v2.6.21.4-rt11 Thomas Gleixner
2007-06-17 16:49 ` v2.6.21.4-rt11 Nelson Castillo
2007-06-17 16:59 ` v2.6.21.4-rt11 Thomas Gleixner
2007-06-18 16:14 ` v2.6.21.4-rt11 Katsuya MATSUBARA
2007-06-19 4:04 ` v2.6.21.4-rt11 Thomas Gleixner
-- strict thread matches above, loose matches on Subject: below --
2007-06-10 17:50 v2.6.21.4-rt11 Miguel Botón
[not found] <20070613180451.GA16628@elte.hu>
[not found] ` <20070613184741.GC8125@linux.vnet.ibm.com>
[not found] ` <20070613185522.GA27335@elte.hu>
[not found] ` <20070613233910.GJ8125@linux.vnet.ibm.com>
[not found] ` <20070615144535.GA12078@elte.hu>
[not found] ` <20070615151452.GC9301@linux.vnet.ibm.com>
[not found] ` <20070615195545.GA28872@elte.hu>
[not found] ` <20070616011605.GH9301@linux.vnet.ibm.com>
[not found] ` <20070616084434.GG2559@linux.vnet.ibm.com>
[not found] ` <20070616161213.GA2994@linux.vnet.ibm.com>
2007-06-18 15:12 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-18 16:54 ` v2.6.21.4-rt11 Christoph Lameter
2007-06-18 17:35 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-18 17:59 ` v2.6.21.4-rt11 Christoph Lameter
2007-06-19 1:52 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-19 2:13 ` v2.6.21.4-rt11 Siddha, Suresh B
2007-06-19 2:15 ` v2.6.21.4-rt11 Siddha, Suresh B
2007-06-19 3:46 ` v2.6.21.4-rt11 Christoph Lameter
2007-06-19 5:49 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-19 8:07 ` v2.6.21.4-rt11 Ingo Molnar
2007-06-18 18:06 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-19 9:04 ` v2.6.21.4-rt11 Ingo Molnar
2007-06-19 10:43 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-19 14:33 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-19 19:15 ` v2.6.21.4-rt11 Christoph Lameter
2007-06-19 15:08 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-19 19:14 ` v2.6.21.4-rt11 Christoph Lameter
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=20070613012746.GH8544@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=dino@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@elte.hu \
--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