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


Groups > linux.kernel > #1390723

Re: [PATCH v3 5/6] sched/fair: Rename scale_load() and scale_load_down()

From Yuyang Du <yuyang.du@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 5/6] sched/fair: Rename scale_load() and scale_load_down()
Date 2016-04-29 06:20 +0200
Message-ID <rt84i-86H-9@gated-at.bofh.it> (permalink)
References <rkxOi-2K6-11@gated-at.bofh.it> <rkxOi-2K6-17@gated-at.bofh.it> <rsQh3-Jd-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Apr 28, 2016 at 11:19:19AM +0200, Peter Zijlstra wrote:
> On Tue, Apr 05, 2016 at 12:12:30PM +0800, Yuyang Du wrote:
> > Rename scale_load() and scale_load_down() to user_to_kernel_load()
> > and kernel_to_user_load() respectively, to allow the names to bear
> > what they are really about.
> 
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -189,7 +189,7 @@ static void __update_inv_weight(struct load_weight *lw)
> >  	if (likely(lw->inv_weight))
> >  		return;
> >  
> > -	w = scale_load_down(lw->weight);
> > +	w = kernel_to_user_load(lw->weight);
> >  
> >  	if (BITS_PER_LONG > 32 && unlikely(w >= WMULT_CONST))
> >  		lw->inv_weight = 1;
> > @@ -213,7 +213,7 @@ static void __update_inv_weight(struct load_weight *lw)
> >   */
> >  static u64 __calc_delta(u64 delta_exec, unsigned long weight, struct load_weight *lw)
> >  {
> > -	u64 fact = scale_load_down(weight);
> > +	u64 fact = kernel_to_user_load(weight);
> >  	int shift = WMULT_SHIFT;
> >  
> >  	__update_inv_weight(lw);

[snip]
 
> Except these 3 really are not about user/kernel visible fixed point
> ranges _at_all_... :/

But are the above two falling back to user fixed point precision? And
the reason being that we can't efficiently do this multiply/divide
thing with increased fixed point for kernel load.

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


Thread

Re: [PATCH v3 5/6] sched/fair: Rename scale_load() and  scale_load_down() Yuyang Du <yuyang.du@intel.com> - 2016-04-29 06:20 +0200

csiph-web