Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3940327rdb; Thu, 28 Dec 2023 05:18:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1ehDAJCySFJbicuBeHGpiQ+/ot77COPn73iuZaAhtxkQ4CYVa3OezBT6epZszIHG3kF9U X-Received: by 2002:a17:903:28cd:b0:1d3:ccc0:80a5 with SMTP id kv13-20020a17090328cd00b001d3ccc080a5mr9891241plb.68.1703769504026; Thu, 28 Dec 2023 05:18:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703769504; cv=none; d=google.com; s=arc-20160816; b=BDEHa9SPnlTzVqA/YkAYtU9LEtVcTbgce6HAsZRucTNekP3SzPE0ArqNKJXrjUxvbZ oHgeRP0a4H8vHDS/txKAW8fJ/53HEgnaTH/NYZFcSoXhYoGxDxlSglLxEYbmVJc8qGdp TDHx6G+uktB2PAFyer+iwwpG3xLZVGgYbBLpTLJ9ExU6jfsYP8iQRWNAIrnyKENj+96I A7RaoclpnlmGg75o+eCDJcaDKECqHInyCMGz77IdaY3a0JFod4DhonzTca0LE4X4IPmH 050lTpZS+983Q7ZWjY4SFc/w/HWhORn+4+IBIstT692mmIWmSta1rnfnpwh33TeIecgd zDnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=D9IkIY5IGZ15Ln6UxSXDoBiGnEJFCVpaxetuMKkQM9Y=; fh=Ygndm656O2Lvm9Adh+CkPe8DB21X1hHHXwBgO1CfpZk=; b=YvMFRVPAD/yiIzxqTYnB42fzIuWGrY+ijKnwQlHA8zynYQdG7D8CwVdp0RqeSt9guc zK1dQ8+U6avl+PXnQiUoO9nSp+ouMEYfYrVV79NJ2wzL4oUS48qnjfrUd+S6YJTvTmDg e4XXGHG3G9oe5ZABwhXorBODOOfHu+99wNRbC5G7PHgJqGyQusUSHFGpXyqX7BCZxbez eliVLbaUuGIbLr35Fzguqo5F1IvEaCmIqT6ssn4g5y9Y1prm0n0EVQWqejFkZXbaNY1I VCvYfOdFAN5LHWkU25DZ8RLWtG5ctQnErwx6VawdomrWSedKOl5vLY191GhVONEZ4EBw TVgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12675-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12675-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bj19-20020a056a02019300b005cddb4051ffsi13164232pgb.25.2023.12.28.05.18.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 05:18:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12675-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12675-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12675-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B0804284FD1 for ; Thu, 28 Dec 2023 13:18:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFCEE8479; Thu, 28 Dec 2023 13:18:15 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from bmailout1.hostsharing.net (bmailout1.hostsharing.net [83.223.95.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20D178465; Thu, 28 Dec 2023 13:18:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=h08.hostsharing.net Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id A42FD3000D5B0; Thu, 28 Dec 2023 14:18:02 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 964802913A9; Thu, 28 Dec 2023 14:18:02 +0100 (CET) Date: Thu, 28 Dec 2023 14:18:02 +0100 From: Lukas Wunner To: Steven Haigh Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, f.ebner@proxmox.com Subject: Re: Qemu KVM thread spins at 100% CPU usage on scsi hot-unplug (kernel 6.6.8 guest) Message-ID: <20231228131802.GA21994@wunner.de> References: <3a7656ab-df4c-4d57-8866-661beffcddd7@crc.id.au> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a7656ab-df4c-4d57-8866-661beffcddd7@crc.id.au> User-Agent: Mutt/1.10.1 (2018-07-13) On Thu, Dec 28, 2023 at 01:03:10PM +1100, Steven Haigh wrote: > At some point in kernel 6.6.x, SCSI hotplug in qemu VMs broke. This was > mostly fixed in the following commit to release 6.6.8: > commit 5cc8d88a1b94b900fd74abda744c29ff5845430b > Author: Bjorn Helgaas > Date: Thu Dec 14 09:08:56 2023 -0600 > Revert "PCI: acpiphp: Reassign resources on bridge if necessary" > > After this commit, the SCSI block device is hotplugged correctly, and a device node as /dev/sdX appears within the qemu VM. > > New problem: > > When the same SCSI block device is hot-unplugged, the QEMU KVM process will > spin at 100% CPU usage. The guest shows no CPU being used via top, but the > host will continue to spin in the KVM thread until the VM is rebooted. Find out the PID of the qemu process on the host, then cat /proc/$PID/stack to see where the CPU time is spent.