lkml.org 
[lkml]   [2011]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 3/4] sched: Gang using set_next_buddy
Date
Gang task group is faroured to be picked up using the set_next_buddy api and
hope that scheduler gives it priority.

Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
---
kernel/sched/fair.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index c03efd2..9a2f291 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5518,8 +5518,11 @@ static void gang_sched_member(void *info)

/* Check if the runqueue has runnable tasks */
if (cfs_rq->nr_running) {
- /* Favour this task group and set need_resched flag,
- * added by following patches */
+ struct sched_entity *se = tg->se[cpu];
+
+ /* Make the parent favourable */
+ set_next_buddy(se);
+ set_tsk_need_resched(current);
}
raw_spin_unlock_irqrestore(&rq->lock, flags);
}


\
 
 \ /
  Last update: 2011-12-19 09:35    [from the cache]
©2003-2011 Jasper Spaans