From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 874C7C433FE for ; Wed, 5 Oct 2022 09:04:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230114AbiJEJEP (ORCPT ); Wed, 5 Oct 2022 05:04:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230177AbiJEJEC (ORCPT ); Wed, 5 Oct 2022 05:04:02 -0400 Received: from relay.virtuozzo.com (relay.virtuozzo.com [130.117.225.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 382C57644D for ; Wed, 5 Oct 2022 02:03:57 -0700 (PDT) Received: from dev011.ch-qa.sw.ru ([172.29.1.16]) by relay.virtuozzo.com with esmtp (Exim 4.95) (envelope-from ) id 1og0GQ-007ckN-Ue; Wed, 05 Oct 2022 11:02:51 +0200 From: Alexander Atanasov To: Nadav Amit , VMware PV-Drivers Reviewers , Arnd Bergmann , Greg Kroah-Hartman Cc: kernel@openvz.org, Alexander Atanasov , linux-kernel@vger.kernel.org Subject: [PATCH v4 6/7] drivers: vmware: balloon - report inflated memory Date: Wed, 5 Oct 2022 12:01:56 +0300 Message-Id: <20221005090158.2801592-7-alexander.atanasov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221005090158.2801592-1-alexander.atanasov@virtuozzo.com> References: <20221005090158.2801592-1-alexander.atanasov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Propagate inflated memory changes to mm. Signed-off-by: Alexander Atanasov --- drivers/misc/vmw_balloon.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index 91d4d2a285c5..ce581e3d101c 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_balloon.c @@ -1161,6 +1161,8 @@ static void vmballoon_inflate(struct vmballoon *b) cond_resched(); } + /* Update core after inflation is done - send a single notification */ + balloon_set_inflated_free(atomic64_read(&b->size) << 2); /* * Release pages that were allocated while attempting to inflate the @@ -1285,6 +1287,8 @@ static unsigned long vmballoon_deflate(struct vmballoon *b, uint64_t n_frames, cond_resched(); } + /* Update core after deflation is done - send a single notification */ + balloon_set_inflated_free(atomic64_read(&b->size) << 2); return deflated_frames; } -- 2.31.1