From: bsegall@google.com
To: Peter Zijlstra <peterz@infradead.org>
Cc: bsegall@google.com, Vincent Guittot <vincent.guittot@linaro.org>,
mingo@redhat.com, juri.lelli@redhat.com,
dietmar.eggemann@arm.com, rostedt@goodmis.org, mgorman@suse.de,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/fair : prevent unlimited runtime on throttled group
Date: Tue, 21 Jan 2020 10:26:42 -0800 [thread overview]
Message-ID: <xm267e1koecd.fsf@bsegall-linux.svl.corp.google.com> (raw)
In-Reply-To: <20200120094625.GL14879@hirez.programming.kicks-ass.net> (Peter Zijlstra's message of "Mon, 20 Jan 2020 10:46:25 +0100")
Peter Zijlstra <peterz@infradead.org> writes:
> On Tue, Jan 14, 2020 at 10:29:43AM -0800, bsegall@google.com wrote:
>> Vincent Guittot <vincent.guittot@linaro.org> writes:
>>
>> > When a running task is moved on a throttled task group and there is no
>> > other task enqueued on the CPU, the task can keep running using 100% CPU
>> > whatever the allocated bandwidth for the group and although its cfs rq is
>> > throttled. Furthermore, the group entity of the cfs_rq and its parents are
>> > not enqueued but only set as curr on their respective cfs_rqs.
>> >
>> > We have the following sequence:
>> >
>> > sched_move_task
>> > -dequeue_task: dequeue task and group_entities.
>> > -put_prev_task: put task and group entities.
>> > -sched_change_group: move task to new group.
>> > -enqueue_task: enqueue only task but not group entities because cfs_rq is
>> > throttled.
>> > -set_next_task : set task and group_entities as current sched_entity of
>> > their cfs_rq.
>> >
>> > Another impact is that the root cfs_rq runnable_load_avg at root rq stays
>> > null because the group_entities are not enqueued. This situation will stay
>> > the same until an "external" event triggers a reschedule. Let trigger it
>> > immediately instead.
>>
>> Sounds reasonable to me, "moved group" being an explicit resched check
>> doesn't sound like a problem in general.
>
> Do I read that as an Ack from you Ben? :-)
Yeah,
Acked-by: Ben Segall <bsegall@google.com>
The only question I see is if we care about avoiding the overhead for
non-cfsb cases, but cgroup attach is already slow enough that it's
probably not a real problem, and it's reasonable to check if it's still
right to run this task in general.
next prev parent reply other threads:[~2020-01-21 18:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-14 14:13 [PATCH] sched/fair : prevent unlimited runtime on throttled group Vincent Guittot
2020-01-14 18:29 ` bsegall
2020-01-20 9:46 ` Peter Zijlstra
2020-01-21 18:26 ` bsegall [this message]
2020-01-29 11:32 ` [tip: sched/core] sched/fair: Prevent " tip-bot2 for Vincent Guittot
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=xm267e1koecd.fsf@bsegall-linux.svl.corp.google.com \
--to=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.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