lkml.org 
[lkml]   [2010]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] sched: Move level 'again' after get_cpu() in sched_exec.
From
            sched: move level again after get_cpu().

We can get this_cpu by calling get_cpu() once and it remains
same. We don't need to call it again.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
---

--- linus/kernel/sched.c 2010-01-06 20:11:10.000000000 +0600
+++ rakib/kernel/sched.c 2010-01-12 16:01:54.000000000 +0600
@@ -3143,8 +3143,8 @@ void sched_exec(void)
unsigned long flags;
struct rq *rq;

-again:
this_cpu = get_cpu();
+again:
dest_cpu = select_task_rq(p, SD_BALANCE_EXEC, 0);
if (dest_cpu == this_cpu) {
put_cpu();

\
 
 \ /
  Last update: 2010-01-12 11:45    [W:0.024 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site