All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Dipankar Sarma <dipankar@in.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
	mingo@elte.hu, akpm@linux-foundation.org,
	josht@linux.vnet.ibm.com, tytso@us.ibm.com, dvhltc@us.ibm.com,
	tglx@linutronix.de
Subject: Re: [PATCH 4/4 RFC] RCU: synchronize_sched() without migration
Date: Tue, 7 Aug 2007 13:18:18 -0700	[thread overview]
Message-ID: <20070807201818.GC8065@linux.vnet.ibm.com> (raw)
In-Reply-To: <20070807191429.GA31719@in.ibm.com>

On Wed, Aug 08, 2007 at 12:44:30AM +0530, Dipankar Sarma wrote:
> On Tue, Aug 07, 2007 at 11:52:26AM -0700, Paul E. McKenney wrote:
> > The combination of CPU hotplug and PREEMPT_RCU has resulted in deadlocks
> > due to the migration-based implementation of synchronize_sched() in -rt.
> > This experimental patch maps synchronize_sched() back onto Classic RCU,
> > eliminating the migration, thus hopefully also eliminating the deadlocks.
> > It is not clear that this is a good long-term approach, but it will at
> > least permit people doing CPU hotplug in -rt kernels additional wiggle
> > room in their design and implementation.
> > 
> > The basic approach is to cause the -rt kernel to incorporate rcuclassic.c
> > as well as rcupreempt.c, but to #ifdef out the conflicting portions of
> > rcuclassic.c so that only the code needed to implement synchronize_sched()
> > remains in a PREEMPT_RT build.  Invocations of grace-period detection
> > from the scheduling-clock interrupt go to rcuclassic.c, which then invokes
> > the corresponding functions in rcupreempt.c (with _rt suffix added to
> > keep the linker happy).  Also applies the RCU_SOFTIRQ to classic RCU.
> > The bulk of this patch just moves code around.
> > 
> > If this patch does turn out to be the right approach, the #ifdefs in
> > kernel/rcuclassic.c might be dealt with.  ;-)
> 
> I think the right thing to do would be to fix cpu hotplug to
> use a simple reference count, as the latest patches Gautham
> is working on. That simplifies the implementation from the
> earlier version with a per-cpu reference counter with RCU.
> No freezer, no lock.

Works for me -- I will just keep this patch for testing of the
CPU hotplug stuff I am adding to preemptible RCU.  Speaking of which,
any advise on good testing methods for CPU hotplug would be greatly
appreciated!!!

						Thanx, Paul

      reply	other threads:[~2007-08-07 20:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07 18:39 [PATCH 0/4 RFC] preemptible RCU Paul E. McKenney
2007-08-07 18:41 ` Paul E. McKenney
2007-08-07 18:43 ` [PATCH 1/4 RFC] RCU: Fix barriers Paul E. McKenney
2007-08-07 18:48 ` [PATCH 3/4 RFC] RCU: preemptible RCU Paul E. McKenney
2007-08-07 19:18   ` Peter Zijlstra
2007-08-08  5:32     ` Paul E. McKenney
2007-08-08  9:10   ` John Sigler
2007-08-08 13:09     ` Paul E. McKenney
2007-08-07 18:52 ` [PATCH 4/4 RFC] RCU: synchronize_sched() without migration Paul E. McKenney
2007-08-07 19:14   ` Dipankar Sarma
2007-08-07 20:18     ` Paul E. McKenney [this message]

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=20070807201818.GC8065@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=dipankar@in.ibm.com \
    --cc=dvhltc@us.ibm.com \
    --cc=josht@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=tytso@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.