On Wed, Feb 06, 2019 at 11:11:24AM +0100, Igor Mammedov wrote: > On Thu, 31 Jan 2019 15:16:54 +0800 > Tao Xu <tao3...@intel.com> wrote: > > > From: Liu Jingqi <jingqi....@intel.com> > > > > Add -numa hmat-lb option to provide System Locality Latency and > > Bandwidth Information. These memory attributes help to build > > System Locality Latency and Bandwidth Information Structure(s) > > in ACPI Heterogeneous Memory Attribute Table (HMAT). > Maybe instead of adding/using more globals since the rest of numa.c was > written so, it's time to introduce NumaMachine type which inherits > form base Machine and extends it with numa extensions.
I don't think inheritance is the right solution here. We have multiple features that are not available in all machines and: SMP, ACPI, CPU hotplug, memory hotplug, etc. We don't have separate machine subclasses for each of these features. Why would NUMA deserve having its own class in the machine type hierarchy? > > You don't have to refactor all old numa code for that (just the parts > you use in HMAT) and later we could gradually refactor the rest of > numa handling. > > -- Eduardo