Re: [PATCH] posixtimers: Fix posix clock monotonicity v2

From: Peter Zijlstra
Date: Wed Mar 18 2009 - 06:58:57 EST


On Wed, 2009-03-18 at 19:41 +0900, Hidetoshi Seto wrote:
> Impact: Regression fix (against clock_gettime() backwarding bug)
>
> This patch re-introduces a couple of function, task_sched_runtime
> and thread_group_sched_runtime, which was once removed at the
> time of 2.6.28-rc1.
>
> These functions protect the sampling of thread/process clock with
> rq lock. This rq lock is required not to update rq->clock durling
> the sampling.
> i.e.
> The clock_gettime() may return
> ((accounted runtime before update) + (delta after update))
> that is less than what it should be.
>
> v1 -> v2:
> - Revises comments for functions and patch description.
> - Add note about accuracy of thread group's runtime.
>
> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@xxxxxxxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxx>
> Cc: stable@xxxxxxxxxx [2.6.28.x]

Acked-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>

Thanks Hidetoshi-san.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/