From: Stanislav Fomichev <stfomichev@yandex-team.ru>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: john.stultz@linaro.org, prarit@redhat.com,
paul.gortmaker@windriver.com, juri.lelli@gmail.com,
ddaney.cavm@gmail.com, mbohan@codeaurora.org,
david.vrabel@citrix.com, david.engraf@sysgo.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] hrtimers: calculate expires_next after all timers are executed
Date: Mon, 23 Jun 2014 22:04:43 +0400 [thread overview]
Message-ID: <20140623180443.GD20225@stfomichev-desktop.yandex.net> (raw)
In-Reply-To: <alpine.DEB.2.10.1406231904090.5170@nanos>
> So in case the enqueued timer is earlier than base0->next, you are
> looking at the wrong data. Same as in the current code and why you
> started to look into this at all.
Right, even if we do a local enqueue from higher base timer into lower base we
still need to update base->next in the enqueue.
> See above WHY it does NOT work.
It works, but without reprogramming in __remove_hrtimer we can end up with a
spurious tick which will just rearm clockdev and do no useful work.
At least no stall :-/
> No, we're not going to add another one in the first place as I know
> how MAY COME works: it translates to NEVER, unless I do it myself.
I'm fine with that, the point I'm trying to make is that I didn't even think
about any cleanup/refactoring in the first place, I just tried to get an
issue fixed and get some feedback. It's even better if we can also do a
cleanup in the process.
> > > Untested patch which addresses the issues below.
> > Aside from a small nitpick below, looks reasonable, I'll try to run it on a
> > couple of machines.
> > Should I send you a v3 afterwards with the changelog or
> > tested-by would be enough?
>
> Tested-by is fine. I can cobble a changelog together.
Ok, I have a couple of machines running for ~5 hours without any visible
issues, but let's give it at least a day.
> > > + while (active) {
> > > + idx = __ffs(active);
> > > + active &= ~(1UL << idx);
> > Is there any reason you did that instead of conventional:
>
> I thought about using __ffs before, just never came around it.
Nothing against it, seems totally legit, just looks inconsistent.
Now we have one place where we do __ffs stuff and other places where we
do for(;HRTIMER_MAX_CLOCK_BASES;).
next prev parent reply other threads:[~2014-06-23 18:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 14:37 [PATCH] " Stanislav Fomichev
2014-03-19 10:59 ` Thomas Gleixner
2014-03-19 14:16 ` [PATCH v2] " Stanislav Fomichev
2014-03-24 8:42 ` Stanislav Fomichev
2014-03-24 9:04 ` Thomas Gleixner
2014-05-05 9:26 ` Stanislav Fomichev
2014-06-04 15:47 ` Stanislav Fomichev
2014-06-04 20:06 ` Thomas Gleixner
2014-06-22 14:46 ` Thomas Gleixner
2014-06-23 11:03 ` Stanislav Fomichev
2014-06-23 17:19 ` Thomas Gleixner
2014-06-23 18:04 ` Stanislav Fomichev [this message]
2014-06-24 17:18 ` Stanislav Fomichev
2014-12-26 23:34 ` Stephen Boyd
2014-12-29 12:24 ` Stanislav Fomichev
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=20140623180443.GD20225@stfomichev-desktop.yandex.net \
--to=stfomichev@yandex-team.ru \
--cc=david.engraf@sysgo.com \
--cc=david.vrabel@citrix.com \
--cc=ddaney.cavm@gmail.com \
--cc=john.stultz@linaro.org \
--cc=juri.lelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbohan@codeaurora.org \
--cc=paul.gortmaker@windriver.com \
--cc=prarit@redhat.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®