Message ID | 202302100920429071565@zte.com.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp688981wrn; Thu, 9 Feb 2023 17:43:21 -0800 (PST) X-Google-Smtp-Source: AK7set9JKZ2xAzcifUki3fiXqkOf3lr05H/mVbPCUO6Cf+/0Qj9cnaacJT31CjXGLNpCTWUD8Aoj X-Received: by 2002:a17:902:e84f:b0:198:a845:fbaf with SMTP id t15-20020a170902e84f00b00198a845fbafmr14879118plg.48.1675993401555; Thu, 09 Feb 2023 17:43:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675993401; cv=none; d=google.com; s=arc-20160816; b=ltfrBP3TfXHjjJgFYR1ZapVdMoxj51xkcoIfdpDwDi57e18BjsrDIvxh8IHF+QUiLp 6FtdWaXq22LyEnyAEfe2hUIUBqCD/zkmJLz5/OFyCzV0ggkIQNjQymiQDJAsl+Tv1zuo lNmfuidYkjkKstnF2BeUHWI+KMsQaFH7EkrOIlRTVkIS7/2JuFx7zkJm8/LVcrbMGNu/ GV1OewX3b0n6M/IVO7m2Oe45EvkTQxN1OAdw2TJtdHMgE+F1N4BlDxP9TmcW2hskGoQ5 YpW2hSx5KhNoK6l/cZupFh1A/eQJ+5PoxzwsAqUYcm3fw8iTh5kpdFi4jHOuJYtrmY1c CQfw== 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=VTLPDxYQ7hkYVspNBsa69HmoA6VaTx+T8L6l2GbfJqiR77EOID5rN4J6cP0Jt8zoHc Hu6Y1A+s67XBBEhiWXGwgYqGj2dkLSsZpFHwQlbufZzM4bYXI0x1uRAt6Y0YE3WBW4h8 GLW4SCs6pAJB5kLQD3AWxFkoTXXA7TpJT4CHrPHrYe0RCtDhD/gqgn1+vGYslExSa4q7 4CJbcGKfIYCr0gRn4+FVCSKjxlvJ9tsEPWBrIpY0MrxHvT+fJ2oY3a0FS+BxRf8L+LLX l1Vh9hiYBxW+/aOgXIohAR5pXcxhMSy8zIbCc3nKXhPPu9rcHA9pqsACJZH4Ml0mZiWl Mj9w== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a170902c94200b00188d892999esi3369122pla.521.2023.02.09.17.43.08; Thu, 09 Feb 2023 17:43:21 -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 S230369AbjBJBUv (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 9 Feb 2023 20:20:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229827AbjBJBUu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 9 Feb 2023 20:20:50 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78EC9643F9 for <linux-kernel@vger.kernel.org>; Thu, 9 Feb 2023 17:20:49 -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 4PCbXG5ZPmz501Qh; Fri, 10 Feb 2023 09:20:46 +0800 (CST) Received: from szxlzmapp01.zte.com.cn ([10.5.231.85]) by mse-fl2.zte.com.cn with SMTP id 31A1Kgft025577; Fri, 10 Feb 2023 09:20:42 +0800 (+08) (envelope-from yang.yang29@zte.com.cn) Received: from mapi (szxlzmapp01[null]) by mapi (Zmail) with MAPI id mid14; Fri, 10 Feb 2023 09:20:42 +0800 (CST) Date: Fri, 10 Feb 2023 09:20:42 +0800 (CST) X-Zmail-TransId: 2b0363e59beaffffffffcc54c922 X-Mailer: Zmail v1.0 Message-ID: <202302100920429071565@zte.com.cn> Mime-Version: 1.0 From: <yang.yang29@zte.com.cn> To: <akpm@linux-foundation.org> Cc: <david@redhat.com>, <imbrenda@linux.ibm.com>, <jiang.xuexin@zte.com.cn>, <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>, <ran.xiaokai@zte.com.cn>, <xu.xin.sc@gmail.com>, <xu.xin16@zte.com.cn>, <yang.yang29@zte.com.cn> Subject: =?utf-8?q?=5BPATCH_v6_5/6=5D_ksm=3A_add_zero=5Fpages=5Fsharing_docu?= =?utf-8?q?mentation?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl2.zte.com.cn 31A1Kgft025577 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63E59BEE.002/4PCbXG5ZPmz501Qh 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757406457100754579?= X-GMAIL-MSGID: =?utf-8?q?1757406457100754579?= |
Series |
ksm: support tracking KSM-placed zero-pages
|
|
Commit Message
Yang Yang
Feb. 10, 2023, 1:20 a.m. UTC
From: xu xin <xu.xin16@zte.com.cn> 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 <ran.xiaokai@zte.com.cn> Cc: Yang Yang <yang.yang29@zte.com.cn> Cc: Jiang Xuexin <jiang.xuexin@zte.com.cn> Cc: Claudio Imbrenda <imbrenda@linux.ibm.com> Cc: David Hildenbrand <david@redhat.com> Signed-off-by: xu xin <xu.xin16@zte.com.cn> --- Documentation/admin-guide/mm/ksm.rst | 7 +++++++ 1 file changed, 7 insertions(+)
Comments
On Fri, 10 Feb 2023 09:20:42 +0800 (CST) <yang.yang29@zte.com.cn> wrote: > From: xu xin <xu.xin16@zte.com.cn> > > 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 <ran.xiaokai@zte.com.cn> > Cc: Yang Yang <yang.yang29@zte.com.cn> > Cc: Jiang Xuexin <jiang.xuexin@zte.com.cn> > Cc: Claudio Imbrenda <imbrenda@linux.ibm.com> > Cc: David Hildenbrand <david@redhat.com> > Signed-off-by: xu xin <xu.xin16@zte.com.cn> > --- > 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 how many empty pages are sharing the kernel zero page(s) instead of other user pages as it would happen normally. Only meaningful when ``use_zero_pages`` is enabled. > + 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`` + When ``use_zero_pages`` is enabled, the sum of ``pages_sharing`` + > +``zero_pages_sharing`` represents how much really saved by KSM. ``zero_pages_sharing`` represents the actual number of pages 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``
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``