Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753908AbbGJIOy (ORCPT ); Fri, 10 Jul 2015 04:14:54 -0400 Received: from LGEMRELSE6Q.lge.com ([156.147.1.121]:56300 "EHLO lgemrelse6q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753557AbbGJIOa (ORCPT ); Fri, 10 Jul 2015 04:14:30 -0400 X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com From: byungchul.park@lge.com To: mingo@kernel.org, peterz@infradead.org Cc: linux-kernel@vger.kernel.org, pjt@google.com, Byungchul Park Subject: [PATCH v2] sched: let __sched_period() use rq's nr_running Date: Fri, 10 Jul 2015 17:11:30 +0900 Message-Id: <1436515890-10792-1-git-send-email-byungchul.park@lge.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1227 Lines: 33 From: Byungchul Park __sched_period() returns a period which a rq can have. the period has to be stretched by the number of task *the rq has*, when nr_running > nr_latency. otherwise, task slice can be very smaller than sysctl_sched_min_granularity depending on the position of tg hierarchy when CONFIG_FAIR_GROUP_SCHED. Signed-off-by: Byungchul Park --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 09456fc..8ae7aeb 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -635,7 +635,7 @@ static u64 __sched_period(unsigned long nr_running) */ static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se) { - u64 slice = __sched_period(cfs_rq->nr_running + !se->on_rq); + u64 slice = __sched_period(rq_of(cfs_rq)->nr_running + !se->on_rq); for_each_sched_entity(se) { struct load_weight *load; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/