lkml.org 
[lkml]   [2009]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] posixtimers: Fix posix clock monotonicity
KAMEZAWA Hiroyuki wrote:
> Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> 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



\
 
 \ /
  Last update: 2009-03-17 07:33    [W:0.212 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site