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] [day] [month] [year] [list]
Date:	Mon, 14 Nov 2011 11:37:49 -0800
From:	Suresh Siddha <suresh.b.siddha@...el.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Venki Pallipadi <venki@...gle.com>,
	Andi Kleen <andi@...stfloor.org>,
	Tim Chen <tim.c.chen@...ux.intel.com>,
	Ingo Molnar <mingo@...e.hu>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [Patch] Idle balancer: cache align nohz structure to improve
 idle load balancing scalability

On Mon, 2011-11-14 at 01:32 -0800, Peter Zijlstra wrote:
> On Tue, 2011-11-01 at 16:52 -0700, Suresh Siddha wrote:
> > @@ -3317,6 +3317,7 @@ static void update_cpu_power(struct sched_domain *sd, int cpu)
> >  
> >         cpu_rq(cpu)->cpu_power = power;
> >         sdg->sgp->power = power;
> > +       atomic_set(&sdg->sgp->nr_busy_cpus, sdg->group_weight);
> >  }
> >  
> >  static void update_group_power(struct sched_domain *sd, int cpu)
> > @@ -3339,6 +3340,7 @@ static void update_group_power(struct sched_domain *sd, int cpu)
> >         } while (group != child->groups);
> >  
> >         sdg->sgp->power = power;
> > +       atomic_set(&sdg->sgp->nr_busy_cpus, sdg->group_weight);
> >  } 
> 
> So we run this rather frequently, and it will trample all over:
> 
> > +                */
> > +               for_each_domain(cpu, sd)
> > +                       atomic_dec(&sd->groups->sgp->nr_busy_cpus);
> 
> because I cannot see any serialization between those sites.

That was an overlook from myside. I moved the initialization of this to
init_sched_groups_power() now and there is no need to re-do this
everytime we call the update_group_power().

> Also, isn't it rather weird to just assume all cpus are busy in
> update_group_power()? If you would actually set the right value in
> update_cpu_power() you could use a straight sum in update_group_power()
> and get a more or less accurate number out.

I will post an updated patch soon (once we complete the performance
analysis of this patch with respect to other workloads) but the below
hunk gives an idea of what I am planning to do now.

@@ -7369,6 +7384,7 @@ static void init_sched_groups_power(int cpu, struct sched_
                return;
 
        update_group_power(sd, cpu);
+       atomic_set(&sg->sgp->nr_busy_cpus, sg->group_weight);
 }
 
 /*

thanks,
suresh

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