public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
To: a.p.zijlstra@chello.nl
Cc: Ingo Molnar <mingo@elte.hu>,
	aneesh.kumar@linux.vnet.ibm.com, dhaval@linux.vnet.ibm.com,
	linux-kernel@vger.kernel.org, Balbir Singh <balbir@in.ibm.com>
Subject: set_task_rq bug?
Date: Wed, 2 Apr 2008 13:22:55 +0530	[thread overview]
Message-ID: <20080402075255.GE17617@linux.vnet.ibm.com> (raw)

For the case of CONFIG_RT_GROUP_SCHED and !CONFIG_FAIR_GROUP_SCHED, this
piece of code seems to be wrong?

/* Change a task's cfs_rq and parent entity if it moves across
 * CPUs/groups */
static inline void set_task_rq(struct task_struct *p, unsigned int cpu)
{
#ifdef CONFIG_FAIR_GROUP_SCHED
        p->se.cfs_rq = task_group(p)->cfs_rq[cpu];
        p->se.parent = task_group(p)->se[cpu];
#endif

#ifdef CONFIG_RT_GROUP_SCHED
        p->rt.rt_rq  = task_group(p)->rt_rq[cpu];
        p->rt.parent = task_group(p)->rt_se[cpu];
#endif
}

Basically for the above config case, a task's p->se.cfs_rq is never set,
which seems to be incorrect, as lot of sched_fair.c (for ex:
enqueue_task_fair) banks on the availability of this information. It should 
atleast be set to &rq->cfs?

-- 
Regards,
vatsa

             reply	other threads:[~2008-04-02  7:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-02  7:52 Srivatsa Vaddagiri [this message]
2008-04-02  7:48 ` set_task_rq bug? Peter Zijlstra
2008-04-02  8:12   ` Srivatsa Vaddagiri

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=20080402075255.GE17617@linux.vnet.ibm.com \
    --to=vatsa@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=balbir@in.ibm.com \
    --cc=dhaval@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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