All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
To: Vincent Guittot
	<vincent.guittot-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Odin Ugedal <odin-RObV4cXtwVA@public.gmane.org>,
	Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Juri Lelli <juri.lelli-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Dietmar Eggemann <dietmar.eggemann-5wv7dgnIgG8@public.gmane.org>,
	Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>,
	Ben Segall <bsegall-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Mel Gorman <mgorman-l3A5Bk7waGM@public.gmane.org>,
	Daniel Bristot de Oliveira
	<bristot-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"open list:CONTROL GROUP (CGROUP)"
	<cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-kernel
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v5] sched/fair: Correctly insert cfs_rq's to list on unthrottle
Date: Mon, 14 Jun 2021 15:10:21 +0200	[thread overview]
Message-ID: <YMdVPVMByhGjCUdl@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKfTPtCMqZZnbwfhw0gz1Bne4j7PcG-Ma02a=gmcGbjY1bHk=g@mail.gmail.com>

On Mon, Jun 14, 2021 at 02:01:55PM +0200, Vincent Guittot wrote:
> On Sat, 12 Jun 2021 at 13:31, Odin Ugedal <odin-RObV4cXtwVA@public.gmane.org> wrote:
> >
> > This fixes an issue where fairness is decreased since cfs_rq's can
> > end up not being decayed properly. For two sibling control groups with
> > the same priority, this can often lead to a load ratio of 99/1 (!!).
> >
> > This happen because when a cfs_rq is throttled, all the descendant cfs_rq's
> 
> s/happen/happens/
> 
> > will be removed from the leaf list. When they initial cfs_rq is
> > unthrottled, it will currently only re add descendant cfs_rq's if they
> > have one or more entities enqueued. This is not a perfect heuristic.
> >
> > Instead, we insert all cfs_rq's that contain one or more enqueued
> > entities, or it its load is not completely decayed.
> >
> > Can often lead to situations like this for equally weighted control
> > groups:
> >
> > $ ps u -C stress
> > USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
> > root       10009 88.8  0.0   3676   100 pts/1    R+   11:04   0:13 stress --cpu 1
> > root       10023  3.0  0.0   3676   104 pts/1    R+   11:04   0:00 stress --cpu 1
> >
> > Fixes: 31bc6aeaab1d ("sched/fair: Optimize update_blocked_averages()")
> > Signed-off-by: Odin Ugedal <odin-RObV4cXtwVA@public.gmane.org>
> 
> minor typo in the commit message otherwise
> 
> Reviewed-by: Vincent Guittot <vincent.guittot-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Thanks!

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Odin Ugedal <odin@uged.al>, Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	"open list:CONTROL GROUP (CGROUP)" <cgroups@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5] sched/fair: Correctly insert cfs_rq's to list on unthrottle
Date: Mon, 14 Jun 2021 15:10:21 +0200	[thread overview]
Message-ID: <YMdVPVMByhGjCUdl@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKfTPtCMqZZnbwfhw0gz1Bne4j7PcG-Ma02a=gmcGbjY1bHk=g@mail.gmail.com>

On Mon, Jun 14, 2021 at 02:01:55PM +0200, Vincent Guittot wrote:
> On Sat, 12 Jun 2021 at 13:31, Odin Ugedal <odin@uged.al> wrote:
> >
> > This fixes an issue where fairness is decreased since cfs_rq's can
> > end up not being decayed properly. For two sibling control groups with
> > the same priority, this can often lead to a load ratio of 99/1 (!!).
> >
> > This happen because when a cfs_rq is throttled, all the descendant cfs_rq's
> 
> s/happen/happens/
> 
> > will be removed from the leaf list. When they initial cfs_rq is
> > unthrottled, it will currently only re add descendant cfs_rq's if they
> > have one or more entities enqueued. This is not a perfect heuristic.
> >
> > Instead, we insert all cfs_rq's that contain one or more enqueued
> > entities, or it its load is not completely decayed.
> >
> > Can often lead to situations like this for equally weighted control
> > groups:
> >
> > $ ps u -C stress
> > USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
> > root       10009 88.8  0.0   3676   100 pts/1    R+   11:04   0:13 stress --cpu 1
> > root       10023  3.0  0.0   3676   104 pts/1    R+   11:04   0:00 stress --cpu 1
> >
> > Fixes: 31bc6aeaab1d ("sched/fair: Optimize update_blocked_averages()")
> > Signed-off-by: Odin Ugedal <odin@uged.al>
> 
> minor typo in the commit message otherwise
> 
> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>

Thanks!

  reply	other threads:[~2021-06-14 13:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12 11:28 [PATCH v5] sched/fair: Correctly insert cfs_rq's to list on unthrottle Odin Ugedal
2021-06-12 11:28 ` Odin Ugedal
2021-06-14 12:01 ` Vincent Guittot
2021-06-14 13:10   ` Peter Zijlstra [this message]
2021-06-14 13:10     ` Peter Zijlstra
2021-06-16 13:24 ` kernel test robot
2021-06-16 13:49 ` [tip: sched/urgent] " tip-bot2 for Odin Ugedal

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=YMdVPVMByhGjCUdl@hirez.programming.kicks-ass.net \
    --to=peterz-wegcikhe2lqwvfeawa7xhq@public.gmane.org \
    --cc=bristot-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=bsegall-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dietmar.eggemann-5wv7dgnIgG8@public.gmane.org \
    --cc=juri.lelli-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mgorman-l3A5Bk7waGM@public.gmane.org \
    --cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=odin-RObV4cXtwVA@public.gmane.org \
    --cc=rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org \
    --cc=vincent.guittot-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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 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.