mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Andrea Righi <righi.andrea@gmail.com>
Cc: Alexey Vlasov <renton@renton.name>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Attaching a process to cgroups
Date: Tue, 24 Jul 2012 03:19:15 +0200	[thread overview]
Message-ID: <1343092755.7412.6.camel@marge.simpson.net> (raw)
In-Reply-To: <20120723204159.GB6379@thinkpad>

On Mon, 2012-07-23 at 22:41 +0200, Andrea Righi wrote: 
> On Thu, Jun 21, 2012 at 10:23:02AM +0200, Mike Galbraith wrote:
> > On Thu, 2012-06-21 at 11:54 +0400, Alexey Vlasov wrote: 
> > > On Wed, Jun 20, 2012 at 02:28:18PM +0200, Mike Galbraith wrote:
> > > > 
> > > > kernel/cgroup.c::cgroup_attach_task()
> > > > {
> > > > ...
> > > > 	synchronize_rcu();
> > > > ...
> > > > }
> > > 
> > > So nothing can be done here? (I mean if only I knew how to fix it I
> > > wouldn't ask about it ;)
> > 
> > Sure, kill the obnoxious thing, it's sitting right in the middle of the
> > userspace interface.
> > 
> > I banged on it a while back (wrt explosive android patches), extracted
> > RCU from the userspace interface.  It seemed to work great, much faster,
> > couldn't make it explode.  I wouldn't bet anything I wasn't willing to
> > immediately part with that the result was really really safe though ;-)
> > 
> > -Mike
> 
> JFYI,
> 
> I'm testing the following patch in a bunch of hosts and I wasn't able to
> make any of them to explode, even running a multi-threaded
> cgroup-intensive workload, but probably I was just lucky (or unlucky,
> depending on the point of view).
> 
> It is basically the same Not-signed-off-by work posted by Mike a while
> ago: https://lkml.org/lkml/2011/4/12/599.
> 
> In addition, I totally removed the synchronize_rcu() call from
> cgroup_attach_task() and added the call_rcu -> schedule_work removal
> also for css_set. The latter looks unnecessary to me from a logical
> point of view, or maybe I'm missing something, because I can't explain
> why with it I can't trigger any BUG / oops.
> 
> Mike, did you make any progress from your old patch?

No, it worked, but I couldn't prove it was really safe, so let it drop.

-Mike


  reply	other threads:[~2012-07-24  1:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-19 18:58 Alexey Vlasov
2012-06-20  3:34 ` Daisuke Nishimura
2012-06-20 11:08   ` Alexey Vlasov
2012-06-20 12:28 ` Mike Galbraith
2012-06-21  7:54   ` Alexey Vlasov
2012-06-21  8:23     ` Mike Galbraith
2012-06-21  8:26       ` Mike Galbraith
2012-06-26 18:06       ` Paul E. McKenney
2012-06-27  7:23         ` Mike Galbraith
2012-06-27 17:10           ` Paul E. McKenney
2012-06-28  2:40             ` Mike Galbraith
2012-07-23 20:41       ` Andrea Righi
2012-07-24  1:19         ` Mike Galbraith [this message]
2012-07-25 13:36   ` Alexey Vlasov
2012-07-25 13:57     ` Mike Galbraith
2012-07-26 13:02       ` Alexey Vlasov
2012-07-26 14:44         ` Mike Galbraith
2012-08-08 16:40       ` Alexey Vlasov
2012-08-08 16:51         ` Paul E. McKenney
2012-08-10  9:53           ` Alexey Vlasov

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=1343092755.7412.6.camel@marge.simpson.net \
    --to=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=renton@renton.name \
    --cc=righi.andrea@gmail.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