lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170326225506.2ee92d24@nowhere>
Date:   Sun, 26 Mar 2017 22:55:06 +0200
From:   luca abeni <luca.abeni@...tannapisa.it>
To:     Mathieu Poirier <mathieu.poirier@...aro.org>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Juri Lelli <juri.lelli@....com>,
        Claudio Scordino <claudio@...dence.eu.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Tommaso Cucinotta <tommaso.cucinotta@...up.it>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Joel Fernandes <joelaf@...gle.com>,
        Luca Abeni <luca.abeni@...tn.it>
Subject: Re: [RFC v5 1/9] sched/deadline: track the active utilization

Hi Mathieu,

On Sun, 26 Mar 2017 11:04:18 -0600
Mathieu Poirier <mathieu.poirier@...aro.org> wrote:

[...]
> > @@ -946,8 +968,12 @@ enqueue_dl_entity(struct sched_dl_entity
> > *dl_se,
> >          * parameters of the task might need updating. Otherwise,
> >          * we want a replenishment of its runtime.
> >          */
> > -       if (flags & ENQUEUE_WAKEUP)
> > +       if (flags & ENQUEUE_WAKEUP) {
> > +               struct dl_rq *dl_rq = dl_rq_of_se(dl_se);
> > +
> > +               add_running_bw(dl_se->dl_bw, dl_rq);
> >                 update_dl_entity(dl_se, pi_se);
> > +       }  
> 
> What do we do for tasks that go from normal to dl?  Unless I'm
> mistaking their utilisation won't be accounted for when they are first
> enqueued.

This case should be handled by the "if (flags & ENQUEUE_WAKEUP)" branch
in enqueue_dl_entity().

[...]
> > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> > index 57caf36..caaa7d3 100644
> > --- a/kernel/sched/sched.h
> > +++ b/kernel/sched/sched.h
> > @@ -558,6 +558,12 @@ struct dl_rq {
> >  #else
> >         struct dl_bw dl_bw;
> >  #endif
> > +       /*
> > +        * "Active utilization" for this runqueue: increased when a
> > +        * task wakes up (becomes TASK_RUNNING) and decreased when a
> > +        * task blocks
> > +        */
> > +       u64 running_bw;  
> 
> Would it be a good idea to initialise and clear this field in
> rq_online/offline_dl()?

Thanks for pointing this out... I have to admit I do not know the
online/offline code too much (and I am not sure if I am handling this
correctly).
I'll try to have a look on Monday.


			Thanks,
				Luca

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ