From: Thomas Gleixner <tglx@linutronix.de>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Michael Kerrisk <mtk-manpages@gmx.net>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [patch 1/3] new timerfd API - new timerfd API
Date: Mon, 24 Sep 2007 17:53:30 +0200 [thread overview]
Message-ID: <1190649210.4035.224.camel@chaos> (raw)
In-Reply-To: <Pine.LNX.4.64.0709240838250.23830@alien.or.mcafeemobile.com>
On Mon, 2007-09-24 at 08:42 -0700, Davide Libenzi wrote:
> > > + ticks += (u64)
> > > hrtimer_forward(&ctx->tmr,
> > > hrtimer_cb_get_time(&ctx->tmr),
> >
> > You need to use ctx->tmr.base->get_time() here, otherwise you might read
> > a stale time value (in case that CONFIG_HIGH_RES_TIMERS is off).
>
> Is the particular position of hrtimer_cb_get_time() in the code that would
> break here? Because function was added by your patch ;)
> Did something change later?
For non high res systems we speed up the access to now by storing the
current time when we start to process the hrtimer softirq callbacks.
hrtimer_cb_get_time(timer) reads timer->base->now
For high resolution systems hrtimer_cb_get_time() resolves to
timer->base->get_time().
In the timerfd case we are not in softirq context and we read at any
given later time. Also on SMP the base->now variable might be changed by
the softirq running on the other CPU.
tglx
prev parent reply other threads:[~2007-09-24 15:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-23 22:49 [patch 1/3] new timerfd API - new timerfd API Davide Libenzi
2007-09-24 8:26 ` Thomas Gleixner
2007-09-24 15:42 ` Davide Libenzi
2007-09-24 15:53 ` Thomas Gleixner [this message]
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=1190649210.4035.224.camel@chaos \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk-manpages@gmx.net \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.