From: "Chris Friesen" <cfriesen@nortel.com>
To: ego@in.ibm.com
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
Balbir Singh <balbir@in.ibm.com>, Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org,
Dipankar Sarma <dipankar@in.ibm.com>
Subject: Re: [PATCH] sched: Fix __load_balance_iterator() for cfq with only one task
Date: Fri, 12 Sep 2008 09:52:57 -0600 [thread overview]
Message-ID: <48CA9059.1020209@nortel.com> (raw)
In-Reply-To: <20080905123004.GD6238@in.ibm.com>
Gautham R Shenoy wrote:
> sched: Fix __load_balance_iterator() for cfq with only one task.
>
> From: Gautham R Shenoy <ego@in.ibm.com>
>
> The __load_balance_iterator() returns a NULL when there's only one
> sched_entity which is a task. It is caused by the following code-path.
>
>
> /* Skip over entities that are not tasks */
> do {
> se = list_entry(next, struct sched_entity, group_node);
> next = next->next;
> } while (next != &cfs_rq->tasks && !entity_is_task(se));
>
> if (next == &cfs_rq->tasks)
> return NULL;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> This will return NULL even when se is a task.
Thank you! I'd been looking suspiciously at this routine as well due to
strange load-balancing behaviour that I saw while testing the fair group
code, but I hadn't yet tracked down the exact problem.
Peter/Ingo, this appears to explain the issues described in the mail I
sent on the 4th. After applying this change the imbalance between tasks
in the same group is substantially reduced.
Chris
prev parent reply other threads:[~2008-09-12 15:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-05 12:30 [PATCH] sched: Fix __load_balance_iterator() for cfq with only one task Gautham R Shenoy
2008-09-05 15:13 ` Peter Zijlstra
2008-09-05 17:23 ` Peter Zijlstra
2008-09-12 6:35 ` Gautham R Shenoy
2008-09-12 6:56 ` Peter Zijlstra
2008-09-12 7:05 ` Mike Galbraith
2008-09-12 10:57 ` Mike Galbraith
2008-09-12 11:07 ` Gautham R Shenoy
2008-09-12 15:52 ` Chris Friesen [this message]
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=48CA9059.1020209@nortel.com \
--to=cfriesen@nortel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=balbir@in.ibm.com \
--cc=dipankar@in.ibm.com \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=svaidy@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