Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6657815rwl; Thu, 29 Dec 2022 17:37:45 -0800 (PST) X-Google-Smtp-Source: AMrXdXvIkqLlyU65+bZgz8oX57Puv83s57o3kLxzN1xar4CQSuzn7rnmh9/UgxLtbw/GvLXxbiyu X-Received: by 2002:a17:902:d051:b0:192:581b:25d3 with SMTP id l17-20020a170902d05100b00192581b25d3mr25412569pll.17.1672364265349; Thu, 29 Dec 2022 17:37:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672364265; cv=none; d=google.com; s=arc-20160816; b=AE9FBWC+EuW1iAOLAUJ9x9YESSOZ6lsd4ND+VUOIbVxrBvuccckHPgtNKKq24hlaue DyrGmCXwit02HyPnqfdwijKogDbMjk26af7/fKF7ljJo1Y+j/Zk0RxdurIhBTw4hDC5R NBY0pKgt7irBTERQrcvOba8aNqd2jaMzUfLioDeL6fzj0mIuw+RrEyNNjWtaVzGH2UxS D0oS1IcF29Ihwo5fQ1k+B50NwlbDkrEYy7weDKLEBh3UoLIJNYHi15+PACJB5tGrwwxA DVMxn1Bqn8o9qarvXDfBMCC8FmVU7zD13Z/Os/nsSZGwbetwvyVCTWP1mld+Gg5jA8tf Oi9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=XU9FheZT57GPBRP073pAhzfqBkSRwOOpOqW3eL8idB8=; b=ou2cX3hFJqE8+AYdNw8ICTtYdGaon/Sb34FkA1yPU98eu/VCSGic3qw5DUu6vcAv0W 0omzC5mBSM1Yh8wwwJKyTWKN2dLaV+NqLWSkkX/XZcEOo9Mi2ZhdMp3oorZUY/zPG18V 8Q7LdemH7yvOfWrvvtHhoE79WnZvGHHYj42OwGDcYOzdA6N5XMfwp1mSjGjDbrCF8iUc a2XJ3YvZehdN02O0TKVn+Lp/5UGLl4WmTU6Irh8wkbm+ggGE76Zhyav+JxVCG3Lk+MIF mfZPBwITzKhnWMyYOJ1MVRSg1yMEiDE1mLc5heN1duRIqzPSS9yESY7kpQeD69QNoY9V EIGg== 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=NONE sp=NONE dis=NONE) header.from=zte.com.cn Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l16-20020a170903245000b001928d1778f8si8648303pls.251.2022.12.29.17.37.37; Thu, 29 Dec 2022 17:37:45 -0800 (PST) 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=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234234AbiL3BRh (ORCPT + 63 others); Thu, 29 Dec 2022 20:17:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbiL3BRf (ORCPT ); Thu, 29 Dec 2022 20:17:35 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8EA51B1 for ; Thu, 29 Dec 2022 17:17:34 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4NjnRx3gb2z501Qn; Fri, 30 Dec 2022 09:17:33 +0800 (CST) Received: from szxlzmapp04.zte.com.cn ([10.5.231.166]) by mse-fl2.zte.com.cn with SMTP id 2BU1HRq8060335; Fri, 30 Dec 2022 09:17:27 +0800 (+08) (envelope-from yang.yang29@zte.com.cn) Received: from mapi (szxlzmapp01[null]) by mapi (Zmail) with MAPI id mid14; Fri, 30 Dec 2022 09:17:28 +0800 (CST) Date: Fri, 30 Dec 2022 09:17:28 +0800 (CST) X-Zmail-TransId: 2b0363ae3c28ffffffffc3ec2cb7 X-Mailer: Zmail v1.0 Message-ID: <202212300917284911971@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , , Subject: =?UTF-8?B?W1BBVENIIHY1IDUvNl0ga3NtOiBhZGQgemVyb19wYWdlc19zaGFyaW5nIGRvY3VtZW50YXRpb24=?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl2.zte.com.cn 2BU1HRq8060335 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.13.novalocal with ID 63AE3C2D.000 by FangMail milter! X-FangMail-Envelope: 1672363053/4NjnRx3gb2z501Qn/63AE3C2D.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63AE3C2D.000/4NjnRx3gb2z501Qn X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,SORTED_RECIPS, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=no 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 From: xu xin When enabling use_zero_pages, pages_sharing cannot represent how much memory saved indeed. zero_pages_sharing + pages_sharing does. add the description of zero_pages_sharing. Cc: Xiaokai Ran Cc: Yang Yang Cc: Jiang Xuexin Cc: Claudio Imbrenda Cc: David Hildenbrand Signed-off-by: xu xin --- Documentation/admin-guide/mm/ksm.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/admin-guide/mm/ksm.rst b/Documentation/admin-guide/mm/ksm.rst index fb6ba2002a4b..f160f9487a90 100644 --- a/Documentation/admin-guide/mm/ksm.rst +++ b/Documentation/admin-guide/mm/ksm.rst @@ -173,6 +173,13 @@ stable_node_chains the number of KSM pages that hit the ``max_page_sharing`` limit stable_node_dups number of duplicated KSM pages +zero_pages_sharing + how many empty pages are sharing kernel zero page(s) instead of + with each other as it would happen normally. Only effective when + enabling ``use_zero_pages`` knob. + +When enabling ``use_zero_pages``, the sum of ``pages_sharing`` + +``zero_pages_sharing`` represents how much really saved by KSM. A high ratio of ``pages_sharing`` to ``pages_shared`` indicates good sharing, but a high ratio of ``pages_unshared`` to ``pages_sharing`` -- 2.15.2