From: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
To: "Dmitry Adamushko" <dmitry.adamushko@gmail.com>
Cc: sukadev@us.ibm.com, balbir@in.ibm.com,
Containers <containers@lists.osdl.org>,
ckrm-tech@lists.sourceforge.net, linux-kernel@vger.kernel.org,
dhaval@linux.vnet.ibm.com, "Ingo Molnar" <mingo@elte.hu>,
efault@gmx.de
Subject: Re: [BUG]: Crash with CONFIG_FAIR_CGROUP_SCHED=y
Date: Fri, 9 Nov 2007 17:41:57 +0530 [thread overview]
Message-ID: <20071109121157.GA24630@linux.vnet.ibm.com> (raw)
In-Reply-To: <b647ffbd0711090259u7f2f2f64qe8b6330e55d4b99f@mail.gmail.com>
On Fri, Nov 09, 2007 at 11:59:15AM +0100, Dmitry Adamushko wrote:
> > - The second problem exposed by this test is that task_new_fair()
> > assumes that parent and child will be part of the same group (which
> > needn't be as this test shows). As a result, cfs_rq->curr can be NULL
> > for the child.
>
> Would it be better, logically-wise, to use is_same_group() instead?
> Although, we can't have 2 groups with cfs_rq->curr != NULL on the same
> CPU... so if the child belongs to another group, it's cfs_rq->curr is
> automatically NULL indeed.
Yeah ..I feel safe with an explicit !curr check, perhaps with a comment like
below added to explain when curr can be NULL?
---
kernel/sched_fair.c | 1 +
1 files changed, 1 insertion(+)
Index: current/kernel/sched_fair.c
===================================================================
--- current.orig/kernel/sched_fair.c
+++ current/kernel/sched_fair.c
@@ -1022,6 +1022,7 @@ static void task_new_fair(struct rq *rq,
update_curr(cfs_rq);
place_entity(cfs_rq, se, 1);
+ /* 'curr' will be NULL if the child belongs to a different group */
if (sysctl_sched_child_runs_first && this_cpu == task_cpu(p) &&
curr && curr->vruntime < se->vruntime) {
/*
--
Regards,
vatsa
next prev parent reply other threads:[~2007-11-09 11:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-08 23:48 [BUG]: Crash with CONFIG_FAIR_CGROUP_SCHED=y sukadev
2007-11-09 7:02 ` Srivatsa Vaddagiri
2007-11-09 8:45 ` Dmitry Adamushko
2007-11-09 10:14 ` Srivatsa Vaddagiri
2007-11-09 10:25 ` Ingo Molnar
2007-11-09 10:59 ` Dmitry Adamushko
2007-11-09 12:11 ` Srivatsa Vaddagiri [this message]
2007-11-09 16:05 ` Serge E. Hallyn
2007-11-10 23:13 ` sukadev
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=20071109121157.GA24630@linux.vnet.ibm.com \
--to=vatsa@linux.vnet.ibm.com \
--cc=balbir@in.ibm.com \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=containers@lists.osdl.org \
--cc=dhaval@linux.vnet.ibm.com \
--cc=dmitry.adamushko@gmail.com \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sukadev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox