[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 4/7] util: Add write-only "node-affinity" property for Thr
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v1 4/7] util: Add write-only "node-affinity" property for ThreadContext |
Date: |
Thu, 29 Sep 2022 13:13:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
David Hildenbrand <david@redhat.com> 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 <mprivozn@redhat.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> 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'] } }
>
>
> ##
[...]
[PATCH v1 4/7] util: Add write-only "node-affinity" property for ThreadContext, David Hildenbrand, 2022/09/28
- Re: [PATCH v1 4/7] util: Add write-only "node-affinity" property for ThreadContext,
Markus Armbruster <=
[PATCH v1 5/7] util: Make qemu_prealloc_mem() optionally consume a ThreadContext, David Hildenbrand, 2022/09/28
[PATCH v1 6/7] hostmem: Allow for specifying a ThreadContext for preallocation, David Hildenbrand, 2022/09/28
[PATCH v1 7/7] vl: Allow ThreadContext objects to be created before the sandbox option, David Hildenbrand, 2022/09/28