From patchwork Fri Feb 10 21:50:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roesch X-Patchwork-Id: 13136513 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 00FABC05027 for ; Fri, 10 Feb 2023 21:53:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7CA76280020; Fri, 10 Feb 2023 16:53:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 752F028001E; Fri, 10 Feb 2023 16:53:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 641C7280020; Fri, 10 Feb 2023 16:53:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 5131528001E for ; Fri, 10 Feb 2023 16:53:58 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 32145C0516 for ; Fri, 10 Feb 2023 21:53:58 +0000 (UTC) X-FDA: 80452735356.30.97F70C5 Received: from 66-220-144-178.mail-mxout.facebook.com (66-220-144-178.mail-mxout.facebook.com [66.220.144.178]) by imf30.hostedemail.com (Postfix) with ESMTP id 90F008001E for ; Fri, 10 Feb 2023 21:53:56 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=none; dmarc=none; spf=neutral (imf30.hostedemail.com: 66.220.144.178 is neither permitted nor denied by domain of shr@devkernel.io) smtp.mailfrom=shr@devkernel.io ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676066036; 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=IXSxKrUDcAbXS8356/EQMi0aH0JKwDm5Qwr1vy1Hj/w=; b=jKNBF1wKtsavEFpvoglmFgG1iM0A6xwXu9ifmzsC6zWmc/CH9vbzIaIHpZq/UUuPNYQBJz nxlqSN6RhhHLu+SzXfnK+XAVml4MOxNgAOAZFl/rv9cJwyc18AoJrlJ1AwMqXV45EXKWjw EjuFfPaQbous3F+z+J10dlMAJmMNbI4= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; dmarc=none; spf=neutral (imf30.hostedemail.com: 66.220.144.178 is neither permitted nor denied by domain of shr@devkernel.io) smtp.mailfrom=shr@devkernel.io ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676066036; a=rsa-sha256; cv=none; b=1/kQi9EUZ22RFGC+sbNWYUPB/YhWefDrkiiSEaYzfvaH4bXFQjHBG12BolPIvKa2NCsqGm eaRP0vIwthB9daibKj3F15jVVnZfX6+W4DyLRXcJHg7p3AtrnYWA5BfomAFY+z+fYog9Z8 kINHqzSlU5t7EmVWh6Ti+mDyvVWP+ns= Received: by dev0134.prn3.facebook.com (Postfix, from userid 425415) id 88E346BFC2D7; Fri, 10 Feb 2023 13:50:33 -0800 (PST) From: Stefan Roesch To: kernel-team@fb.com Cc: shr@devkernel.io, linux-mm@kvack.org, riel@surriel.com, mhocko@suse.com, david@redhat.com, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, akpm@linux-foundation.org Subject: [RFC PATCH v2 09/19] docs: document general_profit sysfs knob Date: Fri, 10 Feb 2023 13:50:13 -0800 Message-Id: <20230210215023.2740545-10-shr@devkernel.io> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230210215023.2740545-1-shr@devkernel.io> References: <20230210215023.2740545-1-shr@devkernel.io> MIME-Version: 1.0 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 90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Mi jL/XSjZBLzBE7d/6O6j8Hz3Bn9SSzBOH77yXaYViuRc+tLoipuYFPY4spzTZFnsBZmGak5oqXUPTVGaFIoSSgQuuufiZh8RzA2S2TsBb7+bfv6klqHULkjpzy2svoS81LGvW2sowkT/mWnQ+8RCVZXVfETCjMwzTmx2ri7YeA9d/rV07p4hWMa3PJRQ== 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: Document general_progit knob. Signed-off-by: Stefan Roesch Reviewed-by: Bagas Sanjaya --- 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 f160f9487a90..5c4daf44d79d 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