From: Peter Zijlstra <peterz@infradead.org>
To: byungchul.park@lge.com
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, pjt@google.com
Subject: Re: [PATCH v2] sched: let __sched_period() use rq's nr_running
Date: Mon, 13 Jul 2015 10:26:09 +0200 [thread overview]
Message-ID: <20150713082609.GU19282@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1436515890-10792-1-git-send-email-byungchul.park@lge.com>
On Fri, Jul 10, 2015 at 05:11:30PM +0900, byungchul.park@lge.com wrote:
> From: Byungchul Park <byungchul.park@lge.com>
>
> __sched_period() returns a period which a rq can have. the period has to be
> stretched by the number of task *the rq has*, when nr_running > nr_latency.
> otherwise, task slice can be very smaller than sysctl_sched_min_granularity
> depending on the position of tg hierarchy when CONFIG_FAIR_GROUP_SCHED.
>
> Signed-off-by: Byungchul Park <byungchul.park@lge.com>
> ---
> kernel/sched/fair.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 09456fc..8ae7aeb 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -635,7 +635,7 @@ static u64 __sched_period(unsigned long nr_running)
> */
> static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
> {
> - u64 slice = __sched_period(cfs_rq->nr_running + !se->on_rq);
> + u64 slice = __sched_period(rq_of(cfs_rq)->nr_running + !se->on_rq);
>
> for_each_sched_entity(se) {
> struct load_weight *load;
This really doesn't make sense; look at what that
for_each_sched_entity() loop does below this.
I agree that sched_slice() is a difficult proposition in the face of
cgroup, but everything is, cgroups suck arse, they make everything hard.
next prev parent reply other threads:[~2015-07-13 8:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 8:11 [PATCH v2] sched: let __sched_period() use rq's nr_running byungchul.park
2015-07-10 13:31 ` Morten Rasmussen
2015-07-13 0:56 ` Byungchul Park
2015-07-13 7:07 ` Mike Galbraith
2015-07-13 8:29 ` Byungchul Park
2015-07-13 10:22 ` Mike Galbraith
2015-07-13 11:07 ` Byungchul Park
2015-07-13 12:30 ` Mike Galbraith
2015-07-14 2:07 ` Byungchul Park
2015-07-14 2:30 ` Mike Galbraith
2015-07-13 8:26 ` Peter Zijlstra [this message]
2015-07-13 9:25 ` Byungchul Park
2015-07-14 2:26 ` Byungchul Park
2015-07-14 9:26 ` Byungchul Park
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=20150713082609.GU19282@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=byungchul.park@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pjt@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.