Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1279656rwl; Sun, 25 Dec 2022 18:43:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXu/xynUBUi/D2EGYKgQ5yei+ItDpjLe+7lrPZf4u5xX9zv1cmzxMtF8zBiTYUgDKoEHHb9J X-Received: by 2002:a17:906:85d9:b0:842:1627:77b4 with SMTP id i25-20020a17090685d900b00842162777b4mr13200341ejy.3.1672022610545; Sun, 25 Dec 2022 18:43:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672022610; cv=none; d=google.com; s=arc-20160816; b=QhaeUL0VLDkPgcTPJpfX+XM5Rkc3l38QRY1sqaC7mdqeEIk4c9wHWSVNVLAvSS/zCB NC9m+Bw0DFSL81xixkI0KmXkbD1nr2YGb1aAnZhH52GAEvzX/qU/bF9Rbh6HRRYt21ep KONcOyrqV1BwbY9CtYzVB9X2OPyEA8aqISHnSvRtQPBGJssYuiGdLIx4FYLztXB6OFM7 DW92yhsqgwllnNDlMX40+xTr/DpopPlqDTCecyV8W4pY9W0TYjs3zlaWTxadrUF+ZJQ2 sQ8Nu0WJX0T6R2TSiFz7AfyeXjgVgBGL3hhAImVIq7kclywad1k78IdiFuMmAXDf7qnB klgw== 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=E6svkutknGAS+iOiB/rZIenxO+emhYLiEwak5qSiTvPLGoUnDBUZkKvGgb/HeoRACH 3iWN9m+YWA9BMcF1+D3CUkPR950YFxJF6H5fbp3ouiqbExBmF2+99VY9jMSdxkxOP2Tf XRzb6DsmoX9jB4HH//Xg1iYXb5dp3qoxdU9Yn2MHs3Jizx8Y4h6JXY3HHdSPCsffyPp4 juzyzpcrWTByuXTbMEKrJSiiEDJER+qNjPOEobVzdm3Pvs45S58YTMerSiLk1XKvpwLa 9mmzKMrJk6UZA30odxhJF5cIiR3TIdL+nj8lIXhMlLaRmgxRi5boCLl6bkRrIYVtUifh COAQ== 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 wz8-20020a170906fe4800b007aeb99bbb99si7885806ejb.48.2022.12.25.18.43.14; Sun, 25 Dec 2022 18:43:30 -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 S231520AbiLZCHf (ORCPT + 67 others); Sun, 25 Dec 2022 21:07:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbiLZCH3 (ORCPT ); Sun, 25 Dec 2022 21:07:29 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B85F4E63 for ; Sun, 25 Dec 2022 18:07:28 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (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 4NgLlM1bT9z4xyCV; Mon, 26 Dec 2022 10:07:27 +0800 (CST) Received: from szxlzmapp07.zte.com.cn ([10.5.230.251]) by mse-fl1.zte.com.cn with SMTP id 2BQ27BEr057135; Mon, 26 Dec 2022 10:07:11 +0800 (+08) (envelope-from yang.yang29@zte.com.cn) Received: from mapi (szxlzmapp01[null]) by mapi (Zmail) with MAPI id mid14; Mon, 26 Dec 2022 10:07:12 +0800 (CST) Date: Mon, 26 Dec 2022 10:07:12 +0800 (CST) X-Zmail-TransId: 2b0363a901d0ffffffffd587cfe8 X-Mailer: Zmail v1.0 Message-ID: <202212261007128590286@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , , , Subject: =?UTF-8?B?W1BBVENIIHY0IDUvNl0ga3NtOiBhZGQgemVyb19wYWdlc19zaGFyaW5nIGRvY3VtZW50YXRpb24=?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl1.zte.com.cn 2BQ27BEr057135 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.13.novalocal with ID 63A901DF.000 by FangMail milter! X-FangMail-Envelope: 1672020447/4NgLlM1bT9z4xyCV/63A901DF.000/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63A901DF.000/4NgLlM1bT9z4xyCV 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