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:   Wed, 12 Feb 2020 16:04:31 +0000
From:   Mel Gorman <mgorman@...e.de>
To:     Vincent Guittot <vincent.guittot@...aro.org>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Phil Auld <pauld@...hat.com>, Parth Shah <parth@...ux.ibm.com>,
        Valentin Schneider <valentin.schneider@....com>
Subject: Re: [RFC 2/4] sched/numa: replace runnable_load_avg by load_avg

On Wed, Feb 12, 2020 at 04:03:28PM +0100, Vincent Guittot wrote:
> > Ok, so this is essentially group_is_overloaded.
> >
> >
> > > +     if ((ns->nr_running < ns->weight) ||
> > > +         ((ns->compute_capacity * 100) > (ns->util * imbalance_pct)))
> > > +             return node_has_spare;
> > > +
> >
> > And this is group_has_capacity. What I did was have a common helper
> > for both NUMA and normal load balancing and translated the fields from
> > sg_lb_stats and numa_stats into a common helper. This is to prevent them
> > getting out of sync. The conversion was incomplete in my case but in
> > principle, both NUMA and CPU load balancing should use common helpers or
> > they'll get out of sync.
> 
> I fact, I wanted to keep this patch simple and readable for the 1st
> version in order to not afraid people from reviewing it. That's the
> main reason I didn't merge it with load_balance but i agree that some
> common helper function might be possible.
> 

Makes sense.

> Also the struct sg_lb_stats has a lot more fields compared to struct numa_stats
> 

Yes, I considered reusing the same structure and decided against it. I
simply created a common helper. It's trivial enough to do on top after
the fact in the name of clarity. Fundamentally it's cosmetic.

> Then, I wonder if we could end up with different rules for numa like
> taking into account some NUMA specifics metrics to classify the node
> 

Well, we could but right now they should be the same. As it is, the NUMA
balancer and load balancer overrule each other. I think the scope for
changing that without causing regressions is limited.

-- 
Mel Gorman
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ