PING: [PATCH] backends/hostmem: Ignore ENOSYS while setting MPOL_DEFAULT
Hello! No news for a long time, we are at RC stage. Could we get this in?
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
Quoted 67 lines
-----Original Message-----
From: [email protected] [mailto:qemu-devel- [email protected]] On Behalf Of Eduardo Habkost
Sent: Tuesday, October 27, 2015 8:32 PM
To: Pavel Fedin
Cc: 'Paolo Bonzini'; [email protected]
Subject: Re: [Qemu-devel] [PATCH] backends/hostmem: Ignore ENOSYS while settingMPOL_DEFAULTQuoted 10 lines · Pavel Fedin
Currently hostmem backend fails if
CONFIG_NUMAis enabled for the qemu (default), but NUMA is not supported by the kernel. This makes it impossible to use ivshmem in such configurations.This patch fixes the problem by ignoring ENOSYS error if policy is set to
MPOL_DEFAULT. This way the code behaves in the same way as ifCONFIG_NUMAwas not defined. qemu will still fail if the user specifies some other policy, so that the user knows it.Signed-off-by Pavel Fedin <[email protected]>Reviewed-by Eduardo Habkost <[email protected]>Thanks. Applied to numa tree, with the following indentation fix:
backends/hostmem.c +1
-1@@ -315,7 +315,7 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp) maxnode ? backend->host_nodes : NULL, maxnode + 1, flags)) {if (backend->policy !=MPOL_DEFAULT || errno !=ENOSYS ) {error_setg_errno (errp, errno, -"cannot bind memory to host NUMA nodes" ); +"cannot bind memory to host NUMA nodes" );return ; } }Quoted 24 lines
--- backends/hostmem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)backends/hostmem.c +4
-3@@ -313,9 +313,11 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp)assert (maxnode <=MAX_NODES );if (mbind (ptr, sz, backend->policy, maxnode ? backend->host_nodes :NULL , maxnode +1 , flags)) { -error_setg_errno (errp, errno, +if (backend->policy !=MPOL_DEFAULT || errno !=ENOSYS ) { +error_setg_errno (errp, errno,"cannot bind memory to host NUMA nodes" ); -return ; +return ; + } }#endif /* Preallocate memory after the NUMA policy has been instantiated. -- Quoted 3 lines
1.9.5.msysgit.0
--
Eduardo
Quoted 1 line · Pavel Fedin
Hello! No news for a long time, we are at RC stage. Could we get this in?
Yes, queued for -rc2.
Paolo
Quoted 75 lines
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center RussiaQuoted 67 lines
-----Original Message-----
From: [email protected] [mailto:qemu-devel- [email protected]] On Behalf Of Eduardo Habkost
Sent: Tuesday, October 27, 2015 8:32 PM
To: Pavel Fedin
Cc: 'Paolo Bonzini'; [email protected]
Subject: Re: [Qemu-devel] [PATCH] backends/hostmem: Ignore ENOSYS while settingMPOL_DEFAULTQuoted 10 lines · Pavel Fedin
Currently hostmem backend fails if
CONFIG_NUMAis enabled for the qemu (default), but NUMA is not supported by the kernel. This makes it impossible to use ivshmem in such configurations.This patch fixes the problem by ignoring ENOSYS error if policy is set to
MPOL_DEFAULT. This way the code behaves in the same way as ifCONFIG_NUMAwas not defined. qemu will still fail if the user specifies some other policy, so that the user knows it.Signed-off-by Pavel Fedin <[email protected]>Reviewed-by Eduardo Habkost <[email protected]>Thanks. Applied to numa tree, with the following indentation fix:
backends/hostmem.c +1
-1@@ -315,7 +315,7 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp) maxnode ? backend->host_nodes : NULL, maxnode + 1, flags)) {if (backend->policy !=MPOL_DEFAULT || errno !=ENOSYS ) {error_setg_errno (errp, errno, -"cannot bind memory to host NUMA nodes" ); +"cannot bind memory to host NUMA nodes" );return ; } }Quoted 24 lines
--- backends/hostmem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)backends/hostmem.c +4
-3@@ -313,9 +313,11 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp)assert (maxnode <=MAX_NODES );if (mbind (ptr, sz, backend->policy, maxnode ? backend->host_nodes :NULL , maxnode +1 , flags)) { -error_setg_errno (errp, errno, +if (backend->policy !=MPOL_DEFAULT || errno !=ENOSYS ) { +error_setg_errno (errp, errno,"cannot bind memory to host NUMA nodes" ); -return ; +return ; + } }#endif /* Preallocate memory after the NUMA policy has been instantiated. -- Quoted 3 lines
1.9.5.msysgit.0
--
Eduardo
Quoted 4 lines · Paolo Bonzini
Quoted 1 line · Pavel Fedin
Hello! No news for a long time, we are at RC stage. Could we get this in?
Yes, queued for -rc2.
... doh, Eduardo applied it to the NUMA tree already. I missed that backends/hostmem* is under NUMA and not memory.
Paolo
Quoted 79 lines
Paolo
Quoted 75 lines
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center RussiaQuoted 67 lines
-----Original Message-----
From: [email protected] [mailto:qemu-devel- [email protected]] On Behalf Of Eduardo Habkost
Sent: Tuesday, October 27, 2015 8:32 PM
To: Pavel Fedin
Cc: 'Paolo Bonzini'; [email protected]
Subject: Re: [Qemu-devel] [PATCH] backends/hostmem: Ignore ENOSYS while settingMPOL_DEFAULTQuoted 10 lines · Pavel Fedin
Currently hostmem backend fails if
CONFIG_NUMAis enabled for the qemu (default), but NUMA is not supported by the kernel. This makes it impossible to use ivshmem in such configurations.This patch fixes the problem by ignoring ENOSYS error if policy is set to
MPOL_DEFAULT. This way the code behaves in the same way as ifCONFIG_NUMAwas not defined. qemu will still fail if the user specifies some other policy, so that the user knows it.Signed-off-by Pavel Fedin <[email protected]>Reviewed-by Eduardo Habkost <[email protected]>Thanks. Applied to numa tree, with the following indentation fix:
backends/hostmem.c +1
-1@@ -315,7 +315,7 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp) maxnode ? backend->host_nodes : NULL, maxnode + 1, flags)) {if (backend->policy !=MPOL_DEFAULT || errno !=ENOSYS ) {error_setg_errno (errp, errno, -"cannot bind memory to host NUMA nodes" ); +"cannot bind memory to host NUMA nodes" );return ; } }Quoted 24 lines
--- backends/hostmem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)backends/hostmem.c +4
-3@@ -313,9 +313,11 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp)assert (maxnode <=MAX_NODES );if (mbind (ptr, sz, backend->policy, maxnode ? backend->host_nodes :NULL , maxnode +1 , flags)) { -error_setg_errno (errp, errno, +if (backend->policy !=MPOL_DEFAULT || errno !=ENOSYS ) { +error_setg_errno (errp, errno,"cannot bind memory to host NUMA nodes" ); -return ; +return ; + } }#endif /* Preallocate memory after the NUMA policy has been instantiated. -- Quoted 3 lines
1.9.5.msysgit.0
--
Eduardo
Quoted 10 lines · Paolo Bonzini
Quoted 4 lines · Paolo Bonzini
Quoted 1 line · Pavel Fedin
Hello! No news for a long time, we are at RC stage. Could we get this in?
Yes, queued for -rc2.
... doh, Eduardo applied it to the NUMA tree already. I missed that backends/hostmem* is under NUMA and not memory.
I had applied it to the numa tree but forgot to send a pull request, sorry. I will submit a pull request in a moment.
Signature · 1 line
Eduardo