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: <1216898143.7257.297.camel@twins>
Date:	Thu, 24 Jul 2008 13:15:43 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Daniel Walker <dwalker@...sta.com>, Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [git pull] scheduler updates for v2.6.27, phase #2

On Thu, 2008-07-24 at 04:09 -0700, Andrew Morton wrote:
> On Thu, 24 Jul 2008 12:43:13 +0200 Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> 
> > On Mon, 2008-07-21 at 13:16 -0700, Daniel Walker wrote:
> > > On Mon, 2008-07-21 at 21:23 +0200, Peter Zijlstra wrote:
> > > 
> > > > Does this work for you?
> > > > 
> > > 
> > > Yours removed the warning .. I made an alternate one below only compile
> > > tested, your choice..
> > 
> > How about this one - it seems there is a whole scala of new division
> > instructions these days... :-)
> > 
> 
> ain't life grand.
> 
> > 
> > 
> > diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
> > index 47ceac9..3c38686 100644
> > --- a/kernel/sched_rt.c
> > +++ b/kernel/sched_rt.c
> > @@ -253,7 +253,7 @@ static int do_balance_runtime(struct rt_rq *rt_rq)
> >  
> >  		diff = iter->rt_runtime - iter->rt_time;
> >  		if (diff > 0) {
> > -			do_div(diff, weight);
> > +			diff = div_u64((u64)diff, weight);
> 
> Can't use div_s64() here?

I guess we could, but since we already established >0, I thought using
the u64 version might be slightly cheaper - but what do I know..

> >  			if (rt_rq->rt_runtime + diff > rt_period)
> >  				diff = rt_period - rt_rq->rt_runtime;
> >  			iter->rt_runtime -= diff;
> > 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ