mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dipankar Sarma <dipankar@in.ibm.com>
To: Andrea Arcangeli <andrea@suse.de>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>,
	Arjan van de Ven <arjanv@redhat.com>,
	tiwai@suse.de, Robert Love <rml@ximian.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RCU for low latency (experimental)
Date: Thu, 25 Mar 2004 04:41:45 +0530	[thread overview]
Message-ID: <20040324231145.GB12035@in.ibm.com> (raw)
In-Reply-To: <20040324225326.GH2065@dualathlon.random>

On Wed, Mar 24, 2004 at 11:53:26PM +0100, Andrea Arcangeli wrote:
> On Thu, Mar 25, 2004 at 03:09:15AM +0530, Dipankar Sarma wrote:
> > 
> > The difference here is that during the callbacks in the kernel thread, 
> > I don't disable softirqs unlike ksoftirqd thus giving it more opportunity for
> > preemption.
> 
> preemption where? in irq? softirqd will preempt just fine.
> 
> Also not that while we process the callbacks in softirqd, the irqs will
> stop running the callbacks, just like in your scenario. the callbacks
> and the other softirqs will be processed from user context, and it won't
> be different from scheduling krcud first and ksoftirqd later.

It is different because the heart of ksoftirqd - do_softirq() is
run with local_bh_disable(). Sure, you get chances to preempt
there, but not as much as krcud which runs completely in process
context. Of course, it depends on how long we stay with
softirqs disabled in do_softirq().

> > I had already been testing this for the DoS issue, but I tried it
> > with amlat on a 2.4 GHz (UP) P4 xeon with 256MB ram and dbench 32 in a
> > loop. Here are the results (CONFIG_PREEMPT = y) -
> > 
> > 2.6.0 vanilla 		- 711 microseconds
> > 2.6.0 + throttle-rcu 	- 439 microseconds
> > 2.6.0 + rcu-low-lat 	- 413 microseconds
> > 
> > So under dbench workload atleast, throttling RCU works just as
> > good as offloading them to a kernel thread (krcud) as rcu-low-lat
> > does.
> 
> very nice.

Yes. BTW, throttle-rcu too can't avoid route cache overflow under
DoS stress test. Different problem, but I just wanted to mention
this. I will publish those results separately.


> > I used the following throttle-rcu patch with rcupdate.rcumaxbatch
> > set to 16 and rcupdate.rcuplugticks set to 0. That is essentially
> > equvalent to Andrea's earler suggestion. I have so many knobs in
> > the patch because I had written it earlier for other experiments.
> > Anyway, if throttling works as well as this in terms of latency
> > for other workloads as well and there isn't any OOM situations,
> > it is preferable to creating another per-cpu thread.
> 
> I don't think this is enough (it is enough for the above workload
> though, maybe for the dcache too, but it's not generic enough), 16
> callbacks per tick too low frequency, it may not keep up, that's why I

That was not 16 callbacks per tick, it was 16 callbacks in one
batch of a single softirq. And then I reschedule the RCU tasklet
to process the rest. I am planning to vary this and see if we
should do even less per softirq.

> But I certainly agree this is a nice solution in practice (at least with
> all the common usages).

Needs more testing with other workloads. I will have some more results
with the tiny files test.

Thanks
Dipankar

  reply	other threads:[~2004-03-24 23:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-23 10:17 Dipankar Sarma
2004-03-23 10:25 ` Andrew Morton
2004-03-23 10:41   ` Dipankar Sarma
2004-03-23 10:35 ` Arjan van de Ven
2004-03-23 10:45   ` Dipankar Sarma
2004-03-23 12:31   ` Andrea Arcangeli
2004-03-23 12:40     ` Dipankar Sarma
2004-03-23 12:50       ` Andrea Arcangeli
2004-03-24 17:26         ` Paul E. McKenney
2004-03-24 17:51           ` Andrea Arcangeli
2004-03-24 20:02             ` Paul E. McKenney
2004-03-24 23:36               ` Andrea Arcangeli
2004-03-25  0:43                 ` Paul E. McKenney
2004-03-24 21:39             ` Dipankar Sarma
2004-03-24 22:53               ` Andrea Arcangeli
2004-03-24 23:11                 ` Dipankar Sarma [this message]
2004-03-24 23:34                   ` Andrea Arcangeli
2004-03-24 23:46                     ` Dipankar Sarma
2004-03-24 23:51                       ` Andrea Arcangeli
2004-03-28 16:53                       ` Takashi Iwai
2004-03-28 17:20                         ` Dipankar Sarma
2004-03-28 17:28                           ` Takashi Iwai
2004-03-29 10:43                             ` Takashi Iwai
2004-03-29 12:20                               ` Dipankar Sarma
2004-03-23 12:40     ` Arjan van de Ven
2004-03-23 12:29 ` Andrea Arcangeli
2004-03-23 12:34   ` Dipankar Sarma
2004-03-23 12:46     ` Andrea Arcangeli

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=20040324231145.GB12035@in.ibm.com \
    --to=dipankar@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=andrea@suse.de \
    --cc=arjanv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@us.ibm.com \
    --cc=rml@ximian.com \
    --cc=tiwai@suse.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®