Messages in this thread Patch in this message | | | From | "Nikunj A. Dadhania" <> | Subject | [RFC PATCH 3/4] sched: Gang using set_next_buddy | Date | Mon, 19 Dec 2011 14:04:58 +0530 |
| |
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); }
| |