Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4120303rwd; Tue, 23 May 2023 03:30:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ40sBGi4Q9yRIRyABW6GIQHJoF68lfSdRwSJt0RR4ysULyzn/95THnemVUX1Csxecmzevqj X-Received: by 2002:a05:6a21:789a:b0:105:8e4d:d726 with SMTP id bf26-20020a056a21789a00b001058e4dd726mr15989975pzc.27.1684837857791; Tue, 23 May 2023 03:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684837857; cv=none; d=google.com; s=arc-20160816; b=Wk2OPHEmPzFVvA0F1rFkeTL5Ok5HE9Z6kQvkJVD5FwBirMbd3RduQm7wVvLMAuUhZh So8l4jRDNeU5lWiuZIBXCKJHCc7Z8d18bAiW5zaiEdV4hE3ILa0OubJkFSuLTT9RkR5K QMrRVqakhYMvsHowwPM8gD83unzKEUD74lbT9of/ZHI+7L/GZt9KQE/u8hDku/LFnz+A cjDs5R/+cqVOb7nerO0vy6lb7TobCvMyT161r3xHC7zYv4iLG6+ha0wxK0PGYoVmnndU 3HBR97sgypMSpaISG2wuK+JPI5ADBrbSfHLo310+UgyWw/6GYcoP1K4iBO623QO7BJjl BaZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=LycqLutbVGXtzw5AEhsRYxd5JCdHFjpO4IqicwMpPiE=; b=jVTEvEkMcWjybjXGJx4T6338fro/ICs/4Tpm98cvg6tf2mjm6YHtgsIhLEsGPFhcrH CF4+s+7mDnX9NlpcVPf3NbWumOMA5dxJFq3pLt9pbhIF0djVcY0ULfBDu2Pw4Mg0Jcqw LdiyrQ9a+nCBePYBfLMU4e0+lrEL+4ixIjT4aHhDAcxu+mf9r9Z4ycq40Dse3S2Zsafd 1t1FtKWKIK2uo4Wep9MooxNptp9N0xX3CJAL7v99+tLmUWyp72dyvBULwgBATeLt5bim 98GaB2P6vU+YGJ9jkxinyZizf9HiWOFnvUqhx3if2PTswH6tdjw76tP+CqH53Fsb7rf2 OSKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z5XnGdjq; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l5-20020a637005000000b005360d7da56asi6186518pgc.590.2023.05.23.03.30.43; Tue, 23 May 2023 03:30:57 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z5XnGdjq; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235850AbjEWJ7Y (ORCPT + 99 others); Tue, 23 May 2023 05:59:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236217AbjEWJ7O (ORCPT ); Tue, 23 May 2023 05:59:14 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4B05132 for ; Tue, 23 May 2023 02:58:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684835910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LycqLutbVGXtzw5AEhsRYxd5JCdHFjpO4IqicwMpPiE=; b=Z5XnGdjqNWvnJMjb4gkjIfIU3kGgV2VWCcVlsPLikh71Jwd1F6x3H1Bq0xV3u9tsCmoYrY WOgCvFdsj0U7znbF1F/b7uwy8PsnQJFAwcZl6H329z4T0NrkMo6vThNtsyMAGhRNVG+Epm TIFk8pZG0vEMADosxWfLeNWpt1RiZac= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-446-3j4cdOzfMUCuLPnIrmfvFA-1; Tue, 23 May 2023 05:58:28 -0400 X-MC-Unique: 3j4cdOzfMUCuLPnIrmfvFA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3f604687a23so8766565e9.1 for ; Tue, 23 May 2023 02:58:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684835907; x=1687427907; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LycqLutbVGXtzw5AEhsRYxd5JCdHFjpO4IqicwMpPiE=; b=kZahl/sfsBOgB8IXeQp1n8E4Xu+cH140ioAm/EOf8VBni5jSDPwlZkdp+qrCYC4hyn jkNiI0e5Q1k+HQKzSGDsAE51prvOj/4DbvUO9IPMwvG2jypdgm5LT5bUHAEjm3ohFXva b0UuaW5/ZkD43Bx1hOZiJguynF3P421ZL0dCqwy32oTTxrzDfx+Pux61AIK1MhR4UslK HoqBOfsFN4f6UYCuvNF3DRCi5kZ20oeBRouPi4gzt33cwg9u9nlEY7Hmt1Wu1lFjoCTA KU+VyD3lQKQCiEsoqe+Ol0E7PPgOXmYCtDUaQ4xmniTcW/Ymeykfb8NOe63Ep5mfebov b6BQ== X-Gm-Message-State: AC+VfDzbukMPTjbUB2hCfOS/GAK9OUwQySGRlcfXLU35yo3hva5JlvFe KKL5aR240CV2rU3m/O/gtIM8qLikPyRKUKZpDfXuhN0V+p+UBTrd9GS5ncdMt5O9fLt8SmTrC5o ktK0Ie0Qtvp1GlUpeAYzliXx9 X-Received: by 2002:a7b:cd0c:0:b0:3f6:7e6:44ea with SMTP id f12-20020a7bcd0c000000b003f607e644eamr2709755wmj.18.1684835907591; Tue, 23 May 2023 02:58:27 -0700 (PDT) X-Received: by 2002:a7b:cd0c:0:b0:3f6:7e6:44ea with SMTP id f12-20020a7bcd0c000000b003f607e644eamr2709740wmj.18.1684835907260; Tue, 23 May 2023 02:58:27 -0700 (PDT) Received: from ?IPV6:2003:cb:c74c:b400:5c8b:a0b2:f57e:e1cd? (p200300cbc74cb4005c8ba0b2f57ee1cd.dip0.t-ipconnect.de. [2003:cb:c74c:b400:5c8b:a0b2:f57e:e1cd]) by smtp.gmail.com with ESMTPSA id y21-20020a1c4b15000000b003f60119ee08sm8876670wma.43.2023.05.23.02.58.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 May 2023 02:58:26 -0700 (PDT) Message-ID: Date: Tue, 23 May 2023 11:58:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v8 4/6] ksm: add documentation for ksm zero pages Content-Language: en-US To: Yang Yang , akpm@linux-foundation.org Cc: 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 References: <202305221842587200002@zte.com.cn> <20230522105335.4176-1-yang.yang29@zte.com.cn> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20230522105335.4176-1-yang.yang29@zte.com.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 On 22.05.23 12:53, Yang Yang wrote: > From: xu xin > > Add the description of ksm_zero_pages. > > When use_zero_pages is enabled, pages_sharing cannot represent how > much memory saved actually by KSM, but the sum of ksm_zero_pages + > pages_sharing does. > > Signed-off-by: xu xin > Cc: Xiaokai Ran > Cc: Yang Yang > Cc: Jiang Xuexin > Cc: Claudio Imbrenda > Cc: David Hildenbrand > --- > Documentation/admin-guide/mm/ksm.rst | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Documentation/admin-guide/mm/ksm.rst b/Documentation/admin-guide/mm/ksm.rst > index 7626392fe82c..019dc40a0d3c 100644 > --- a/Documentation/admin-guide/mm/ksm.rst > +++ b/Documentation/admin-guide/mm/ksm.rst > @@ -173,6 +173,14 @@ stable_node_chains > the number of KSM pages that hit the ``max_page_sharing`` limit > stable_node_dups > number of duplicated KSM pages > +ksm_zero_pages > + 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/was enabled. "empty pages" is misleading. You can probably drop the last comment, because you repeat that afterwards. how many zero pages that are still mapped into processes were mapped by KSM when deduplicating. I suggest squashing this patch into #3. -- Thanks, David / dhildenb