Re: [PATCH-next] sched/headers: Clean up <linux/sched.h>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux