From: Yong Zhang <yong.zhang0@gmail.com>
To: Hillf Danton <dhillf@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix unsafe operation in high resolution timer
Date: Sun, 26 Dec 2010 21:12:05 +0800 [thread overview]
Message-ID: <20101226131205.GA5757@zhy> (raw)
In-Reply-To: <AANLkTimez6segEYEsdsvELqvHjrfY4rPQg6CG_7vyxCq@mail.gmail.com>
On Sat, Dec 25, 2010 at 10:19:11PM +0800, Hillf Danton wrote:
> > But for a hrtimer which is not free in its callback, like a
> > static defined one. the hrtimer could be referenced at the same
> > time. So here you cann't just delete the two lines.
>
> After callback, as you agree, it is hard to determine in the current
> implementation if the hrtimer is static defined, though another bit
> could be added, say, in the flag word of hrtimer
Yeah, that is an option, like a flag FREE_IN_CALLBACK/ONESHOT which
indicate that. Or just let the callback return another value like
HRTIMER_FREED. But as I said before I'm not sure what's the best way
to fix that. And maybe there's more suitable method.
BTW, is there any user who free the hrtimer in its callback?
> , so cutting the two
> lines off is deserved.
> And more, who will take care of the NORESTART again after callback?
It's not related to NORESTART, just HRTIMER_STATE_CALLBACK.
hrtimer'strategy somehow depends on HRTIMER_STATE_CALLBACK.
You can take a look at the caller of hrtimer_callback_running().
Thanks,
Yong
next prev parent reply other threads:[~2010-12-26 13:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-23 13:29 [PATCH] fix unsafe operation in high resolution timer Hillf Danton
2010-12-24 7:17 ` Yong Zhang
2010-12-24 14:28 ` Hillf Danton
2010-12-25 2:12 ` Yong Zhang
2010-12-25 14:19 ` Hillf Danton
2010-12-26 13:12 ` Yong Zhang [this message]
2010-12-27 13:12 ` Hillf Danton
2010-12-29 15:43 ` Hillf Danton
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=20101226131205.GA5757@zhy \
--to=yong.zhang0@gmail.com \
--cc=dhillf@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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 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.