Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1508112

Re: [RFC v3 1/6] Track the active utilisation

From luca abeni <luca.abeni@unitn.it>
Newsgroups linux.kernel
Subject Re: [RFC v3 1/6] Track the active utilisation
Date 2016-10-25 11:30 +0200
Message-ID <sw6dr-3Ia-17@gated-at.bofh.it> (permalink)
References <svO6S-ak-7@gated-at.bofh.it> <svO6S-ak-23@gated-at.bofh.it> <sw63L-3ER-11@gated-at.bofh.it>
Organization university of trento

Show all headers | View raw


Hi Daniel,

On Tue, 25 Oct 2016 11:09:52 +0200
Daniel Bristot de Oliveira <bristot@redhat.com> wrote:
[...]
> > +static void add_running_bw(struct sched_dl_entity *dl_se, struct
> > dl_rq *dl_rq) +{
> > +	u64 se_bw = dl_se->dl_bw;
> > +
> > +	dl_rq->running_bw += se_bw;
> > +}  
> 
> why not...
> 
> static *inline*
> void add_running_bw(struct sched_dl_entity *dl_se, struct dl_rq
> *dl_rq) {
> 	dl_rq->running_bw += dl_se->dl_bw;
> }
> 
> am I missing something?

I do not know... Maybe I am the one missing something :)
I assumed that the compiler is smart enough to inline the function (and
to avoid creating a local variable on the stack), but if there is
agreement I can change the function in this way.



			Thanks,
				Luca


> 
> > +static void sub_running_bw(struct sched_dl_entity *dl_se, struct
> > dl_rq *dl_rq) +{
> > +	u64 se_bw = dl_se->dl_bw;
> > +
> > +	dl_rq->running_bw -= se_bw;
> > +	if (WARN_ON(dl_rq->running_bw < 0))
> > +		dl_rq->running_bw = 0;
> > +}  
> 
> (if I am not missing anything...)
> 
> the same in the above function: use inline and remove the se_bw
> variable.
> 
> -- Daniel

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC v3 0/6] CPU reclaiming for SCHED_DEADLINE  Luca Abeni <luca.abeni@unitn.it> - 2016-10-24 16:10 +0200
  [RFC v3 5/6] Do not reclaim the whole CPU bandwidth Luca Abeni <luca.abeni@unitn.it> - 2016-10-24 16:10 +0200
  [RFC v3 1/6] Track the active utilisation Luca Abeni <luca.abeni@unitn.it> - 2016-10-24 16:10 +0200
    Re: [RFC v3 1/6] Track the active utilisation Daniel Bristot de Oliveira <bristot@redhat.com> - 2016-10-25 11:20 +0200
      Re: [RFC v3 1/6] Track the active utilisation luca abeni <luca.abeni@unitn.it> - 2016-10-25 11:30 +0200
        Re: [RFC v3 1/6] Track the active utilisation Steven Rostedt <rostedt@goodmis.org> - 2016-10-25 16:00 +0200
          Re: [RFC v3 1/6] Track the active utilisation Luca Abeni <luca.abeni@unitn.it> - 2016-10-25 20:10 +0200
  [RFC v3 2/6] Improve the tracking of active utilisation Luca Abeni <luca.abeni@unitn.it> - 2016-10-24 16:10 +0200
  [RFC v3 3/6] Fix the update of the total -deadline utilization Luca Abeni <luca.abeni@unitn.it> - 2016-10-24 16:10 +0200
  [RFC v3 4/6] GRUB accounting Luca Abeni <luca.abeni@unitn.it> - 2016-10-24 16:10 +0200

csiph-web