[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180316105729.ykomeftdvlzqm4p6@gmail.com>
Date: Fri, 16 Mar 2018 00:57:29 -1000
From: Joey Pabalinas <joeypabalinas@...il.com>
To: x86@...nel.org
Cc: Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Joey Pabalinas <joeypabalinas@...il.com>
Subject: [PATCH] x86/kvm: replace TASK_UNINTERRUPTIBLE with TASK_KILLABLE
There doesn't seem to be any advantage to having a *completely*
uninterruptible task here. For most users, allowing a task to respond
to the SIGKILL interrupt signal (all other signals are ignored just like
TASK_UNINTERRUPTIBLE) will not impact them at all.
However, for the rare edge-cases where a task becomes stuck, maybe due to
snapshot corruption or some other similarly unrecoverable error, it
is *much* more convenient for a user to be able to have the additional
option of nuking that task with SIGKILL, rather than annoying them by
forcing them to reboot in order to remove the immortal process.
Signed-off-by: Joey Pabalinas <joeypabalinas@...il.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index bc1a27280c4bf77899..7d4faee962e0c2e3c1 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -154,8 +154,8 @@ void kvm_async_pf_task_wait(u32 token, int interrupt_kernel)
for (;;) {
if (!n.halted)
- prepare_to_swait(&n.wq, &wait, TASK_UNINTERRUPTIBLE);
- if (hlist_unhashed(&n.link))
+ prepare_to_swait(&n.wq, &wait, TASK_KILLABLE);
+ if (hlist_unhashed(&n.link) || fatal_signal_pending(current))
break;
rcu_irq_exit();
--
Cheers,
Joey Pabalinas
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists