mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Turner <pjt@google.com>
To: peterz@infradead.org, linux-kernel@vger.kernel.org
Subject: Bug in SCHED_IDLE interaction with group scheduling?
Date: Fri, 10 Jul 2009 17:05:16 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.1.00.0907101649570.29914@kitami.corp.google.com> (raw)

Hi Peter,

It seems like there's an assumption in the sched_idle policy check in 
place_entity that the sched_entity we are looking at belongs to a task?

- Paul

--

sched: bug in SCHED_IDLE interaction with group scheduling

One of the isolation modifications for SCHED_IDLE is the unitization of sleeper
credit.  However the check for this assumes that the sched_entity we're placing
always belongs to a task.

This is potentially not true with group scheduling and leaves us rummaging
randomly when we try to pull the policy.

Signed-off-by: Paul Turner <pjt@google.com>
---
 kernel/sched_fair.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index ba7fd6e..7c248dc 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -687,7 +687,8 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
 			 * all of which have the same weight.
 			 */
 			if (sched_feat(NORMALIZED_SLEEPER) &&
-					task_of(se)->policy != SCHED_IDLE)
+					(!entity_is_task(se) ||
+					 task_of(se)->policy != SCHED_IDLE))
 				thresh = calc_delta_fair(thresh, se);
 
 			vruntime -= thresh;
-- 
1.5.4.3


             reply	other threads:[~2009-07-11  0:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-11  0:05 Paul Turner [this message]
2009-07-11  8:01 ` Ingo Molnar
2009-07-11  8:21 ` [tip:sched/urgent] sched: Fix bug in SCHED_IDLE interaction with group scheduling tip-bot for Paul Turner

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=alpine.DEB.1.00.0907101649570.29914@kitami.corp.google.com \
    --to=pjt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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

all inboxes | Powered by JetHome®