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]
Date:	Fri, 15 Oct 2010 14:35:10 +0200
From:	Mike Galbraith <efault@....de>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Nikhil Rao <ncrao@...gle.com>, Ingo Molnar <mingo@...e.hu>,
	Suresh Siddha <suresh.b.siddha@...el.com>,
	Venkatesh Pallipadi <venki@...gle.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] sched: force balancing on newidle balance if local
 group has capacity

On Fri, 2010-10-15 at 14:20 +0200, Peter Zijlstra wrote:
> On Fri, 2010-10-15 at 14:18 +0200, Mike Galbraith wrote:
> > On Fri, 2010-10-15 at 14:06 +0200, Peter Zijlstra wrote:
> > > On Wed, 2010-10-13 at 12:09 -0700, Nikhil Rao wrote:
> > > > +bool check_utilization(struct sd_lb_stats *sds)
> > > > +{
> > > > +       if (!sds->this_has_capacity || sds->busiest_has_capacity)
> > > > +               return false;
> > > > +
> > > > +       return true;
> > > > +}
> > > > +
> > > >  /******* find_busiest_group() helpers end here *********************/
> > > >  
> > > >  /**
> > > > @@ -2824,6 +2845,10 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
> > > >         if (!sds.busiest || sds.busiest_nr_running == 0)
> > > >                 goto out_balanced;
> > > >  
> > > > +       /*  SD_BALANCE_NEWIDLE trumps SMP nice when underutilized */
> > > > +       if (idle == CPU_NEWLY_IDLE && check_utilization(&sds))
> > > > +               goto force_balance; 
> > > 
> > > 
> > > Is that really worth an extra function?
> > 
> > (I did that)
> > 
> > No, just it made it look prettier to me.  I figured the compiler will
> > nuke it at zero cost.
> 
> Sure.. but it does raise the whole naming/confusion angle ;-)

is_under_utilized() works for me.

(as does && this && that or cpu_should_get_off_lazy_butt():)

	-Mike

--
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