Re: [PATCH] posixtimers: Fix posix clock monotonicity
From: Hidetoshi Seto
Date: Tue Mar 17 2009 - 02:31:27 EST
KAMEZAWA Hiroyuki wrote:
> Hidetoshi Seto <seto.hidetoshi@xxxxxxxxxxxxxx> wrote:
>
>> This patch rehires task_sched_runtime() and thread_group_sched_runtime()
>> which were removed at the time of 2.6.28-rc1.
>>
>> These functions protect the sampling of clock with rq lock.
>> This rq lock is required not to update rq->clock during the sampling.
>> i.e. You may get ((banked runtime before update)+(delta after update)).
>>
> Does clock_gettime() go backward without lock ?
Yes, that's right.
You can find the ancestor of this patch here:
[RESEND][PATCH] posixtimers: clock_gettime(CLOCK_*_CPUTIME_ID) goes backward
http://lkml.org/lkml/2009/1/27/18
After the last post, I dug the git-log and found that there were functions,
task_sched_runtime() and thread_group_sched_runtime(), worked fine at the
time of 2.6.27. I think it is better to reintroduce these functions again
than making almost same function with different name.
Thanks,
H.Seto
--
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/