Re: [PATCH 2/2] tick: Make sure tick timer is active when bypassing reprogramming
From: Levin, Alexander (Sasha Levin)
Date: Wed Jun 07 2017 - 00:18:38 EST
On Tue, Jun 06, 2017 at 04:52:29PM +0200, Frederic Weisbecker wrote:
> On Sat, Jun 03, 2017 at 01:00:53PM +0000, Levin, Alexander (Sasha Levin) wrote:
> > On Sat, Jun 03, 2017 at 02:42:43PM +0200, Frederic Weisbecker wrote:
> > > On Sat, Jun 03, 2017 at 08:06:41AM +0000, Levin, Alexander (Sasha Levin) wrote:
> > > > On Fri, Apr 21, 2017 at 04:00:55PM +0200, Frederic Weisbecker wrote:
> > > > > diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> > > > > index 502b320..be7ca4d 100644
> > > > > --- a/kernel/time/tick-sched.c
> > > > > +++ b/kernel/time/tick-sched.c
> > > > > @@ -783,8 +783,13 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
> > > > > tick = expires;
> > > > >
> > > > > /* Skip reprogram of event if its not changed */
> > > > > - if (ts->tick_stopped && (expires == ts->next_tick))
> > > > > - goto out;
> > > > > + if (ts->tick_stopped && (expires == ts->next_tick)) {
> > > > > + /* Sanity check: make sure clockevent is actually programmed */
> > > > > + if (likely(dev->next_event <= ts->next_tick))
> > > > > + goto out;
> > > > > +
> > > > > + WARN_ON_ONCE(1);
> > > > > + }
> > > >
> > > > I seem to be hitting that in a KVM vm, even without load (sometimes
> > > > right after boot):
> > >
> > > Ah, can you tell me which tree you were using? Is it tip/master?
> >
> > Its next-20170601: https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_pub_scm_linux_kernel_git_next_linux-2Dnext.git_commit_-3Fh-3Dnext-2D20170601-26id-3D3ab334ebe84e0dfd1cc3ea2fe77f5ce4406f7370&d=DwIBAg&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LRxpb6__0PomBTQ&r=bUtaaC9mlBij4OjEG_D-KMy3t3Ka3bY06suGz7ewY7g&m=0ex_DoQxODGZtsXpFBMXf2fPbFxv2ogjY9fVReKqbpk&s=t0F0_37WnCEpxAZR6WD3d_Q4n0Lp_2HCNOx3b_iOGtI&e=
> >
> > > Can you give me its HEAD and your config file?
> >
> > Attached config.
>
> Thanks Sasha!
>
> I couldn't reproduce it, that config boots fine on my kvm.
> Would you have the time to dump some traces for me?
>
> I'd need you to add this boot option: trace_event=hrtimer_cancel,hrtimer_start,hrtimer_expire_entry
> And boot your kernel with the below patch. This will dump the timer traces to your console.
> I would be very interested in the resulting console dump file.
Attached. Let me know if you need anything else.
--
Thanks,
Sasha
Attachment:
log.txt.gz
Description: log.txt.gz