From: Phil Auld <pauld@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Ben Segall <bsegall@google.com>,
Ingo Molnar <mingo@redhat.com>,
Anton Blanchard <anton@ozlabs.org>
Subject: Re: [PATCH v2] sched/fair: Limit sched_cfs_period_timer loop to avoid hard lockup
Date: Thu, 21 Mar 2019 14:32:24 -0400 [thread overview]
Message-ID: <20190321183224.GA15047@lorien.usersys.redhat.com> (raw)
In-Reply-To: <20190321180137.GQ6058@hirez.programming.kicks-ass.net>
On Thu, Mar 21, 2019 at 07:01:37PM +0100 Peter Zijlstra wrote:
> On Tue, Mar 19, 2019 at 09:00:05AM -0400, Phil Auld wrote:
> > sched/fair: Limit sched_cfs_period_timer loop to avoid hard lockup
> >
> > With extremely short cfs_period_us setting on a parent task group with a large
> > number of children the for loop in sched_cfs_period_timer can run until the
> > watchdog fires. There is no guarantee that the call to hrtimer_forward_now()
> > will ever return 0. The large number of children can make
> > do_sched_cfs_period_timer() take longer than the period.
>
> >
> > To prevent this we add protection to the loop that detects when the loop has run
> > too many times and scales the period and quota up, proportionally, so that the timer
> > can complete before then next period expires. This preserves the relative runtime
> > quota while preventing the hard lockup.
> >
> > A warning is issued reporting this state and the new values.
> >
> > v2: Math reworked/simplified by Peter Zijlstra.
> >
> > Signed-off-by: Phil Auld <pauld@redhat.com>
> > Cc: Ben Segall <bsegall@google.com>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
> > Cc: Anton Blanchard <anton@ozlabs.org>
>
> Thanks!
Thank you for your time and help.
What do you think about Cc: stable?
Cheers,
Phil
--
next prev parent reply other threads:[~2019-03-21 18:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-19 13:00 [PATCH v2] sched/fair: Limit sched_cfs_period_timer loop to avoid hard lockup Phil Auld
2019-03-21 18:01 ` Peter Zijlstra
2019-03-21 18:32 ` Phil Auld [this message]
2019-04-03 8:38 ` [tip:sched/core] " tip-bot for Phil Auld
2019-04-09 12:48 ` Phil Auld
2019-04-09 13:05 ` Peter Zijlstra
2019-04-09 13:15 ` Phil Auld
2019-04-16 13:33 ` Phil Auld
2019-04-16 16:18 ` Phil Auld
2019-04-16 15:32 ` [tip:sched/urgent] sched/fair: Limit sched_cfs_period_timer() " tip-bot for Phil Auld
2019-04-16 19:26 ` Phil Auld
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=20190321183224.GA15047@lorien.usersys.redhat.com \
--to=pauld@redhat.com \
--cc=anton@ozlabs.org \
--cc=bsegall@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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