mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: dipankar@in.ibm.com
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Gautham Shenoy <ego@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: Fw: Re: [mm PATCH 4/6] RCU: (now) CPU hotplug
Date: Fri, 26 Jan 2007 11:28:37 -0800	[thread overview]
Message-ID: <20070126112837.059502fc.akpm@osdl.org> (raw)
In-Reply-To: <20070126191113.GA14770@in.ibm.com>

On Sat, 27 Jan 2007 00:41:13 +0530
Dipankar Sarma <dipankar@in.ibm.com> wrote:

> On Thu, Jan 25, 2007 at 02:36:45AM +0530, Dipankar Sarma wrote:
> > On Wed, Jan 24, 2007 at 08:15:59AM -0800, Paul E. McKenney wrote:
> > 
> > It should be relatively easy. Setting the offlined cpu's flags
> > to neutral state should do the trick in most cases.
> > I will send out the patches tomorrow after reviewing the code
> > some more.
> 
> Famous last words. 
> 
> It turns out that I have been bitten by the ugly cpu hotplug
> locking mess while trying to get preemptible RCU code working
> with CPU hotplug. The per-subsystem locking thing isn't really
> user-friendly. Here is the dependency -
> 
> In cpu hotplug path (after CPU_LOCK_ACQUIRE) -
> 
> CPU_DOWN_PREPARE:sched domains -> detach_destroy_domains() ->
> 			synchronize_sched() -> sched_setaffinity()
> 
> sched_setaffinity() tries to acquire the scheduler cpu hotplug
> mutex and deadlocks.
> 
> I see no easy way of getting around this - doing "cpu hotplug locked"
> version of all those APIs would add lots of code which is bad.
> We could try Gautham's idea of letting  each subsystem maintain
> its own online cpu mask, but I bet implementing sched_setaffinity()
> would not be very easy despite this.

Suggest you just ignore cpu hotplug locking, if that helps.

> What is the status on this now ?

Stalled, apparently.

> Is this a good example to
> show why per-subsystem locks might be unmaintainable ?

Maybe.  It might also be a good example of confused design.

> Can we go back

"back" assumes it was once present.  It wasn't.

> to a simple

"simple" hasn't been demonstrated.  New lock types and their use are never
simple, especially magic ones.

> scalable refcount model
> for CPU hotplug now ?

The plan is, I hope, to rip it all out and do freeze_processes() on the
hotplug side, so nobody else needs to worry about cpu hotplug any more. 
But at present everyone seems to be in hiding.

  reply	other threads:[~2007-01-26 19:51 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070124011519.GG1613@linux.vnet.ibm.com>
     [not found] ` <20070124090111.GC27221@in.ibm.com>
     [not found]   ` <20070124161559.GA1762@linux.vnet.ibm.com>
     [not found]     ` <20070124210645.GA19650@in.ibm.com>
2007-01-26 19:11       ` Dipankar Sarma
2007-01-26 19:28         ` Andrew Morton [this message]
2007-01-26 19:46           ` Dipankar Sarma
2007-01-26 20:17             ` Andrew Morton
2007-01-26 20:44               ` Dipankar Sarma
2007-01-26 21:29                 ` Andrew Morton
2007-01-28 22:47                   ` Paul E. McKenney
2007-01-28 23:30                     ` Andrew Morton
2007-01-29  2:40                       ` Paul E. McKenney
2007-01-29 19:12                       ` Ingo Molnar
2007-01-30  2:45                         ` Paul E. McKenney
2007-01-30  7:33                           ` Ingo Molnar
2007-01-30 16:02                             ` Paul E. McKenney
2007-01-30 16:44                               ` Rafael J. Wysocki
2007-01-30 18:27                                 ` Andrew Morton
2007-01-30 19:49                                   ` Paul E. McKenney
2007-01-31 23:10                                     ` Paul E. McKenney
2007-02-03  0:17                                       ` Pavel Machek
2007-02-04  4:39                                         ` Paul E. McKenney
2007-02-04 11:08                                           ` Rafael J. Wysocki
2007-02-04 12:53                                             ` Pavel Machek
2007-02-04 13:46                                               ` Rafael J. Wysocki
2007-02-04 13:50                                                 ` Pavel Machek
2007-02-04 13:59                                                   ` Rafael J. Wysocki
2007-02-03  0:01                                 ` Pavel Machek
2007-02-03 22:27                                   ` Rafael J. Wysocki
2007-02-04  0:31                                     ` Paul E. McKenney
2007-01-30 14:02                           ` Gautham R Shenoy
2007-01-30 16:47                             ` 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=20070126112837.059502fc.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=dipankar@in.ibm.com \
    --cc=ego@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.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

Powered by JetHome