From nobody Wed May 8 02:19:16 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1576160327; cv=none; d=zohomail.com; s=zohoarc; b=OF2HfYVdEx0wPzP5i9Y1Bnld0Cw59vuDhBRccyMGlWIHRbiJlwqHQqmonjmO67gqmeQw27AjTec1lOHjTfDxxZv7ku7rtj8Ii6jnHk4A714wVSN5XjSkJnSc0sRcuQ5PGr1NckJoPO+LDfodmg4Dp6aPCIJgEvp1GSa4Zf8P0SQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576160327; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=E4RsO2KRC9WV0XgVsn2VNmaWlm4cLXN4CaxqLpaqq/4=; b=h13r0R2lNqSyHyTNNFvXdKP2eZDAkoWGVrDivE3Qf1SM6hVZR1yjkPN0bWf7KC+Mhgk2UWUswsWN7ihsYFQsRDs1rusFfDH7hGfNzDaNOWLzbwSd3d2xFxJ8LpCIGTXFAfg9VFTnS3dGtCMys8UIaf9UENkjHWVNfri1AGYiKXI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1576160327491384.7605166373777; Thu, 12 Dec 2019 06:18:47 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ifPI4-0000m0-2V; Thu, 12 Dec 2019 14:18:04 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ifPI3-0000lu-2o for xen-devel@lists.xenproject.org; Thu, 12 Dec 2019 14:18:03 +0000 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2f8842b8-1cea-11ea-b6f1-bc764e2007e4; Thu, 12 Dec 2019 14:17:53 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E81E7B170; Thu, 12 Dec 2019 14:17:52 +0000 (UTC) X-Inumbo-ID: 2f8842b8-1cea-11ea-b6f1-bc764e2007e4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Date: Thu, 12 Dec 2019 15:17:50 +0100 Message-Id: <20191212141750.1896-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH] xen/balloon: fix ballooned page accounting without hotplug enabled X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Boris Ostrovsky , Stefano Stabellini MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" When CONFIG_XEN_BALLOON_MEMORY_HOTPLUG is not defined reserve_additional_memory() will set balloon_stats.target_pages to a wrong value in case there are still some ballooned pages allocated via alloc_xenballooned_pages(). This will result in balloon_process() no longer be triggered when ballooned pages are freed in batches. Reported-by: Nicholas Tsirakis Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky --- drivers/xen/balloon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 4f2e78a5e4db..0c142bcab79d 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -394,7 +394,8 @@ static struct notifier_block xen_memory_nb =3D { #else static enum bp_state reserve_additional_memory(void) { - balloon_stats.target_pages =3D balloon_stats.current_pages; + balloon_stats.target_pages =3D balloon_stats.current_pages + + balloon_stats.target_unpopulated; return BP_ECANCELED; } #endif /* CONFIG_XEN_BALLOON_MEMORY_HOTPLUG */ --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel