aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDarren Hart <dvhltc@us.ibm.com>2009-03-12 03:55:59 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-12 06:20:57 -0400
commit16f4993f4e9860715918efd4eeac928f8de1218b (patch)
treed5416de0cd3df09700e58c8148f67d6963ba19e9 /kernel
parent5eb3dc62fc5986e85715041c23dcf3832812be4b (diff)
futex: use current->time_slack_ns for rt tasks too
RT tasks should set their timer slack to 0 on their own. This patch removes the 'if (rt_task()) slack = 0;' block in futex_wait. Build and boot tested on a 4 way Intel x86_64 workstation. Passes basic pthread_mutex and PI tests out of ltp/testcases/realtime. Signed-off-by: Darren Hart <dvhltc@us.ibm.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Arjan van de Ven <arjan@linux.intel.com> LKML-Reference: <20090312075559.9856.28822.stgit@Aeon> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/futex.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index e149545c5cea..6579912ee70c 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1253,16 +1253,13 @@ retry:
1253 if (!abs_time) 1253 if (!abs_time)
1254 schedule(); 1254 schedule();
1255 else { 1255 else {
1256 unsigned long slack;
1257 slack = current->timer_slack_ns;
1258 if (rt_task(current))
1259 slack = 0;
1260 hrtimer_init_on_stack(&t.timer, 1256 hrtimer_init_on_stack(&t.timer,
1261 clockrt ? CLOCK_REALTIME : 1257 clockrt ? CLOCK_REALTIME :
1262 CLOCK_MONOTONIC, 1258 CLOCK_MONOTONIC,
1263 HRTIMER_MODE_ABS); 1259 HRTIMER_MODE_ABS);
1264 hrtimer_init_sleeper(&t, current); 1260 hrtimer_init_sleeper(&t, current);
1265 hrtimer_set_expires_range_ns(&t.timer, *abs_time, slack); 1261 hrtimer_set_expires_range_ns(&t.timer, *abs_time,
1262 current->timer_slack_ns);
1266 1263
1267 hrtimer_start_expires(&t.timer, HRTIMER_MODE_ABS); 1264 hrtimer_start_expires(&t.timer, HRTIMER_MODE_ABS);
1268 if (!hrtimer_active(&t.timer)) 1265 if (!hrtimer_active(&t.timer))