[PATCH] usertools: enhance logic to display NUMA

Thomas Monjalon thomas at monjalon.net
Mon Jul 17 17:07:27 CEST 2023


14/07/2023 11:14, Varghese, Vipin:
> From: Thomas Monjalon <thomas at monjalon.net>
> > 11/07/2023 17:42, Stephen Hemminger:
> > > On Sat, 26 Mar 2022 00:32:07 -0700
> > > Vipin Varghese <vipin.varghese at amd.com> wrote:
> > >
> > > > +
> > > > +  output = " Socket " + str(socket).ljust(3, ' ') + " Numa " +
> > str(numa).zfill(1) + " "
> > > > +  #output = " Socket " + str(socket).zfill(1) + " Numa " + str(numa).zfill(1) +
> > " "
> > > > +  print(output)
> > > > +  print(format("-" * len(output)))
> > > > +
> > > > +  for index,coreSibling in enumerate(numa_map[keys]):
> > > > +      print ("Core " + str(index).ljust(3, ' ') + "    " + str(coreSibling))
> > > > +      #print ("Core " + str(index).zfill(3) + "    " + str(coreSibling))
> > > > +print("")
> > > > +
> > >
> > > Git complains because you added new blank line at end of file.
> > >
> > > One wording suggestion would be to use the term "Node" instead of
> > "Numa" in the table.
> > > And fix heading alignment. The new headings don't look right.
> > >
> > > For the case with only single socket, single node, some of the
> > > headings could be dropped as well.
> >
> > I don't understand why we continue working on this script.
> > I thought we agreed it should be removed in favor of lstopo.
> >
> 
> Sorry Thomas, I did not follow your ` I don't understand why we continue working on this script. I thought we agreed it should be removed in favor of lstopo.`
> 
> From last email from my end `we should promote and document the changes provided the existing tool is phased out and use lstopo`.
> 
> Note:
> 1. This is with assumption that both Linux and Windows `lstopo` is modified and handles `ACPI L3 SRAT NUMA` and `Node per Socket NUMA`.
> 2. I have not seen a depreciation notice for cpu_layout.py too.

My take is that we should stop working on this script.
It is better to contribute to lstopo. Did you try?

We probably won't deprecate cpu_layout.py easily.
The first step would be to add a message when running the script,
recommending to use lstopo.
Vipin would you like to write such a patch?




More information about the dev mailing list