Re: [PATCH v4 5/5] sched: add two functions for att(det)aching a task to(from) a cfs_rq

2015-09-02 Thread Peter Zijlstra
On Wed, Sep 02, 2015 at 11:33:15AM +0900, Byungchul Park wrote: > +++ b/kernel/sched/fair.c > @@ -7920,14 +7920,14 @@ prio_changed_fair(struct rq *rq, struct task_struct > *p, int oldprio) > > static inline bool vruntime_normalized(struct task_struct *p) > { > struct sched_entity *se =

Re: [PATCH v4 5/5] sched: add two functions for att(det)aching a task to(from) a cfs_rq

2015-09-02 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Wed, Sep 02, 2015 at 11:33:15AM +0900, Byungchul Park wrote: > > +++ b/kernel/sched/fair.c > > @@ -7920,14 +7920,14 @@ prio_changed_fair(struct rq *rq, struct task_struct > > *p, int oldprio) > > > > static inline bool

Re: [PATCH v4 5/5] sched: add two functions for att(det)aching a task to(from) a cfs_rq

2015-09-01 Thread Byungchul Park
On Tue, Sep 01, 2015 at 05:03:43PM +0200, Peter Zijlstra wrote: > On Tue, Sep 01, 2015 at 09:28:49AM +0900, Byungchul Park wrote: > > > check the condition "!(flags & DEQUEUE_SLEEP)" for doing normalizing in > > dequeue_entity(). i think you have to keep my original comment, or > > modify your

Re: [PATCH v4 5/5] sched: add two functions for att(det)aching a task to(from) a cfs_rq

2015-09-01 Thread Peter Zijlstra
On Tue, Sep 01, 2015 at 09:28:49AM +0900, Byungchul Park wrote: > check the condition "!(flags & DEQUEUE_SLEEP)" for doing normalizing in > dequeue_entity(). i think you have to keep my original comment, or > modify your comment to something like below. > > before - If it's !queued, sleeping

Re: [PATCH v4 5/5] sched: add two functions for att(det)aching a task to(from) a cfs_rq

2015-08-31 Thread Peter Zijlstra
On Thu, Aug 20, 2015 at 08:35:16PM +0900, Byungchul Park wrote: > On Thu, Aug 20, 2015 at 08:22:00PM +0900, byungchul.p...@lge.com wrote: > > + /* > > +* If it's !queued, then only when the task is sleeping it has a > > +* non-normalized vruntime, that is, when the task is being

Re: [PATCH v4 5/5] sched: add two functions for att(det)aching a task to(from) a cfs_rq

2015-08-31 Thread Peter Zijlstra
On Mon, Aug 31, 2015 at 05:21:38PM +0200, Peter Zijlstra wrote: > + if (!p->se.on_rq) > return true; > > return false; > > > Does that make sense? It does not.. never mind me. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: [PATCH v4 5/5] sched: add two functions for att(det)aching a task to(from) a cfs_rq

2015-08-31 Thread Byungchul Park
On Mon, Aug 31, 2015 at 05:21:38PM +0200, Peter Zijlstra wrote: > On Thu, Aug 20, 2015 at 08:35:16PM +0900, Byungchul Park wrote: > > On Thu, Aug 20, 2015 at 08:22:00PM +0900, byungchul.p...@lge.com wrote: > > > > + /* > > > + * If it's !queued, then only when the task is sleeping it has a > > >

Re: [PATCH v4 5/5] sched: add two functions for att(det)aching a task to(from) a cfs_rq

2015-08-31 Thread Byungchul Park
On Tue, Sep 01, 2015 at 09:28:49AM +0900, Byungchul Park wrote: > On Mon, Aug 31, 2015 at 05:21:38PM +0200, Peter Zijlstra wrote: > > On Thu, Aug 20, 2015 at 08:35:16PM +0900, Byungchul Park wrote: > > > On Thu, Aug 20, 2015 at 08:22:00PM +0900, byungchul.p...@lge.com wrote: > > > > > > +

[PATCH v4 5/5] sched: add two functions for att(det)aching a task to(from) a cfs_rq

2015-08-20 Thread byungchul . park
From: Byungchul Park byungchul.p...@lge.com this patch introduces two functions for adjusting a task's vruntime and the target cfs_rq's average load so that redundancy code doing same things can be simplified. and it provides better readability. switched_from_fair, switched_to_fair and

Re: [PATCH v4 5/5] sched: add two functions for att(det)aching a task to(from) a cfs_rq

2015-08-20 Thread Byungchul Park
On Thu, Aug 20, 2015 at 08:22:00PM +0900, byungchul.p...@lge.com wrote: From: Byungchul Park byungchul.p...@lge.com diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index af6ad5f..53d0e30 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7918,21 +7918,47 @@