public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: Valdis.Kletnieks@vt.edu
Cc: linux-kernel@vger.kernel.org, vatsa@linux.vnet.ibm.com,
	a.p.zijlstra@chello.nl
Subject: Re: odd timing bug with cgroups?
Date: Mon, 16 Jun 2008 10:45:09 -0600	[thread overview]
Message-ID: <48569895.7020701@nortel.com> (raw)
In-Reply-To: <47364.1213416931@turing-police.cc.vt.edu>

Valdis.Kletnieks@vt.edu wrote:
> On Fri, 13 Jun 2008 15:38:29 MDT, Chris Friesen said:

>>This seems odd...I would think that as soon as the fork() call returns 
>>in the parent we should be able to put that task into a group.

> I'm admittedly shooting in the dark here, but remember that a successful
> fork() call returns *twice*.  Just because the *parent* has returned
> doesn't mean that the *child* has finished all the processing and returned
> as well - it may be delayed by other kernel threads etc and still not quite
> ready for tweaking.

I was thinking something like this as well, like maybe we can't move the 
child to another group until it gets scheduled in once, or something 
similar.

If that is the case, I think it's a bug--on return from fork() the 
child's pid is visible (because the parent knows it) and so it should be 
valid to use for any operation that takes a pid.

Chris

  reply	other threads:[~2008-06-16 16:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13 21:38 odd timing bug with cgroups? Chris Friesen
2008-06-14  4:15 ` Valdis.Kletnieks
2008-06-16 16:45   ` Chris Friesen [this message]
2008-06-16 21:29     ` odd timing bug with cgroups -- solved Chris Friesen

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=48569895.7020701@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vatsa@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