Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC177C433EF for ; Sun, 3 Oct 2021 04:47:56 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8AB25619E5 for ; Sun, 3 Oct 2021 04:47:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8AB25619E5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.201095.355515 (Exim 4.92) (envelope-from ) id 1mWtPK-0003tz-5U; Sun, 03 Oct 2021 04:47:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 201095.355515; Sun, 03 Oct 2021 04:47:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mWtPK-0003ts-1O; Sun, 03 Oct 2021 04:47:26 +0000 Received: by outflank-mailman (input) for mailman id 201095; Sun, 03 Oct 2021 04:47:24 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mWtPI-0003tm-I6 for xen-devel@lists.xenproject.org; Sun, 03 Oct 2021 04:47:24 +0000 Received: from wout1-smtp.messagingengine.com (unknown [64.147.123.24]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2e24ca65-8992-4f6c-98fc-c94ab568b96a; Sun, 03 Oct 2021 04:47:23 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id CB78732003C0; Sun, 3 Oct 2021 00:47:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 03 Oct 2021 00:47:22 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 3 Oct 2021 00:47:20 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2e24ca65-8992-4f6c-98fc-c94ab568b96a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=1y8M4P/hiJ1PP8+Pb/DaVZFVNJQSS bnivk0mqqAPAC4=; b=FBy2L5gsgRLJHoOnf+zW+zHoiS+tEBQ7pm2Jyw2hw+sFj ifzy77IxYGZL5QnBoGUGNoXecla/Pp6v5zYIJ33zl6LTjMBqIl4SS6Tji75B5MG2 FFsc99TOO4m2LUIRFULECpHDWfH2bo89OxYABl6rvmnFm5Mqap3uqNL660LgK2Xm VO0RFUoDcCwEbOCz7SJgu1IZ3gcuO6cf/SItxEmsIUMU0zR/Vp/4ftwQbuhzrQAu yIrgt+PfqYPckEmFwzMXjSdvHwHaa3BBrHbiVrXpWJjvIrmNLczOvRNwE9Punazj p2hJANoKJZ/yPrs3IaHXFNOcuJ+UdKdV8X86cpnxw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekledgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggusehgtderredttdejnecuhfhrohhmpeforghrvghkucfo rghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvhhish hisghlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpedtudfgtedu veduieevvefgteeujeelgffggffhhffhhedtffeffefgudeugeefhfenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrghrmhgrrhgvkhesihhn vhhishhisghlvghthhhinhhgshhlrggsrdgtohhm X-ME-Proxy: Date: Sun, 3 Oct 2021 06:47:17 +0200 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: xen-devel Cc: Juergen Gross , Jan Beulich Subject: xen-balloon thread using 100% of CPU, regression in 5.4.150 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oLSao2sPpm0inQ0V" Content-Disposition: inline --oLSao2sPpm0inQ0V Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Date: Sun, 3 Oct 2021 06:47:17 +0200 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: xen-devel Cc: Juergen Gross , Jan Beulich Subject: xen-balloon thread using 100% of CPU, regression in 5.4.150 Hi, After updating a PVH domU to 5.4.150, I see xen-balloon thread using 100% CPU (one thread). This is a domain started with memory=3Dmaxmem=3D716800KiB (via libvirt). Th= en, inside, I see: # cat /sys/devices/system/xen_memory/xen_memory0/target_kb 716924 # cat /sys/devices/system/xen_memory/xen_memory0/info/current_kb 716400 Doing `cat info/current_kb > target_kb` "fixes" the issue. But still, something is wrong - on earlier kernel (5.4.143 to be precise), it wasn't spinning, with exactly the same values reported in sysfs. It shouldn't run in circles if it can't get that much memory it wants. I strongly suspect "xen/balloon: use a kernel thread instead a workqueue" or related commit being responsible, but I haven't verified it. This specific test is from Xen 4.8.5 (+quite a lot of patches), but I've got report of the same issue on 4.14.3 too. Anyway, I don't think Xen version matters here much. I have _not_ managed to reproduce the issue on 5.10.70, nor 5.14.9. In both cases, just after starting the domain, I see current_kb=3Dtarget_kb=3D716412. And writing 716924 to target_kb manually does not cause xen-balloon thread to spin. --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab --oLSao2sPpm0inQ0V Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAmFZNdUACgkQ24/THMrX 1yzJkQf/fy7zmFrnXFbpxTfQN2a7fMxJKm2wHAYJpd9I95rXRWM1ryt7TUE8GjmN PxUkltEitH8tM6VzM7TqkpcQqIkK9u+r7ahP2WsMiVR4tUz75RZTGAO19p66ojle 2afTAqZKIxrMimfolEOhWEqvigCOxHLES5fKsfvMO/g0sr/mIOygaH0B3rGZO8kg K253XN6QgKf6hp+YCH1JxSaS7tikEbPrKCaMnShsaFk7Q/q0Duv7VDD2nvzus5ql N06cnoBb14ikkHz8S+swTb+MLTggSlQt/NWmRZZcC6NulnXRUwaN3XI9+Pl2YdYg Bm4h3NnbMgVAOfMlLhhOgkjvKp0CYA== =nn/A -----END PGP SIGNATURE----- --oLSao2sPpm0inQ0V--