Message ID | 20220803100306.1653382-1-xu.xin16@zte.con.cn (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 8143BC19F28 for <linux-mm@archiver.kernel.org>; Wed, 3 Aug 2022 10:03:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1AAEE8E0001; Wed, 3 Aug 2022 06:03:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 15B796B0072; Wed, 3 Aug 2022 06:03:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 022278E0001; Wed, 3 Aug 2022 06:03:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id E35686B0071 for <linux-mm@kvack.org>; Wed, 3 Aug 2022 06:03:28 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id B4848A1CBB for <linux-mm@kvack.org>; Wed, 3 Aug 2022 10:03:28 +0000 (UTC) X-FDA: 79757844096.13.026BD70 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by imf13.hostedemail.com (Postfix) with ESMTP id 0C32620135 for <linux-mm@kvack.org>; Wed, 3 Aug 2022 10:03:27 +0000 (UTC) Received: by mail-pl1-f181.google.com with SMTP id m2so9178623pls.4 for <linux-mm@kvack.org>; Wed, 03 Aug 2022 03:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=cvAbQZ7UDpN6nHSUbSq141kAF5t3sXiSGCHIO0EWxys=; b=CPjTb9GrTf6Xxic2TqGthS1qTHHqntDZ37mKAJIkBLY5FA0EA6qoBJLkjG0egHCN03 yH2gt43WBVDNRx0oeB6c2S3Ti2jHrFcB7YsYH1h1kAYYY/EqZw5cSh3+sT88hUS1EBLS vmlzUPfijSJ6qVxuqSdRrsU1hW4kFrcJNcPiLiJ0PDk9rVkmQtdoWghG2mClVWjMOvNz G58/rKkhMBx0D2aCNgqPDNnz7p/3poCQVKiA6HTDuYU3jik0cVfrmbQVuEMSJYl0isY6 rVmusnIKyfTJ7jaOMIaCpkoTx176xcW7OdDUUgm8WtVa1maSXz8PB3qo57wX4iRN6n7n daFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=cvAbQZ7UDpN6nHSUbSq141kAF5t3sXiSGCHIO0EWxys=; b=eD7u0CF+Upxehbft7WJEzwZ45MvE/q87UBYOxQPLdG0tLW4a+xYdapgwQWn6PGgKi8 vTyUprbH5WKEeytaNTYNPRuZGylLBfNEMP/ZwdskUpoSmrwy0KvOhpxkQhIoWfDZA01g aHbi3jRPgLpPEy0uyINUwbfxxe5evhiTOx8Nfwfk9iwhY7cPYmYkXG1R20uDZ9dLmg57 05EFNWtuYW4nOzZss4gqqkgm7lXBpWpFsCezvFiR9frowDdBbOzX/0hXSWoo7M43ZiBy m3/ySnXD+Omek/aWd0fhA0sHE6o96PoyCJjEOLPelbmXFQVf1Idmf+iChxc2RCca+g/X UjgA== X-Gm-Message-State: ACgBeo0NxykY6RZOsNTqrQPfKnlkSNsqZxxgOFEcBonXiRCEIjISE18u Iy919eieTWPLtm9UTASP44M= X-Google-Smtp-Source: AA6agR6tCK2KRyOG1o40zhBecpXlbVFufMUl6A0DK/XqhDiWPLOaX65ZJGjYrEobuILR+V+A6mwCzQ== X-Received: by 2002:a17:902:d50f:b0:16e:ecdd:98b8 with SMTP id b15-20020a170902d50f00b0016eecdd98b8mr13443805plg.22.1659521006830; Wed, 03 Aug 2022 03:03:26 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id h7-20020a170902f7c700b0016f0939080asm1438111plw.249.2022.08.03.03.03.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Aug 2022 03:03:26 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: xu.xin16@zte.con.cn To: akpm@linux-foundation.org Cc: hughd@google.com, izik.eidus@ravellosystems.com, willy@infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, xu xin <xu.xin16@zte.com.cn> Subject: [RFC PATCH 0/4] propose a auto-run mode for ksm Date: Wed, 3 Aug 2022 10:03:06 +0000 Message-Id: <20220803100306.1653382-1-xu.xin16@zte.con.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1659521008; 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:references:dkim-signature; bh=cvAbQZ7UDpN6nHSUbSq141kAF5t3sXiSGCHIO0EWxys=; b=kXFbX+DDV2BA7/yaIB+ZzBkdmwAZ/+pLDMlTF87eF+DVOmuGE4Ggxb+sdO6duF1XUgWCZx URCEwh14BTBbvhH9/PGe78MSF8BSpvec7TqfBWEDRGVxUom//jwdlgQzIxQKy59Wc/LlYt RT9/arwjzBg9ZKXC4yOfE5BDJH6VJWg= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=CPjTb9Gr; spf=pass (imf13.hostedemail.com: domain of cgel.zte@gmail.com designates 209.85.214.181 as permitted sender) smtp.mailfrom=cgel.zte@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1659521008; a=rsa-sha256; cv=none; b=BeDomH8RuY0UuwdeWUly8W5wy+03bNs7oqTnBSMW4a12oOPaL9Sc4cUElT0swl/QfSM96G s+Pp4C7a3qsK51YHBWrZ4sp/fYey3KinUU/3KiQzZ2p5rwGsLzZ/yC56JH1HDT+9NrzOTF Z0t3xFffZlqP+jIv7O3p8Nyf+fFFNdc= X-Rspam-User: X-Stat-Signature: dxj7m1kbdsrt56hhec8jnsf7fw8hyexw X-Rspamd-Queue-Id: 0C32620135 Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=CPjTb9Gr; spf=pass (imf13.hostedemail.com: domain of cgel.zte@gmail.com designates 209.85.214.181 as permitted sender) smtp.mailfrom=cgel.zte@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam08 X-HE-Tag: 1659521007-679708 X-Bogosity: Ham, tests=bogofilter, spamicity=0.007897, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series | propose a auto-run mode for ksm | expand |
From: xu xin <xu.xin16@zte.com.cn> The following patch series bring a NEW running state "auto mode". In traditional KSM, whether ksmd works scanning and merging or not depends on the sysfs klob ksm_run. Most of time, letting ksmd run is not very much needed, for example, when memory is sufficient, because it increases the delays of COW for user applications and also consume some cpu resource. Besides, the fixed pages_to_scan is not always good. When there are a lot of same pages, the default pages_to_scan makes ksmd so slow to merge them. The four patches try to optimize the above two points with a auto mode. It's a lightweight optimization to KSM. xu xin (4): ksm: propose a auto-run mode of ksm ksm: implement scan-enhanced algorithm of auto mode ksm: let ksmd work automatically with memory threshold ksm: show ksmd status of auto mode mm/ksm.c | 212 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 206 insertions(+), 6 deletions(-)