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>
Subject: Re: [PATCH] sched/fair: Limit sched_cfs_period_timer loop to avoid hard lockup
Date: Fri, 15 Mar 2019 12:17:07 -0400 [thread overview]
Message-ID: <20190315161707.GG27131@pauld.bos.csb> (raw)
In-Reply-To: <20190315160347.GZ5996@hirez.programming.kicks-ass.net>
On Fri, Mar 15, 2019 at 05:03:47PM +0100 Peter Zijlstra wrote:
> On Fri, Mar 15, 2019 at 11:30:42AM -0400, Phil Auld wrote:
>
> > In my defense here, all the fair.c imbalance pct code also uses 100 :)
>
> Yes, I know, I hate on that too ;-) Just never got around to fixing
> that.
>
>
> > with the below:
> >
> > [ 117.235804] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 2492, cfs_quota_us = 143554)
> > [ 117.346807] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 2862, cfs_quota_us = 164863)
> > [ 117.470569] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 3286, cfs_quota_us = 189335)
> > [ 117.574883] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 3774, cfs_quota_us = 217439)
> > [ 117.652907] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 4335, cfs_quota_us = 249716)
> > [ 118.090535] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 4978, cfs_quota_us = 286783)
> > [ 122.098009] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 5717, cfs_quota_us = 329352)
> > [ 126.255209] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 6566, cfs_quota_us = 378240)
> > [ 126.358060] cfs_period_timer[cpu2]: period too short, scaling up (new cfs_period_us 7540, cfs_quota_us = 434385)
> > [ 126.538358] cfs_period_timer[cpu9]: period too short, scaling up (new cfs_period_us 8660, cfs_quota_us = 498865)
> > [ 126.614304] cfs_period_timer[cpu9]: period too short, scaling up (new cfs_period_us 9945, cfs_quota_us = 572915)
> > [ 126.817085] cfs_period_timer[cpu9]: period too short, scaling up (new cfs_period_us 11422, cfs_quota_us = 657957)
> > [ 127.352038] cfs_period_timer[cpu9]: period too short, scaling up (new cfs_period_us 13117, cfs_quota_us = 755623)
> > [ 127.598043] cfs_period_timer[cpu9]: period too short, scaling up (new cfs_period_us 15064, cfs_quota_us = 867785)
> >
> >
> > Plus on repeats I see an occasional
> >
> > [ 152.803384] sched_cfs_period_timer: 9 callbacks suppressed
>
> That should be fine, right? It's a fallback for an edge case and
> shouldn't trigger too often anyway.
It doesn't hit the NMI, just takes a bit longer to get out. It is a little messier
output, but as you say, it's a fallback. If you're okay with it do you want to
just use your patch?
Otherwise, I'm happy to do a fixup v2.
>
> >> I'll rework the maths in the averaged version and post v2 if that makes sense.
> >
> > It may have the extra timer fetch, although maybe I could rework it so that it used the
> > nsstart time the first time and did not need to do it twice in a row. I had originally
> > reverted the hrtimer_forward_now() to hrtimer_forward() but put that back.
>
> Sure; but remember, simpler is often better, esp. for code that
> typically 'never' runs.
>
> > Also, fwiw, this was reported earlier by Anton Blanchard in https://lkml.org/lkml/2018/12/3/1047
>
> Bah, yes, I sometimes loose track of things :/
No worries. I just meant that to show I was not the only one with these low settings,
and to give credit, or whatever :)
Cheers,
Phil
--
next prev parent reply other threads:[~2019-03-15 16:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-13 15:08 [PATCH] sched/fair: Limit sched_cfs_period_timer loop to avoid hard lockup Phil Auld
2019-03-15 10:11 ` Peter Zijlstra
2019-03-15 10:33 ` Peter Zijlstra
2019-03-15 13:51 ` Phil Auld
2019-03-15 15:59 ` Peter Zijlstra
2019-03-15 16:19 ` Phil Auld
2019-03-15 13:30 ` Phil Auld
2019-03-15 16:29 ` Peter Zijlstra
2019-03-15 15:30 ` Phil Auld
2019-03-15 16:03 ` Peter Zijlstra
2019-03-15 16:17 ` Phil Auld [this message]
2019-03-18 13:29 ` Phil Auld
2019-03-18 17:14 ` bsegall
2019-03-18 17:52 ` 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=20190315161707.GG27131@pauld.bos.csb \
--to=pauld@redhat.com \
--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