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: <b63553254c1cea0571582521c72324388636c24e.camel@intel.com>
Date:   Tue, 26 Apr 2022 14:43:45 +0800
From:   "ying.huang@...el.com" <ying.huang@...el.com>
To:     Valentin Schneider <vschneid@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>
Cc:     linux-kernel@...r.kernel.org,
        Valentin Schneider <valentin.schneider@....com>,
        Ingo Molnar <mingo@...hat.com>, Mel Gorman <mgorman@...e.de>,
        Rik van Riel <riel@...riel.com>,
        Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Subject: Re: [PATCH -V2] sched,topology: Update sched topology atomically

Hi, Valentin,

On Mon, 2022-04-25 at 16:52 +0100, Valentin Schneider wrote:
> On 21/04/22 08:31, Huang Ying wrote:
> > When Peter Zijlstra reviewed commit 0fb3978b0aac ("sched/numa: Fix
> > NUMA topology for systems with CPU-less nodes") [1], he pointed out
> > that sched_domains_numa_distance and sched_domains_numa_masks are made
> > separate RCU variables.  That could go side-ways if there were a
> > function using both, although there isn't for now.
> > 
> > So we update sched_domains_numa_distance and sched_domains_numa_masks
> > and some other related sched topology parameters atomically to address
> > the potential issues.
> > 
> > [1] https://lkml.kernel.org/r/20220214121553.582248-1-ying.huang@intel.com
> > 
> > Signed-off-by: "Huang, Ying" <ying.huang@...el.com>
> > Suggested-by: Peter Zijlstra <peterz@...radead.org>
> > Cc: Valentin Schneider <valentin.schneider@....com>
> > Cc: Ingo Molnar <mingo@...hat.com>
> > Cc: Mel Gorman <mgorman@...e.de>
> > Cc: Rik van Riel <riel@...riel.com>
> > Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
> > 
> > Changelog:
> > 
> > v2:
> > 
> > - Addressed comments from Valentin Schneider, Thanks!
> 
> One small bug and a whitespace nit below, with those fixed:
> 
> Reviewed-by: Valentin Schneider <vschneid@...hat.com>

Thanks!  Your review comments help me a lot!

> FWIW I briefly tested this vs hotplug on QEMU.
> 
> > @@ -1806,8 +1873,7 @@ void sched_init_numa(int offline_node)
> > 
> >                       if (distance < LOCAL_DISTANCE || distance >= NR_DISTANCE_VALUES) {
> >                               sched_numa_warn("Invalid distance value range");
> > -				bitmap_free(distance_map);
> > -				return;
> > +                                goto free_bitmap;
> 
> The indentation here is wrong (spaces vs tabs).

Yes.  Will fix in the next version.

> >                       }
> > 
> >                       bitmap_set(distance_map, distance, 1);
> 
> >       /* Compute default topology size */
> >       for (i = 0; sched_domain_topology[i].mask; i++);
> 
> After the original boot this will now be the default topology with the NUMA
> bits on top, so we'll just keep growing the array every time we hotplug a
> node. This should use sched_domain_topology_default instead (ditto for the
> copy loop further down).
> 

Yes.  You are right!  Thanks for pointing this out.  Will fix this in
the next version.

Best Regards,
Huang, Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ