aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-03-19 00:27:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-19 00:27:13 -0400
commit2caf470363941b70212a9a843cae02e8e2f751d9 (patch)
tree149980ba161b932156c98ee8107594b6f957356f /kernel/sched.c
parent6c3c3158a81d6a92d335dd27ad9eb43f6b4c664b (diff)
parent33b0c4217dcd67b788318c3192a2912b530e4eef (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel: sched: tune multi-core idle balancing sched: retune wake granularity sched: wakeup-buddy tasks are cache-hot sched: improve affine wakeups sched, net: socket wakeups are sync sched: clean up wakeup balancing, code flow sched: clean up wakeup balancing, rename variables sched: clean up wakeup balancing, move wake_affine()
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index d1ad69b270ca..3f7c5eb254e2 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1396,6 +1396,12 @@ task_hot(struct task_struct *p, u64 now, struct sched_domain *sd)
1396{ 1396{
1397 s64 delta; 1397 s64 delta;
1398 1398
1399 /*
1400 * Buddy candidates are cache hot:
1401 */
1402 if (&p->se == cfs_rq_of(&p->se)->next)
1403 return 1;
1404
1399 if (p->sched_class != &fair_sched_class) 1405 if (p->sched_class != &fair_sched_class)
1400 return 0; 1406 return 0;
1401 1407
@@ -1855,10 +1861,11 @@ out_activate:
1855 schedstat_inc(p, se.nr_wakeups_remote); 1861 schedstat_inc(p, se.nr_wakeups_remote);
1856 update_rq_clock(rq); 1862 update_rq_clock(rq);
1857 activate_task(rq, p, 1); 1863 activate_task(rq, p, 1);
1858 check_preempt_curr(rq, p);
1859 success = 1; 1864 success = 1;
1860 1865
1861out_running: 1866out_running:
1867 check_preempt_curr(rq, p);
1868
1862 p->state = TASK_RUNNING; 1869 p->state = TASK_RUNNING;
1863#ifdef CONFIG_SMP 1870#ifdef CONFIG_SMP
1864 if (p->sched_class->task_wake_up) 1871 if (p->sched_class->task_wake_up)
@@ -1892,6 +1899,8 @@ static void __sched_fork(struct task_struct *p)
1892 p->se.exec_start = 0; 1899 p->se.exec_start = 0;
1893 p->se.sum_exec_runtime = 0; 1900 p->se.sum_exec_runtime = 0;
1894 p->se.prev_sum_exec_runtime = 0; 1901 p->se.prev_sum_exec_runtime = 0;
1902 p->se.last_wakeup = 0;
1903 p->se.avg_overlap = 0;
1895 1904
1896#ifdef CONFIG_SCHEDSTATS 1905#ifdef CONFIG_SCHEDSTATS
1897 p->se.wait_start = 0; 1906 p->se.wait_start = 0;