public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] sched: let __sched_period() use rq's nr_running
@ 2015-07-10  8:11 byungchul.park
  2015-07-10 13:31 ` Morten Rasmussen
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: byungchul.park @ 2015-07-10  8:11 UTC (permalink / raw)
  To: mingo, peterz; +Cc: linux-kernel, pjt, Byungchul Park

From: Byungchul Park <byungchul.park@lge.com>

__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 <byungchul.park@lge.com>
---
 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


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-07-14  9:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-10  8:11 [PATCH v2] sched: let __sched_period() use rq's nr_running byungchul.park
2015-07-10 13:31 ` Morten Rasmussen
2015-07-13  0:56   ` Byungchul Park
2015-07-13  7:07     ` Mike Galbraith
2015-07-13  8:29       ` Byungchul Park
2015-07-13 10:22         ` Mike Galbraith
2015-07-13 11:07           ` Byungchul Park
2015-07-13 12:30             ` Mike Galbraith
2015-07-14  2:07               ` Byungchul Park
2015-07-14  2:30                 ` Mike Galbraith
2015-07-13  8:26 ` Peter Zijlstra
2015-07-13  9:25   ` Byungchul Park
2015-07-14  2:26     ` Byungchul Park
2015-07-14  9:26 ` Byungchul Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox