Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1675589rwb; Wed, 5 Oct 2022 03:09:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5qlJTiYqQR6yfSN+nGivRrZYt87KUoBPPjYBNZRnKGRxJzcUe+RfsDxk1m16aDdVS++RTL X-Received: by 2002:a17:90a:fe13:b0:20a:8fc8:60ec with SMTP id ck19-20020a17090afe1300b0020a8fc860ecmr4368633pjb.69.1664964572933; Wed, 05 Oct 2022 03:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664964572; cv=none; d=google.com; s=arc-20160816; b=snO8QsvZVjB3mEAoCVxvcIqSwCUKh7T60wKMKv5yhkLO3Mgiq317CPd2Vv2Yhz9twC 0S3bUrl5QBTKoG5SCwepPJOopoGSAzp87Z2jUWWuaXhM5QP4jrIuWA4QKULZ1daF1hjR BA26tHQgvXWn6Eam2laU7I5rHKdPjvGT1830lEIsvRhdUnDs9PGsbxUaNixxFaJ9dVkT QAUpsD63kLDYjY8J7wXyLXDJQR/vBHu3mJAOM+NKyeH005G2MZ43854cX1eFf7Jg2tte Z0wbR7GeUWr+nV76CtY6821un9hKKiXpZYAjWgky4ZGhNyx7oLhRedvdAWvo81fLK3lI 8Y4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=TiS+ZRpTIHO6hN5i9DYGH6Z4wzusXToYPjitaZ0vQBc=; b=fLXvkWt2cGENtqLs7pSutYA1Hz9oUPibpHK8MtEm4QfvfxaV+s2JFYV/DizlmH3S4e 1nxw78+HtM2Yri/hKTbnyMcnTy26NoIKZaY0YObyGCHAzmrl2Sa4jVTn3EJRodurTC2G w8nK5v4fFfpPrRoqFXgKuMKTmCGW0JdPZ8KfJfvvIPdKMwmiY85Mu2+PfPMylYUfF76S gHggvKn6YsUaoCjNxlB5sEpyGMj3MS8a40EgmqcHWqlzwDXIOrjDsaM7sopMXFESSKXE AKhvBUBfigLxmlPCv8khLAgaDLtwjE61Djs3TI7IfVI9+gk+fi0HxXkN4TXBkxXG9zRV n8zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w191-20020a6382c8000000b00455243d72dbsi4258313pgd.536.2022.10.05.03.09.20; Wed, 05 Oct 2022 03:09:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230197AbiJEJEO (ORCPT + 99 others); Wed, 5 Oct 2022 05:04:14 -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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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