[RFC PATCH 3/4] sched: Gang using set_next_buddy

From: Nikunj A. Dadhania
Date: Mon Dec 19 2011 - 03:33:49 EST


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@xxxxxxxxxxxxxxxxxx>
---

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);
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/