Received: by 10.213.65.68 with SMTP id h4csp308812imn; Fri, 16 Mar 2018 03:58:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELu3MQ6OyTn5aVVNNj9vwH0ZP+wFbwIjOH4+eOMp6v631Isi8gsk5PBK4ggEdD9AU4z40jzt X-Received: by 10.99.96.141 with SMTP id u135mr1142089pgb.49.1521197926753; Fri, 16 Mar 2018 03:58:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521197926; cv=none; d=google.com; s=arc-20160816; b=UK1omy0RoHlJo8794mzFm67mVh5489GJ0D1W4zHijrWzMTzdZyf0JYKhflJXH8vtkM x8jt3iMA+OkYTQnUfJDmVlTwH4m9lpFp+wfhEJKfJUsuS9SqbcMj8U/FrlojGYOc47NV uOWXUSCMGcT8NwasFJykKZIPSf3V3wmKZK2/JZa91qh3rxjln+spNmZwpJQMqBzjRrke cKh7/VIMvIyoEiwgwAXG4RhVDtZk7EiZYN2RkSOespiL2RmmClEsPt2SkdNjL/e5WIPr sV9tzQe7iEf68P49tEqqTvz3QG8KGId0kAXzWN9yd8YqzF6R7UxKsxi8EuE3VggQYHqj OUzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=Z6yYSRPkTNcKg+LNdgaIuJfAQYv7Vdbn0gDgI4Lw+rk=; b=daUbEYcfQxC3fX6A8cTTlmkauC87CeZ2KDDrFsP5HD0FYXVMV6OTM+wDpsbTRaXfCp i8rp2H0vWneoMqqd16Do/34aq/HWjnLDDZuN7RxbHErIXulIwHh9HbdhAk2oOobvjZMA moD4fd6jNkuHs6ehm2cXjkMJlVhgKsu8a0KxuZuquQbKgL87QUoa6z/dnsxKt4IMP0NY gMWBq2u7rR7B5znMFzpxLNkhh6h97A5QL1iiDBJN/VBaCYIvtI6YWeZ+w8WnRmnziDVo yqItgNRTxiusDrnIRrDQzbVi/HH44w1NF3ACdz5tsn9ODjQS/OTjXwUbaG2DlKdRCxgA WFIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TaVrXgio; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 69-v6si5928498plc.92.2018.03.16.03.58.32; Fri, 16 Mar 2018 03:58:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TaVrXgio; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753623AbeCPK5g (ORCPT + 99 others); Fri, 16 Mar 2018 06:57:36 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:39806 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753592AbeCPK5d (ORCPT ); Fri, 16 Mar 2018 06:57:33 -0400 Received: by mail-pl0-f68.google.com with SMTP id k22-v6so4842302pls.6; Fri, 16 Mar 2018 03:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=Z6yYSRPkTNcKg+LNdgaIuJfAQYv7Vdbn0gDgI4Lw+rk=; b=TaVrXgioQ4Gw+rtNbKWxW9lc/3t0In+soYYuqlNtUup4+q5Mr3dwiFT4meIwIOjeA5 3efd09XizsM0TLbT9KKS4mJc/4bZwNwU7SZQ1jjyPPbXU1Ehs0zIKCA0DSk742NTXRw1 OKvGMdMG6eUf+nLZRfKdVTbpcPAiwqXU0tREct9f6Qr0owi4gOaSghm6gZnUZkmpYYA9 XwLADYxvEIwnr5b+iCxhleEyRVrgYZjAZUJFmsicdz8EaIHymZQXgFIxwN94qsyDf15A FwtMZGiyUZy7nI1qoLPrjY9ZumWa8KQD6S6KKuEVORmZnu4qVPBqG6/lujeMB4cSBZN+ anjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=Z6yYSRPkTNcKg+LNdgaIuJfAQYv7Vdbn0gDgI4Lw+rk=; b=S28ZNhBb3x/Xi9DKp9dng/VAF6+l9bP52l5x5ki0NPNIzkFLiLXdyNt+vo2JhObFw9 gegfiuuUI5Pm6MZEV89wSKjek7kS1PEPgg8CBzbCBtXafQBpdWObDkm44MhUSK9Ty3WG bjqqh6SMJZT9q+jf0X+8a0pm8piAls0yRj9m76fqsKORCBeJXHtyK4B2x2vb3ZGHq5P4 ckQhY9fxPk93E2BEwvS06JR9UFpIp48JtxORdzcRZ/4mqnwwtVj19GU6TfM4Q7tX8T4T DXjYN4z64hEYlY1BuCpHV6CQUgFm4268/ofdlimy/XT/X8n2Mn26Bj6N8KAND9ZE4ur/ NQkQ== X-Gm-Message-State: AElRT7FA9ZD4N6VCuDDx6iC7jiby+L4C8KeUjXSCgYvN0ijUmoDlBJxO Elq5ZdYXXwsf+ErBlE4D2IU= X-Received: by 2002:a17:902:122:: with SMTP id 31-v6mr1683682plb.280.1521197852976; Fri, 16 Mar 2018 03:57:32 -0700 (PDT) Received: from gmail.com ([2605:e000:1117:c19a:2e0:1bff:fe70:ea]) by smtp.gmail.com with ESMTPSA id 73sm12694606pgg.73.2018.03.16.03.57.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Mar 2018 03:57:31 -0700 (PDT) Date: Fri, 16 Mar 2018 00:57:29 -1000 From: Joey Pabalinas To: x86@kernel.org Cc: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Joey Pabalinas Subject: [PATCH] x86/kvm: replace TASK_UNINTERRUPTIBLE with TASK_KILLABLE Message-ID: <20180316105729.ykomeftdvlzqm4p6@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dila3hn22bplhzf5" Content-Disposition: inline User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --dila3hn22bplhzf5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 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_ke= rnel) =20 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; =20 rcu_irq_exit(); --=20 Cheers, Joey Pabalinas --dila3hn22bplhzf5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKlZXrihdNOcUPZTNruvLfWhyVBkFAlqroxkACgkQruvLfWhy VBmDPQ//ag4/WuE6iw5Jh+vVxbnrakFYr9aAoIri1SNuWKxNqsjs+fpqBmjfW0Em gF2xP3n42hNfwejg1yQSIqe72dqFjMNTnxmdvYQ/BdM6yZKhf2iECBZIYFQxYDKK qVIu/WWrzregF++pkyMa9zzLPDSbax/JDouebC8jDlAS91t7cSpJEoAx2Tswn5Od 9RaoreGMKquF/lbkUTXFhuAltARxploYYz8aVn1yTClvu2Jgp2ZTa17RE3DB6hW2 BaGgPt3HA4l6BXqZGRUiMNmn7hqOrHaH8ur5u9P9Ak7xK5ObTFldoNuUYcRyEcrj 89WkglLlxHe62aGVZtDSWSHLvbAsDItuVMLFz6wE4+363MmRN7QItgM0b1s0afEH 4St85tC2cWIJIUD6m3qudzpbFyeDvszr0fVg0d6lJRkeBgrNO7gC4rkqqSe2u7qS 5JlOyzwejqayYjVvkHX41g/RahhGl7eBtYgNS/HUy4JmTegYDkIF23DGp/Pmu/J5 SDfQEhDSU0VYTUg0uTBCsFDajL7RxrzB0jZ3bvB3fClAF4a9UM3P8hxNdGMDCOFX UajxRiezBHOzdCKGjknoMK4RVZ7CgRRJL3Erc4YKbrWseOdfgUaNawVLRi1Nh5AH r8f7djLgc0/eVTaJ+hBBlGbW/+aImOyb/VW7FUpqzX9JzwRV0gs= =9cRh -----END PGP SIGNATURE----- --dila3hn22bplhzf5--