From patchwork Mon Jan 23 17:37:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roesch X-Patchwork-Id: 13112644 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 170B6C05027 for ; Mon, 23 Jan 2023 17:38:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8F2256B0089; Mon, 23 Jan 2023 12:38:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8A3B86B008A; Mon, 23 Jan 2023 12:38:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 76BF86B008C; Mon, 23 Jan 2023 12:38:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 630356B0089 for ; Mon, 23 Jan 2023 12:38:29 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3F9CC161327 for ; Mon, 23 Jan 2023 17:38:29 +0000 (UTC) X-FDA: 80386773138.19.CDB136E Received: from 66-220-144-178.mail-mxout.facebook.com (66-220-144-178.mail-mxout.facebook.com [66.220.144.178]) by imf21.hostedemail.com (Postfix) with ESMTP id 15C6F1C002B for ; Mon, 23 Jan 2023 17:38:26 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=none; spf=neutral (imf21.hostedemail.com: 66.220.144.178 is neither permitted nor denied by domain of shr@devkernel.io) smtp.mailfrom=shr@devkernel.io; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674495507; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CA0SVXvV73URjako0cuzE5C6ugRhDCRksA+GC3YJ0zQ=; b=aNoKarWJ6YmC1uWMKjcbPqJ+zFRNl7E6BEmfPM2foNymSR5rLv5z5rLAdHwC4854BVMnRG FIZH2scnqrrT3suqIOcutNbIwijXRGF+c5HfeqO6rNfoHO0opCPJNWgkeXUC1cdL0+RSlP e+Qi79j4jWcuyXM90ynmu6qAKmq2TVg= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=none; spf=neutral (imf21.hostedemail.com: 66.220.144.178 is neither permitted nor denied by domain of shr@devkernel.io) smtp.mailfrom=shr@devkernel.io; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674495507; a=rsa-sha256; cv=none; b=ycrYRi9B/PI7bv/ncM1OyDVAKoX9A3YsG02MF+V+qr66+Fy4hnDhyqOpk6XfubKeN+qKbx U1W96MYAZrbqsvd2LFads9fngJIjHQtHWUoG6nbGgsB3eG8VoTl0SJO+Yi12PMobChs8MO 9YaCn1T7q77dFxOpUKqFGTrzMETSQ7g= Received: by dev0134.prn3.facebook.com (Postfix, from userid 425415) id 67ABE5616BE5; Mon, 23 Jan 2023 09:37:56 -0800 (PST) From: Stefan Roesch To: linux-mm@kvack.org Cc: shr@devkernel.io, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: [RESEND RFC PATCH v1 10/20] docs: document general_profit sysfs knob Date: Mon, 23 Jan 2023 09:37:38 -0800 Message-Id: <20230123173748.1734238-11-shr@devkernel.io> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230123173748.1734238-1-shr@devkernel.io> References: <20230123173748.1734238-1-shr@devkernel.io> MIME-Version: 1.0 X-Stat-Signature: fh17d4bg9gh5w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0bEMwx fDzY+X6X 0PX4ArLk0BKswvfzo++EAp0VDWgVZgJHBEv5U/OnhWnBR/gcSCNuC0I4XeRtVYhgFYGrq0u7ac3ZtTLbtwoXF7wku1yGthL53iSWuXeJB+3FiBhbXW1pHI/DeFhLEIFEA12zrcnQSgSoXZ3nPeS3k3wH+aMLD1UcaYowjhGhsXL5FWOnUk4fjPFfmHQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This adds documentation for the new /sys/kernel/mm/ksm/general_profit knob. Signed-off-by: Stefan Roesch --- Documentation/ABI/testing/sysfs-kernel-mm-ksm | 8 ++++++++ Documentation/admin-guide/mm/ksm.rst | 2 ++ 2 files changed, 10 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-ksm b/Documentation/ABI/testing/sysfs-kernel-mm-ksm index d244674a9480..7768e90f7a8f 100644 --- a/Documentation/ABI/testing/sysfs-kernel-mm-ksm +++ b/Documentation/ABI/testing/sysfs-kernel-mm-ksm @@ -51,3 +51,11 @@ Description: Control merging pages across different NUMA nodes. When it is set to 0 only pages from the same node are merged, otherwise pages from all nodes can be merged together (default). + +What: /sys/kernel/mm/ksm/general_profit +Date: January 2023 +KernelVersion: 6.1 +Contact: Linux memory management mailing list +Description: Measure how effective KSM is. + general_profit: how effective is KSM. The formula for the + calculation is in Documentation/admin-guide/mm/ksm.rst. diff --git a/Documentation/admin-guide/mm/ksm.rst b/Documentation/admin-guide/mm/ksm.rst index fb6ba2002a4b..72189bf1283e 100644 --- a/Documentation/admin-guide/mm/ksm.rst +++ b/Documentation/admin-guide/mm/ksm.rst @@ -159,6 +159,8 @@ stable_node_chains_prune_millisecs The effectiveness of KSM and MADV_MERGEABLE is shown in ``/sys/kernel/mm/ksm/``: +general_profit + how effective is KSM. The calculation is explained below. pages_shared how many shared pages are being used pages_sharing