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]
Message-ID: <Zy0zBsabOT6uAr6V@gpd3>
Date: Thu, 7 Nov 2024 22:37:10 +0100
From: Andrea Righi <arighi@...dia.com>
To: Tejun Heo <tj@...nel.org>
Cc: David Vernet <void@...ifault.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 sched_ext/for-6.13] sched_ext: Do not enable LLC/NUMA
 optimizations when domains overlap

On Thu, Nov 07, 2024 at 09:14:07PM +0100, Andrea Righi wrote:
> On Thu, Nov 07, 2024 at 09:04:56AM -1000, Tejun Heo wrote:
> > Hello, Andrea.
> > 
> > Some nits below:
> > 
> > On Thu, Nov 07, 2024 at 09:48:03AM +0100, Andrea Righi wrote:
> > > +static bool llc_and_numa_mismatch(void)
> > > +{
> > ...
> > > +     for_each_online_cpu(cpu) {
> > > +             sd = cpu_rq(cpu)->sd;
> > > +
> > > +             while (sd) {
> > 
> > This can be for_each_domain(cpu, sd).
> 
> Oh that's nicer, thanks!
> 
> > 
> > > +                     bool is_llc = sd->flags & SD_SHARE_LLC;
> > > +                     bool is_numa = sd->flags & SD_NUMA;
> > > +
> > > +                     if (is_llc != is_numa)
> > > +                             return true;
> > > +
> > > +                     sd = sd->parent;
> > > +             }
> > > +     }
> > > +
> > > +     return false;
> > > +}

Actually the logic here is not correct at all, because it's inspecting
also the sd of SMT CPUs for example, so it will end up enabling NUMA
when it's not needed. I'll rethink this part.

-Andrea

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ