Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-14 Thread Byungchul Park
On Fri, Jul 10, 2015 at 05:11:30PM +0900, byungchul.p...@lge.com wrote: > 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

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-14 Thread Byungchul Park
On Fri, Jul 10, 2015 at 05:11:30PM +0900, byungchul.p...@lge.com wrote: From: Byungchul Park byungchul.p...@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

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Mike Galbraith
On Tue, 2015-07-14 at 11:07 +0900, Byungchul Park wrote: > but.. is there any reason meaningless code should be kept in source? :( > it also harms readability. of cource, i need to modify my patch a little > bit to prevent non-group sched entities from getting large slice. By all means proceed,

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Byungchul Park
On Mon, Jul 13, 2015 at 06:25:35PM +0900, Byungchul Park wrote: > On Mon, Jul 13, 2015 at 10:26:09AM +0200, Peter Zijlstra wrote: > > On Fri, Jul 10, 2015 at 05:11:30PM +0900, byungchul.p...@lge.com wrote: > > > From: Byungchul Park > > > > > > __sched_period() returns a period which a rq can

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Byungchul Park
On Mon, Jul 13, 2015 at 02:30:38PM +0200, Mike Galbraith wrote: > On Mon, 2015-07-13 at 20:07 +0900, Byungchul Park wrote: > > > i still think stretching with local cfs's nr_running should be replaced with > > stretching with a top(=root) level one. > > I think we just can't take 'slice' _too_

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Mike Galbraith
On Mon, 2015-07-13 at 20:07 +0900, Byungchul Park wrote: > i still think stretching with local cfs's nr_running should be replaced with > stretching with a top(=root) level one. I think we just can't take 'slice' _too_ seriously. Not only is it annoying with cgroups, the scheduler simply

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Byungchul Park
On Mon, Jul 13, 2015 at 12:22:17PM +0200, Mike Galbraith wrote: > On Mon, 2015-07-13 at 17:29 +0900, Byungchul Park wrote: > > On Mon, Jul 13, 2015 at 09:07:01AM +0200, Mike Galbraith wrote: > > > On Mon, 2015-07-13 at 09:56 +0900, Byungchul Park wrote: > > > > > > > and i agree with that it

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Mike Galbraith
On Mon, 2015-07-13 at 17:29 +0900, Byungchul Park wrote: > On Mon, Jul 13, 2015 at 09:07:01AM +0200, Mike Galbraith wrote: > > On Mon, 2015-07-13 at 09:56 +0900, Byungchul Park wrote: > > > > > and i agree with that it makes latency increase for non-grouped tasks. > > > > It's not only a latency

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Byungchul Park
On Mon, Jul 13, 2015 at 10:26:09AM +0200, Peter Zijlstra wrote: > On Fri, Jul 10, 2015 at 05:11:30PM +0900, byungchul.p...@lge.com wrote: > > 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*,

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Byungchul Park
On Mon, Jul 13, 2015 at 09:07:01AM +0200, Mike Galbraith wrote: > On Mon, 2015-07-13 at 09:56 +0900, Byungchul Park wrote: > > > and i agree with that it makes latency increase for non-grouped tasks. > > It's not only a latency hit for the root group, it's across the board. > > I suspect an

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Peter Zijlstra
On Fri, Jul 10, 2015 at 05:11:30PM +0900, byungchul.p...@lge.com wrote: > 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

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Mike Galbraith
On Mon, 2015-07-13 at 09:56 +0900, Byungchul Park wrote: > and i agree with that it makes latency increase for non-grouped tasks. It's not only a latency hit for the root group, it's across the board. I suspect an overloaded group foo/bar/baz would prefer small slices over a large wait as well.

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Byungchul Park
On Mon, Jul 13, 2015 at 10:26:09AM +0200, Peter Zijlstra wrote: On Fri, Jul 10, 2015 at 05:11:30PM +0900, byungchul.p...@lge.com wrote: From: Byungchul Park byungchul.p...@lge.com __sched_period() returns a period which a rq can have. the period has to be stretched by the number of task

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Mike Galbraith
On Mon, 2015-07-13 at 20:07 +0900, Byungchul Park wrote: i still think stretching with local cfs's nr_running should be replaced with stretching with a top(=root) level one. I think we just can't take 'slice' _too_ seriously. Not only is it annoying with cgroups, the scheduler simply doesn't

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Byungchul Park
On Mon, Jul 13, 2015 at 12:22:17PM +0200, Mike Galbraith wrote: On Mon, 2015-07-13 at 17:29 +0900, Byungchul Park wrote: On Mon, Jul 13, 2015 at 09:07:01AM +0200, Mike Galbraith wrote: On Mon, 2015-07-13 at 09:56 +0900, Byungchul Park wrote: and i agree with that it makes latency

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Mike Galbraith
On Mon, 2015-07-13 at 17:29 +0900, Byungchul Park wrote: On Mon, Jul 13, 2015 at 09:07:01AM +0200, Mike Galbraith wrote: On Mon, 2015-07-13 at 09:56 +0900, Byungchul Park wrote: and i agree with that it makes latency increase for non-grouped tasks. It's not only a latency hit for the

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Byungchul Park
On Mon, Jul 13, 2015 at 02:30:38PM +0200, Mike Galbraith wrote: On Mon, 2015-07-13 at 20:07 +0900, Byungchul Park wrote: i still think stretching with local cfs's nr_running should be replaced with stretching with a top(=root) level one. I think we just can't take 'slice' _too_

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Byungchul Park
On Mon, Jul 13, 2015 at 06:25:35PM +0900, Byungchul Park wrote: On Mon, Jul 13, 2015 at 10:26:09AM +0200, Peter Zijlstra wrote: On Fri, Jul 10, 2015 at 05:11:30PM +0900, byungchul.p...@lge.com wrote: From: Byungchul Park byungchul.p...@lge.com __sched_period() returns a period which a

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Mike Galbraith
On Tue, 2015-07-14 at 11:07 +0900, Byungchul Park wrote: but.. is there any reason meaningless code should be kept in source? :( it also harms readability. of cource, i need to modify my patch a little bit to prevent non-group sched entities from getting large slice. By all means proceed,

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Mike Galbraith
On Mon, 2015-07-13 at 09:56 +0900, Byungchul Park wrote: and i agree with that it makes latency increase for non-grouped tasks. It's not only a latency hit for the root group, it's across the board. I suspect an overloaded group foo/bar/baz would prefer small slices over a large wait as well.

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Peter Zijlstra
On Fri, Jul 10, 2015 at 05:11:30PM +0900, byungchul.p...@lge.com wrote: From: Byungchul Park byungchul.p...@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

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-13 Thread Byungchul Park
On Mon, Jul 13, 2015 at 09:07:01AM +0200, Mike Galbraith wrote: On Mon, 2015-07-13 at 09:56 +0900, Byungchul Park wrote: and i agree with that it makes latency increase for non-grouped tasks. It's not only a latency hit for the root group, it's across the board. I suspect an overloaded

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-12 Thread Byungchul Park
On Fri, Jul 10, 2015 at 02:31:10PM +0100, Morten Rasmussen wrote: > On Fri, Jul 10, 2015 at 05:11:30PM +0900, byungchul.p...@lge.com wrote: > > 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

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-12 Thread Byungchul Park
On Fri, Jul 10, 2015 at 02:31:10PM +0100, Morten Rasmussen wrote: On Fri, Jul 10, 2015 at 05:11:30PM +0900, byungchul.p...@lge.com wrote: From: Byungchul Park byungchul.p...@lge.com __sched_period() returns a period which a rq can have. the period has to be stretched by the number of

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-10 Thread Morten Rasmussen
On Fri, Jul 10, 2015 at 05:11:30PM +0900, byungchul.p...@lge.com wrote: > 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

[PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-10 Thread byungchul . park
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

[PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-10 Thread byungchul . park
From: Byungchul Park byungchul.p...@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

Re: [PATCH v2] sched: let __sched_period() use rq's nr_running

2015-07-10 Thread Morten Rasmussen
On Fri, Jul 10, 2015 at 05:11:30PM +0900, byungchul.p...@lge.com wrote: From: Byungchul Park byungchul.p...@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