1
git://android.git.kernel.org/kernel/common.git android-2.6.29
2
3
commit 5e75ec4ffdf380c69818e4ff7df1c2917cb882e8
4
Author: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
5
Date:   Tue Mar 31 16:56:03 2009 +0900
6
7
    posixtimers, sched: Fix posix clock monotonicity
8
    
9
    Impact: Regression fix (against clock_gettime() backwarding bug)
10
    
11
    This patch re-introduces a couple of functions, task_sched_runtime
12
    and thread_group_sched_runtime, which was once removed at the
13
    time of 2.6.28-rc1.
14
    
15
    These functions protect the sampling of thread/process clock with
16
    rq lock.  This rq lock is required not to update rq->clock during
17
    the sampling.
18
    
19
    i.e.
20
      The clock_gettime() may return
21
       ((accounted runtime before update) + (delta after update))
22
      that is less than what it should be.
23
    
24
    v2 -> v3:
25
    	- Rename static helper function __task_delta_exec()
26
    	  to do_task_delta_exec() since -tip tree already has
27
    	  a __task_delta_exec() of different version.
28
    
29
    v1 -> v2:
30
    	- Revises comments of function and patch description.
31
    	- Add note about accuracy of thread group's runtime.
32
    
33
    Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
34
    Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
35
    Cc: stable@kernel.org	[2.6.28.x][2.6.29.x]
36
    LKML-Reference: <49D1CC93.4080401@jp.fujitsu.com>
37
    Signed-off-by: Ingo Molnar <mingo@elte.hu>