Re: [tip:timers/core] hrtimer: Add support for CLOCK_MONOTONIC_RAW

From: Marc Zyngier
Date: Wed Mar 02 2016 - 06:31:05 EST


Thomas,

On 27/01/16 11:42, tip-bot for Marc Zyngier wrote:
> Commit-ID: 9c808765e88efb6fa6af7e2206ef89512f1840a7
> Gitweb: http://git.kernel.org/tip/9c808765e88efb6fa6af7e2206ef89512f1840a7
> Author: Marc Zyngier <marc.zyngier@xxxxxxx>
> AuthorDate: Fri, 15 Jan 2016 17:41:08 +0000
> Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> CommitDate: Wed, 27 Jan 2016 12:38:04 +0100
>
> hrtimer: Add support for CLOCK_MONOTONIC_RAW
>
> The KVM/ARM timer implementation arms a hrtimer when a vcpu is
> blocked (usually because it is waiting for an interrupt)
> while its timer is going to kick in the future.
>
> It is essential that this timer doesn't get adjusted, or the
> guest will end up being woken-up at the wrong time (NTP running
> on the host seems to confuse the hell out of some guests).
>
> In order to allow this, let's add CLOCK_MONOTONIC_RAW support
> to hrtimer (it is so far only supported for posix timers). It also
> has the (limited) benefit of fixing de0421d53bfb ("mac80211_hwsim:
> shuffle code to prepare for dynamic radios"), which already uses
> this functionnality without realizing wasn't implemented (just being
> lucky...).
>
> Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
> Cc: Tomasz Nowicki <tn@xxxxxxxxxxxx>
> Cc: Christoffer Dall <christoffer.dall@xxxxxxxxxx>
> Link: http://lkml.kernel.org/r/1452879670-16133-2-git-send-email-marc.zyngier@xxxxxxx
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

I'm afraid this patch is terminally broken - I managed to make this fall
over pretty easily (hint to self: __hrtimer_get_next_event needs some
serious thoughts to deal with MONOTONIC_RAW, and so does hrtimer_forward
at the very least).

Can you please drop (or revert):

a6e707d KVM: arm/arm64: timer: Switch to CLOCK_MONOTONIC_RAW
9006a01 hrtimer: Catch illegal clockids
9c80876 hrtimer: Add support for CLOCK_MONOTONIC_RAW

Thanks, and sorry for the noise.

M.
--
Jazz is not dead. It just smells funny...