public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dipankar Sarma <dipankar@in.ibm.com>
To: Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
	Ingo Molnar <mingo@elte.hu>, Paul E McKenney <paulmck@us.ibm.com>
Subject: Re: [PATCH 3/4] RCU: preemptible RCU implementation
Date: Tue, 29 Aug 2006 07:03:14 +0530	[thread overview]
Message-ID: <20060829013314.GD32697@in.ibm.com> (raw)
In-Reply-To: <20060828204611.GB719@infradead.org>

On Mon, Aug 28, 2006 at 09:46:11PM +0100, Christoph Hellwig wrote:
> On Mon, Aug 28, 2006 at 09:42:22PM +0530, Dipankar Sarma wrote:
> > From: Paul McKenney <paulmck@us.ibm.com>
> > http://www.rdrop.com/users/paulmck/RCU/OLSrtRCU.2006.08.11a.pdf
> > 
> > This patch was developed as a part of the -rt kernel
> > development and meant to provide better latencies when
> > read-side critical sections of RCU don't disable preemption.
> > As a consequence of keeping track of RCU readers, the readers
> > have a slight overhead (optimizations in the paper).
> > This implementation co-exists with the "classic" RCU
> > implementations and can be switched to at compiler.
> 
> NACK.  While a readers can sleep rcu version definitly has it's
> we should make it all or nothing.  Either we always gurantee that
> a rcu reader can sleep or never without external patches.  Having
> this a config option is the ultimate defeat for any kind of bug
> reproducabilility.

Good point. RCU users that want to sleep in the read-side
critical sections should be using *srcu APIs* which are separate
from RCU APIs - srcu_read_lock(), srcu_read_unlock(), synchronize_srcu().
I think of CONFIG_PREEMPT_RCU as similar to CONFIG_PREEMPT where
preemption is allowed in certain sections in the kernel code.
This makes even more sense once CONFIG_PREEMPT_RT is in
mainline in some form. I should perhaps put in explicit checks
to disallow people from sleeping in RCU read-side
critical sections.

> Please make the patch undconditional and see if it doesn't cause
> any significant slowdowns in production-like scenaries and then
> we can switch over to the readers can sleep variant unconditionally
> at some point.

It is still some way from getting there. It needs per-cpu callback
queues for which I am working on a patch. It also needs some
more of Paul's work to reduce read-side overheads. However,
it is reasonably useful in low-end SMP systems for workloads
requiring better scheduling latencies, so I see no reason
not to provide this for CONFIG_PREEMPT users. Besides,
this is one step forward towards merging "crazy" stuff from
-rt :)

Thanks
Dipankar

  reply	other threads:[~2006-08-29  1:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-28 16:08 [PATCH 0/4] RCU: various merge candidates Dipankar Sarma
2006-08-28 16:10 ` [PATCH 1/4] RCU: split classic rcu Dipankar Sarma
2006-08-31  1:12   ` Paul E. McKenney
2006-08-28 16:11 ` [PATCH 2/4] RCU: use a separate softirq Dipankar Sarma
2006-08-31  1:13   ` Paul E. McKenney
2006-08-28 16:12 ` [PATCH 3/4] RCU: preemptible RCU implementation Dipankar Sarma
2006-08-28 20:46   ` Christoph Hellwig
2006-08-29  1:33     ` Dipankar Sarma [this message]
2006-08-28 16:13 ` [PATCH 4/4] RCU: clean up RCU trace Dipankar Sarma
2006-08-28 16:15 ` [PATCH 0/4] RCU: various merge candidates Arjan van de Ven
2006-08-28 16:29   ` Dipankar Sarma
2006-08-28 16:33     ` Arjan van de Ven
2006-08-28 16:43       ` Dipankar Sarma
2006-08-28 19:06 ` Andrew Morton
2006-08-28 19:16   ` Dipankar Sarma
2006-08-28 19:40     ` Andrew Morton
2006-08-29  0:23       ` Dipankar Sarma
2006-08-29  0:28         ` Andrew Morton
2006-08-30  0:40       ` Paul E. McKenney

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=20060829013314.GD32697@in.ibm.com \
    --to=dipankar@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@us.ibm.com \
    /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