Received: by 10.192.165.148 with SMTP id m20csp4309504imm; Tue, 24 Apr 2018 00:02:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx48l5iL9leHQN5A1Xs0JnhHaUNjSnNbiQsBtUxI2jV+flkSkoeOC4/F5OcC28RoyGyAl+xyN X-Received: by 10.98.108.69 with SMTP id h66mr22801670pfc.43.1524553339356; Tue, 24 Apr 2018 00:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524553339; cv=none; d=google.com; s=arc-20160816; b=Ljc3H3vRxS6eyN4bh+XXkMupNYPBhNlFSoXZYe3rK3zSKAqWMAGPYH6jPgBjBVhLfO gDbCRavlXT5DNBbbQfrjaLexnEhaTqLy71kFQpc/XrCL5CcJdsX7HZFdskPzqN/m9kOz ISMRhK3PqNG8FVbMBbMySBqiu1oEg7rm+8TCsA0xLTnI1AmSqlSV/ml6fC0YTRQFufIP 9wWHHt2vtu4JSc9lQhicVoHXRIkB4JG8tVvRjctm1vVuCu6Zfbo35gQ0TaLBTRy502xI cVJQHCQO6GLGFndMe6tn2tBV2nRIfefz2kpQRBE8tP2+NwKnzRQfnnXrjPjtTzPxSz8S A3bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=ALmmfq+uuXpqM0OEeK27O3FxW1TjqVJvrQNNfvPSQ/w=; b=L1GHSgLdIuaScTdpWKqNHgK8G4cTYc/j3+nPSJdcgcd0tlxVNnQRTTjGmaP527n6XY 1xIsqJhJ+jO8h3KG528GE/K6Ht8Wt8UABEANirjQErD6wZ6imIowVNSuY2BPFEG4thKd lFyu5C2JI4P7/0y24bfmf/NUbN6I3jL+zZFc5ysHum3Ih8WCKlriacvq4V5yn+rJsR5c 417Q0MCiq7kyGHnE+ysbolB4GErCZPuIpxsnp8uLViwZgTollC6OQTAI58CgteZfcZ+5 OdthXOgG2d18NqkTuiauTUW+KC46wSy/XdKDeRf81vTAJRqw/Zj98VgKSCHWmuNufOcr uSCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v64si12761812pfb.78.2018.04.24.00.02.04; Tue, 24 Apr 2018 00:02:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756319AbeDXGlO (ORCPT + 99 others); Tue, 24 Apr 2018 02:41:14 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37918 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756102AbeDXGk6 (ORCPT ); Tue, 24 Apr 2018 02:40:58 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3O6ebGD096485 for ; Tue, 24 Apr 2018 02:40:58 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hhxh82tcf-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 24 Apr 2018 02:40:55 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Apr 2018 07:40:45 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 24 Apr 2018 07:40:42 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3O6eg7W60883178; Tue, 24 Apr 2018 06:40:42 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4681011C054; Tue, 24 Apr 2018 07:32:29 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B613511C050; Tue, 24 Apr 2018 07:32:27 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.99]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 24 Apr 2018 07:32:27 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Tue, 24 Apr 2018 09:40:40 +0300 From: Mike Rapoport To: Jonathan Corbet Cc: Andrew Morton , Andrea Arcangeli , linux-doc , linux-mm , lkml , Mike Rapoport Subject: [PATCH 5/7] docs/vm: ksm: update stable_node_chains_prune_millisecs description Date: Tue, 24 Apr 2018 09:40:26 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524552028-7017-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1524552028-7017-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18042406-0040-0000-0000-00000450C4E9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18042406-0041-0000-0000-000020F530B9 Message-Id: <1524552028-7017-6-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-24_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804240067 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make the description of stable_node_chains_prune_millisecs sysfs parameter less implementation aware and add a few words about this parameter in the "Design" section. Signed-off-by: Mike Rapoport --- Documentation/vm/ksm.rst | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Documentation/vm/ksm.rst b/Documentation/vm/ksm.rst index 00961b8..18d7c71 100644 --- a/Documentation/vm/ksm.rst +++ b/Documentation/vm/ksm.rst @@ -150,14 +150,12 @@ max_page_sharing traversals are always schedule friendly themselves. stable_node_chains_prune_millisecs - How frequently to walk the whole list of stable_node "dups" - linked in the stable_node "chains" in order to prune stale - stable_nodes. Smaller milllisecs values will free up the KSM - metadata with lower latency, but they will make ksmd use more - CPU during the scan. This only applies to the stable_node - chains so it's a noop if not a single KSM page hit the - ``max_page_sharing`` yet (there would be no stable_node chains in - such case). + specifies how frequently KSM checks the metadata of the pages + that hit the deduplication limit for stale information. + Smaller milllisecs values will free up the KSM metadata with + lower latency, but they will make ksmd use more CPU during the + scan. It's a noop if not a single KSM page hit the + ``max_page_sharing`` yet. The effectiveness of KSM and MADV_MERGEABLE is shown in ``/sys/kernel/mm/ksm/``: @@ -249,6 +247,11 @@ deduplication factor at the expense of slower worst case for rmap walks for any KSM page which can happen during swapping, compaction, NUMA balancing and page migration. +The whole list of stable_node "dups" linked in the stable_node +"chains" is scanned periodically in order to prune stale stable_nodes. +The frequency of such scans is defined by +``stable_node_chains_prune_millisecs`` sysfs tunable. + Reference --------- .. kernel-doc:: mm/ksm.c -- 2.7.4