Messages in this thread | | | Date | Tue, 17 Mar 2009 15:31:04 +0900 | From | Hidetoshi Seto <> | Subject | Re: [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
| |