lkml.org 
[lkml]   [2017]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [ANNOUNCE] v4.11.12-rt13
On 2017-10-10 18:24:55 [+0200], To Mike Galbraith wrote:
> > homer:..debug/tracing # time chrt -f 1 /usr/local/ltp/conformance/interfaces/clock_settime/clock_settime_8-1.run-test
> > Ended too late. 1507351636 >> 1507351634
> > Test FAILED
> >
> > real 0m7.002s
> > user 0m0.000s
> > sys 0m0.002s
>
> As per POSIX we should sleep only 5 secs despite the CLOCK_REALTIME
> change. In RT case however we sleep 7 so we somehow account it which is
> wrong.

This should cure it:

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1258,6 +1258,8 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
clock_id = CLOCK_MONOTONIC;
else if (clock_id == CLOCK_REALTIME_SOFT)
clock_id = CLOCK_MONOTONIC_SOFT;
+ else if (clock_id == CLOCK_REALTIME_HARD)
+ clock_id = CLOCK_MONOTONIC;
}

base = hrtimer_clockid_to_base(clock_id);
Sebastian

\
 
 \ /
  Last update: 2017-10-10 18:48    [W:0.059 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site