Linux Container Development
 help / color / mirror / Atom feed
From: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: "Daisuke Miyakawa (宮川 大輔)"
	<dmiyakawa-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	"Peter Zijlstra"
	<a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org>,
	"Linux Containers"
	<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	"balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org"
	<balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	"Pavel Emelianov" <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
Subject: Re: [RFC] Transactional CGroup task attachment
Date: Fri, 11 Jul 2008 17:48:14 -0700	[thread overview]
Message-ID: <1215823694.5456.382.camel@localhost.localdomain> (raw)
In-Reply-To: <6599ad830807111718ye005349yaa31e729c233474f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


On Fri, 2008-07-11 at 17:18 -0700, Paul Menage wrote:
> On Fri, Jul 11, 2008 at 5:03 PM, Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
> >> struct cgroup_attach_state {
> >
> > nit: How about naming it cgroup_attach_request or
> > cgroup_attach_request_state? I suggest this because it's not really
> > "state" that's kept beyond the prepare-then-(commit|abort) sequence.
> 
> State doesn't have to be long-lived to be state. But I'm not too
> worried about the exact name for it, if people have other preferences.
> 
> >
> > What about the task->alloc_lock? Might that need to be taken by multiple
> > subsystems? See my next comment.
> 
> My thought was that cgroups would take that anyway prior to calling
> prepare_attach_nosleep(), since it's a requirement for changing
> task->cgroups anyway.

Yeah, that makes sense.

> >
> > Rather than describing what might be called later for each API entry
> > separately it might be simpler to prefix the whole API/protocol
> > description with something like:
> > ======
> > A successful return from prepare_X will cause abort_X to be called if
> > any of the prepatory calls fail. (where X is either sleep or nosleep)
> >
> > A successful return from prepare_X will cause commit to be called if all
> > of the prepatory calls succeed. (where X is either sleep or nosleep)
> >
> > Otherwise no calls to abort_X or commit will be made. (where X is either
> > sleep or nosleep)
> 
> I'll play with working that into the description.
> 
> > I think that's correct based on your descriptions. Of course changing
> > this only makes sense if this proposal will go into Documentation/ in
> > some form..
> 
> Yes, we'd definitely need to document this in some detail.
> 
> >
> >        Allowing prepare_X to hold locks when it has exitted seems ripe for
> > introducing two separate subsystems that inadvertently take locks out of
> > order.
> 
> Yes, but I'm not sure that there's much that we can do about that. If
> we want to guarantee to be able to rollback one subsystem when a later
> subsystem fails then we have to let the earlier subsystems continue to
> hold locks. Or is this too ambitious a goal to support?

	I can't see a better way to support that goal and it doesn't seem
overly ambitious to me. Just needs a somewhat specific test
configuration for new subsystem patches to detect the deadlock issue.

Cheers,
	-Matt Helsley

  parent reply	other threads:[~2008-07-12  0:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-10  6:46 [RFC] Transactional CGroup task attachment Paul Menage
     [not found] ` <6599ad830807092346j1fdb2ef9l2ca2b52e2e68096a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-10 11:23   ` Paul Jackson
2008-07-11  0:20   ` KAMEZAWA Hiroyuki
     [not found]     ` <20080711092058.754ad72e.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-07-14  6:28       ` Daisuke Nishimura
     [not found]         ` <20080714152822.c795f321.nishimura-YQH0OdQVrdy45+QrQBaojngSJqDPrsil@public.gmane.org>
2008-07-14  7:54           ` KAMEZAWA Hiroyuki
     [not found]             ` <20080714165444.65f1ac8e.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-07-14 12:36               ` Daisuke Nishimura
2008-07-14 19:16           ` Paul Menage
2008-07-11  2:14   ` Li Zefan
     [not found]     ` <4876C209.2010605-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2008-07-11  3:31       ` Paul Menage
2008-07-11 14:27   ` Serge E. Hallyn
     [not found]     ` <20080711142739.GA25338-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-07-11 15:23       ` Paul Menage
     [not found]         ` <6599ad830807110823l3835fba1sae3df01eeb3fa5da-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-11 15:34           ` Serge E. Hallyn
     [not found]             ` <20080711153421.GA31344-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-07-11 15:36               ` Paul Menage
2008-07-11 16:12   ` Balbir Singh
     [not found]     ` <48778677.3040308-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-07-11 20:41       ` Paul Menage
2008-07-12  0:03   ` Matt Helsley
     [not found]     ` <1215821034.5456.357.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-07-12  0:18       ` Paul Menage
     [not found]         ` <6599ad830807111718ye005349yaa31e729c233474f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-12  0:48           ` Matt Helsley [this message]
     [not found]             ` <1215823694.5456.382.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-07-12  1:49               ` Paul Menage
     [not found]                 ` <6599ad830807111849q7aaf8226tba15193fa23f9531-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-12  2:03                   ` Matt Helsley
     [not found]                     ` <1215828216.5456.409.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-07-12  2:09                       ` Paul Menage
     [not found]                         ` <6599ad830807111909j4d777735ree2ee17dfcdda853-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-14 10:56                           ` Peter Zijlstra
2008-07-14 10:50       ` Peter Zijlstra

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=1215823694.5456.382.camel@localhost.localdomain \
    --to=matthltc-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org \
    --cc=balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=dmiyakawa-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
    /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