Re: [PATCH-next] sched/headers: Clean up <linux/sched.h>
From: Juri Lelli
Date: Wed Feb 21 2018 - 03:09:54 EST
On 16/02/18 08:25, Christopher Díaz Riveros wrote:
> El vie, 16-02-2018 a las 10:44 +0100, Juri Lelli escribió:
> > On 15/02/18 17:52, Peter Zijlstra wrote:
> > > On Thu, Feb 15, 2018 at 10:43:18AM -0500, Christopher Diaz Riveros
> > > wrote:
> >
> > [...]
> >
> > > > @@ -437,20 +437,28 @@ struct sched_dl_entity {
> > > > * during sched_setattr(), they will remain the same
> > > > until
> > > > * the next sched_setattr().
> > > > */
> > > > - u64 dl_runtime; /*
> > > > Maximum runtime for each instance */
> > > > - u64 dl_deadline; /
> > > > * Relative deadline of each instance */
> > > > - u64 dl_period; /*
> > > > Separation of two instances (period) */
> > > > - u64 dl_bw;
> > > > /* dl_runtime / dl_period */
> > > > - u64 dl_density; /*
> > > > dl_runtime / dl_deadline */
> > > > + /* Maximum runtime for each instance */
> > > > + u64 dl_runtime;
> > > > + /* Relative deadline of each instance */
> > > > + u64 dl_deadline;
> > > > + /* Separation of two instances (period) */
> > > > + u64 dl_period;
> > > > + /* dl_runtime / dl_period */
> > > > + u64 dl_bw;
> > > > + /* dl_runtime / dl_deadline */
> > > > + u64 dl_density;
> > >
> > > That's a whole lot less readable :/
> >
> > Yep. :(
>
> Thank you all for the feedback, I'll consider this patch as NACK. Sorry
> for wasting time in a low quality patch. I'll prepare a better one
> next time :)
No problem, thanks actually to seeing if things can be cleaned up. :)
While going through that struct again I was thinking that we might want
to completely remove inline comments and put them in the above comment
block(s), as we already have for bool flags:
/*
* Some bool flags:
*
* @dl_throttled tells if we exhausted the runtime. If so, the
* task has to wait for a replenishment to be performed at the
* next firing of dl_timer.
[...]
Would it be OK and any better?
Thanks,
- Juri