[PATCH] build: Drop numad dependency on numactl

Jim Fehlig via Devel posted 1 patch 1 week, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20260324040909.78306-1-jfehlig@suse.com
meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] build: Drop numad dependency on numactl
Posted by Jim Fehlig via Devel 1 week, 3 days ago
From: Jim Fehlig <jfehlig@suse.com>

The numad and numactl options are orthogonal. numactl support does
not need to be enabled to enable numad support. Drop the dependency.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---

AFAIK that's the case. And if not, the dependency should be expressed
in the numad package.

 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index 57a87b9a78..1c2d0deb34 100644
--- a/meson.build
+++ b/meson.build
@@ -2020,10 +2020,10 @@ if not get_option('nss').disabled()
   endif
 endif
 
-if not get_option('numad').disabled() and numactl_dep.found() and host_machine.system() == 'linux'
+if not get_option('numad').disabled() and host_machine.system() == 'linux'
   conf.set('WITH_NUMAD', 1)
 elif get_option('numad').enabled()
-  error('You must have a Linux host with numactl enabled for numad support.')
+  error('You must have a Linux host for numad support.')
 endif
 
 # nwfilter should only be compiled for linux, and only if the
-- 
2.51.0
Re: [PATCH] build: Drop numad dependency on numactl
Posted by Daniel P. Berrangé via Devel 1 week, 3 days ago
On Mon, Mar 23, 2026 at 10:07:31PM -0600, Jim Fehlig via Devel wrote:
> From: Jim Fehlig <jfehlig@suse.com>
> 
> The numad and numactl options are orthogonal. numactl support does
> not need to be enabled to enable numad support. Drop the dependency.
> 
> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
> ---
> 
> AFAIK that's the case. And if not, the dependency should be expressed
> in the numad package.

It is complicated and I think the current dep is correct.

Libvirt uses "numad" in single-shot mode, not daemon mode. We spawn
numad to ask it what NUMA is "best" to put the VM on, and it spits
back out an answer.  We then use numactl APIs to apply that policy
suggestion.

So regardless of what deps numad has, if libvirt has enabled numad,
we need to have the numactl APIs available.

> 
>  meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 57a87b9a78..1c2d0deb34 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2020,10 +2020,10 @@ if not get_option('nss').disabled()
>    endif
>  endif
>  
> -if not get_option('numad').disabled() and numactl_dep.found() and host_machine.system() == 'linux'
> +if not get_option('numad').disabled() and host_machine.system() == 'linux'
>    conf.set('WITH_NUMAD', 1)
>  elif get_option('numad').enabled()
> -  error('You must have a Linux host with numactl enabled for numad support.')
> +  error('You must have a Linux host for numad support.')
>  endif
>  
>  # nwfilter should only be compiled for linux, and only if the
> -- 
> 2.51.0
> 

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|
Re: [PATCH] build: Drop numad dependency on numactl
Posted by Jim Fehlig via Devel 1 week, 2 days ago
On 3/24/26 3:06 AM, Daniel P. Berrangé wrote:
> On Mon, Mar 23, 2026 at 10:07:31PM -0600, Jim Fehlig via Devel wrote:
>> From: Jim Fehlig <jfehlig@suse.com>
>>
>> The numad and numactl options are orthogonal. numactl support does
>> not need to be enabled to enable numad support. Drop the dependency.
>>
>> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
>> ---
>>
>> AFAIK that's the case. And if not, the dependency should be expressed
>> in the numad package.
> 
> It is complicated and I think the current dep is correct.
> 
> Libvirt uses "numad" in single-shot mode, not daemon mode. We spawn
> numad to ask it what NUMA is "best" to put the VM on, and it spits
> back out an answer.  We then use numactl APIs to apply that policy
> suggestion.

Ah, right, the dependency between the two is imposed by libvirt. Thanks for the 
reminder.

> 
> So regardless of what deps numad has, if libvirt has enabled numad,
> we need to have the numactl APIs available.

Agreed.

Regards,
Jim