lkml.org 
[lkml]   [2013]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] sched: Check sched_domain before computing group power.
On Thu, Nov 14, 2013 at 04:20:17PM +0530, Srikar Dronamraju wrote:
> > + /*
> > + * build_sched_domains() -> init_sched_groups_power()
> > + * gets here before we've attached the domains to the
> > + * runqueues.
> > + *
> > + * Use power_of(), which is set irrespective of domains
> > + * in update_cpu_power().
> > + *
> > + * This avoids power/power_orig from being 0 and
> > + * causing divide-by-zero issues on boot.
> > + *
> > + * Runtime updates will correct power_orig.
> > + */
> > + if (!rq->sd) {
>
> Because this condition is only true during boot up, I am now
> thinking if we should do mark this as unlikely i.e if (unlikely(!rq->sd)) {

Makes sense, edited the patch.



\
 
 \ /
  Last update: 2013-11-14 12:41    [W:0.264 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site