From patchwork Wed Oct 19 09:56:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Atanasov X-Patchwork-Id: 5269 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp275947wrs; Wed, 19 Oct 2022 04:48:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5nHGYE4DMZG/YjAHAlY/9HP1zh5Zm0NfHe9CMJhauTqLnZxQJnZPpXmdEvQKT9MFlinkBG X-Received: by 2002:a17:906:5a4b:b0:78d:8790:d4a1 with SMTP id my11-20020a1709065a4b00b0078d8790d4a1mr6370905ejc.329.1666180122422; Wed, 19 Oct 2022 04:48:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666180122; cv=none; d=google.com; s=arc-20160816; b=hyCXyeIDDxI3KoQwJ+WSBwXQyHrUuNw27n0qaxsHD5swZ4gbLQZwNYRqgDZelpilJK zV7WdLhJ4YUpFniN0IeOurbaMG+dDH6EQszau+lzUdySXMWVQwRFJmDzNvyWDZ1bOqCO LGeM7iV/awP00hDs/UR6J1KWBVZxtiP3RkVKsBiFiuFJQl//+bmwMDVivKNUJXY5P3m1 P22VkRS2kU6NXhRc2ejiDVtycujspe4WyUIU0yCOutNrSV3xkOQ4IE8fuK9CitJtd7+S YiMnBbBQqGlV9+qK2jCR3vsCkHgTNxjSlEW2Wbpylc3sehZ3QYJ6amtnI1U6vt+sK4T6 fmSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from; bh=KfR1yiQyvGWILXvQgDdmh9/mTjqO7etqhZK5eWBc8oc=; b=i0yZq9BiegacQBXSrJkg5kcWPLk9AqG+fxJgo9tFROsFivJYmOPjzB2pOm+UeXg/2B diBjAolBANvTImi3XEOhneip1JNHoEiIYB08sRHBTGWnDkNpHCPHd3fEekKUtnlFJwcf md+4ZSsQ7tsMRjkOiIbLDM2iqsK9XhLm+ni61nDzCR+2SQeeSsTbmuXXHWFaD8muwr5Y YJL9EH+swlxRsVXWOx4ntz7bKfMG0tXMwH1RvbK2se+A1A/QLiPOCDmn/r8UN7G8yitW VxrAIRTVCbVuq8KgQshDYsgnOzD0OHncqc39U/eaug1xkr81YESu65Ho/+kkMyXvnchx Ug7Q== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jz18-20020a17090775f200b0078d00203ab4si10915414ejc.691.2022.10.19.04.48.14; Wed, 19 Oct 2022 04:48:42 -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 S230348AbiJSLq5 (ORCPT + 99 others); Wed, 19 Oct 2022 07:46:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230238AbiJSLq2 (ORCPT ); Wed, 19 Oct 2022 07:46:28 -0400 Received: from relay.virtuozzo.com (relay.virtuozzo.com [130.117.225.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78455136401 for ; Wed, 19 Oct 2022 04:25:47 -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 1ol5lc-00B8K8-Jy; Wed, 19 Oct 2022 11:56:31 +0200 From: Alexander Atanasov Cc: kernel@openvz.org, Alexander Atanasov , linux-kernel@vger.kernel.org Subject: [RFC PATCH v5 4/8] mm: Display inflated memory in logs Date: Wed, 19 Oct 2022 12:56:16 +0300 Message-Id: <20221019095620.124909-5-alexander.atanasov@virtuozzo.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221019095620.124909-1-alexander.atanasov@virtuozzo.com> References: <20221019095620.124909-1-alexander.atanasov@virtuozzo.com> MIME-Version: 1.0 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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747116488043649041?= X-GMAIL-MSGID: =?utf-8?q?1747116488043649041?= Add InflatedTotal and InflatedFree to show_mem(...) so it is visible in the logs. Signed-off-by: Alexander Atanasov --- lib/show_mem.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/show_mem.c b/lib/show_mem.c index 0d7585cde2a6..20b5964d498e 100644 --- a/lib/show_mem.c +++ b/lib/show_mem.c @@ -7,6 +7,9 @@ #include #include +#ifdef CONFIG_MEMORY_BALLOON +#include +#endif void __show_mem(unsigned int filter, nodemask_t *nodemask, int max_zone_idx) { @@ -41,4 +44,9 @@ void __show_mem(unsigned int filter, nodemask_t *nodemask, int max_zone_idx) #ifdef CONFIG_MEMORY_FAILURE printk("%lu pages hwpoisoned\n", atomic_long_read(&num_poisoned_pages)); #endif +#ifdef CONFIG_MEMORY_BALLOON + printk("Balloon InflatedTotal:%ldkB InflatedFree:%ldkB\n", + atomic_long_read(&mem_balloon_inflated_total_kb), + atomic_long_read(&mem_balloon_inflated_free_kb)); +#endif }