lkml.org 
[lkml]   [2013]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [V2 2/2] sched: update cfs_rq weight earlier in enqueue_entity
    Could you please restate the below?

    On Mon, Jul 1, 2013 at 5:33 AM, Lei Wen <leiwen@marvell.com> wrote:
    > Since we are going to calculate cfs_rq's average ratio by
    > runnable_load_avg/load.weight

    I don't understand what you mean by this.

    >, if not increase the load.weight prior to
    > enqueue_entity_load_avg, it may lead to one cfs_rq's avg ratio higher
    > than 100%.
    >

    Or this.

    > Adjust the sequence, so that all ratio is kept below 100%.
    >
    > Signed-off-by: Lei Wen <leiwen@marvell.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 07bd74c..d1eee84 100644
    > --- a/kernel/sched/fair.c
    > +++ b/kernel/sched/fair.c
    > @@ -1788,8 +1788,8 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
    > * Update run-time statistics of the 'current'.
    > */
    > update_curr(cfs_rq);
    > - enqueue_entity_load_avg(cfs_rq, se, flags & ENQUEUE_WAKEUP);
    > account_entity_enqueue(cfs_rq, se);
    > + enqueue_entity_load_avg(cfs_rq, se, flags & ENQUEUE_WAKEUP);

    account_entity_enqueue is independent of enqueue_entity_load_avg;
    their order should not matter.

    Further, should we restore the reverted amortization commit (improves
    context switch times) enqueue_entity_load_avg needs to precede
    account_entity_enqueue as it may update se->load.weight.

    > update_cfs_shares(cfs_rq);
    >
    > if (flags & ENQUEUE_WAKEUP) {
    > --
    > 1.7.10.4
    >


    \
     
     \ /
      Last update: 2013-07-01 16:41    [W:3.111 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site