David Hildenbrand <[email protected]> writes: > Let's make it easier to pin threads created via a ThreadContext to > all current CPUs belonging to given NUMA nodes. > > As "node-affinity" is simply a shortcut for setting "cpu-affinity", that > property cannot be read and if the CPUs for a node change due do CPU > hotplug, the CPU affinity will not get updated.
Color me confused. > Reviewed-by: Michal Privoznik <[email protected]> > Signed-off-by: David Hildenbrand <[email protected]> > --- > qapi/qom.json | 7 +++- > util/meson.build | 2 +- > util/thread-context.c | 84 +++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 91 insertions(+), 2 deletions(-) > > diff --git a/qapi/qom.json b/qapi/qom.json > index 4775a333ed..d36bf3355f 100644 > --- a/qapi/qom.json > +++ b/qapi/qom.json > @@ -838,10 +838,15 @@ > # @cpu-affinity: the CPU affinity for all threads created in the thread > # context (default: QEMU main thread affinity) > # > +# @node-affinity: shortcut for looking up the current CPUs for the given > nodes > +# and setting @cpu-affinity (default: QEMU main thread > +# affinity) > +# Still confused. Explain for dummies? With an example, perhaps? > # Since: 7.2 > ## > { 'struct': 'ThreadContextProperties', > - 'data': { '*cpu-affinity': ['uint16'] } } > + 'data': { '*cpu-affinity': ['uint16'], > + '*node-affinity': ['uint16'] } } > > > ## [...]
