* [Qemu-devel] [PATCH 1.1] Switch SIG_IPI to SIGUSR1
@ 2012-05-09 22:14 Jan Kiszka
2012-05-09 22:36 ` Andreas Färber
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jan Kiszka @ 2012-05-09 22:14 UTC (permalink / raw)
To: qemu-devel, Anthony Liguori
Cc: Kevin Wolf, Peter Maydell, Michael Tokarev, Avi Kivity
Use SIGUSR1 unconditionally as SIG_IPI. First, ucontext coroutines tend
to corrupt RT signal masks due to a 32-on-64-bit Linux kernel bug. And,
second, there appears to be no advantage in using RT signals for VCPU
kicking.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
As people prefer to stick with ucontext, this replaces the backend
switch for i386-linux.
Avi, you once committed the RT signal based SIG_IPI version to
qemu-kvm. Can you confirm that SIGUSR1 comes with no downside?
This is also stable material.
main-loop.h | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/main-loop.h b/main-loop.h
index c06b8bc..dce1cd9 100644
--- a/main-loop.h
+++ b/main-loop.h
@@ -25,11 +25,7 @@
#ifndef QEMU_MAIN_LOOP_H
#define QEMU_MAIN_LOOP_H 1
-#ifdef SIGRTMIN
-#define SIG_IPI (SIGRTMIN+4)
-#else
#define SIG_IPI SIGUSR1
-#endif
/**
* qemu_init_main_loop: Set up the process so that it can run the main loop.
--
1.7.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 1.1] Switch SIG_IPI to SIGUSR1
2012-05-09 22:14 [Qemu-devel] [PATCH 1.1] Switch SIG_IPI to SIGUSR1 Jan Kiszka
@ 2012-05-09 22:36 ` Andreas Färber
2012-05-10 9:35 ` Avi Kivity
2012-05-14 15:04 ` Anthony Liguori
2 siblings, 0 replies; 4+ messages in thread
From: Andreas Färber @ 2012-05-09 22:36 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel, qemu-stable
Am 10.05.2012 00:14, schrieb Jan Kiszka:
> Use SIGUSR1 unconditionally as SIG_IPI. First, ucontext coroutines tend
> to corrupt RT signal masks due to a 32-on-64-bit Linux kernel bug. And,
> second, there appears to be no advantage in using RT signals for VCPU
> kicking.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
[...]
> This is also stable material.
Please cc qemu-stable then. When omitting that in the original patch
submission, stable maintainers won't notice when the patch gets a
"Thanks, applied" reply.
/-F
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 1.1] Switch SIG_IPI to SIGUSR1
2012-05-09 22:14 [Qemu-devel] [PATCH 1.1] Switch SIG_IPI to SIGUSR1 Jan Kiszka
2012-05-09 22:36 ` Andreas Färber
@ 2012-05-10 9:35 ` Avi Kivity
2012-05-14 15:04 ` Anthony Liguori
2 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2012-05-10 9:35 UTC (permalink / raw)
To: Jan Kiszka
Cc: Kevin Wolf, Peter Maydell, Anthony Liguori, Michael Tokarev,
qemu-devel
On 05/10/2012 01:14 AM, Jan Kiszka wrote:
> Use SIGUSR1 unconditionally as SIG_IPI. First, ucontext coroutines tend
> to corrupt RT signal masks due to a 32-on-64-bit Linux kernel bug. And,
> second, there appears to be no advantage in using RT signals for VCPU
> kicking.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> As people prefer to stick with ucontext, this replaces the backend
> switch for i386-linux.
>
> Avi, you once committed the RT signal based SIG_IPI version to
> qemu-kvm. Can you confirm that SIGUSR1 comes with no downside?
>
In fact SIGUSR1 would be better in that real-time signals are queued, so
two IPIs are delivered twice with the old SIG_IPI and only once with
SIGUSR1.
I have some vague recollection that real time signals are handled faster
in the kernel. Even if this is true, it's meaningless with kernel
irqchip since signalling is only used heavily with userspace APIC.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 1.1] Switch SIG_IPI to SIGUSR1
2012-05-09 22:14 [Qemu-devel] [PATCH 1.1] Switch SIG_IPI to SIGUSR1 Jan Kiszka
2012-05-09 22:36 ` Andreas Färber
2012-05-10 9:35 ` Avi Kivity
@ 2012-05-14 15:04 ` Anthony Liguori
2 siblings, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2012-05-14 15:04 UTC (permalink / raw)
To: Jan Kiszka
Cc: Kevin Wolf, Peter Maydell, Michael Tokarev, qemu-devel,
Avi Kivity
On 05/09/2012 05:14 PM, Jan Kiszka wrote:
> Use SIGUSR1 unconditionally as SIG_IPI. First, ucontext coroutines tend
> to corrupt RT signal masks due to a 32-on-64-bit Linux kernel bug. And,
> second, there appears to be no advantage in using RT signals for VCPU
> kicking.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
>
> As people prefer to stick with ucontext, this replaces the backend
> switch for i386-linux.
>
> Avi, you once committed the RT signal based SIG_IPI version to
> qemu-kvm. Can you confirm that SIGUSR1 comes with no downside?
>
> This is also stable material.
>
> main-loop.h | 4 ----
> 1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/main-loop.h b/main-loop.h
> index c06b8bc..dce1cd9 100644
> --- a/main-loop.h
> +++ b/main-loop.h
> @@ -25,11 +25,7 @@
> #ifndef QEMU_MAIN_LOOP_H
> #define QEMU_MAIN_LOOP_H 1
>
> -#ifdef SIGRTMIN
> -#define SIG_IPI (SIGRTMIN+4)
> -#else
> #define SIG_IPI SIGUSR1
> -#endif
>
> /**
> * qemu_init_main_loop: Set up the process so that it can run the main loop.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-14 15:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-09 22:14 [Qemu-devel] [PATCH 1.1] Switch SIG_IPI to SIGUSR1 Jan Kiszka
2012-05-09 22:36 ` Andreas Färber
2012-05-10 9:35 ` Avi Kivity
2012-05-14 15:04 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).