From patchwork Fri Feb 23 03:55:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13568552 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 C69B8C48BC4 for ; Fri, 23 Feb 2024 03:56:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A255B6B007D; Thu, 22 Feb 2024 22:56:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9D5D06B007E; Thu, 22 Feb 2024 22:56:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 876156B0080; Thu, 22 Feb 2024 22:56:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 761016B007E for ; Thu, 22 Feb 2024 22:56:09 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4BAC01607BA for ; Fri, 23 Feb 2024 03:56:09 +0000 (UTC) X-FDA: 81821705658.03.E476756 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by imf22.hostedemail.com (Postfix) with ESMTP id 22F21C000C for ; Fri, 23 Feb 2024 03:56:05 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=none; spf=pass (imf22.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708660566; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r8cwVLFqvdLeTMurwDEQ1BCVowOgXAvBjo6T7NBWjcU=; b=OEQfHt5LGSNvLhmnNScACN6KfXKnsw1XQoz5AgTtIR5kCgs51Gb0ike5CDLy74DocEh5Uu LPw5lCvmhCdhfXYq58coFvgymHBOFRGmwUnKDQyOOck5YSsoAWMUoP1CgGGNAZyBHMpcWZ 1Dt5agPLQ4mAiMQaKK9geIFiI7U7qfs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708660566; a=rsa-sha256; cv=none; b=Rnj3pTYQbP96msom0hi1Js/WdvJSB6d4AHNGA30M0b139o0NU004OcDEJ8tUqb1MFo0Rve vAUFA6r+8rkVDOKZ4qLYskQnqwZuBNdOrvZtWUL7C6SjHZWMNH8Wlh0kgn5qNCq97ePA1a U8d6Eujn9fEwoxxVQMPn4zbnyQKLpNI= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; spf=pass (imf22.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Tgx2S18Rwz1gyhf; Fri, 23 Feb 2024 11:53:52 +0800 (CST) Received: from dggpemm100001.china.huawei.com (unknown [7.185.36.93]) by mail.maildlp.com (Postfix) with ESMTPS id 5AC04140155; Fri, 23 Feb 2024 11:56:02 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 23 Feb 2024 11:56:01 +0800 From: Kefeng Wang To: Johannes Weiner , Yosry Ahmed , Nhat Pham , Andrew Morton CC: Chengming Zhou , Huacai Chen , Minchan Kim , Sergey Senozhatsky , , , Kefeng Wang Subject: [PATCH 4/5] mm: zswap: default to lzo-rle instead of lzo Date: Fri, 23 Feb 2024 11:55:47 +0800 Message-ID: <20240223035548.2591882-5-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20240223035548.2591882-1-wangkefeng.wang@huawei.com> References: <20240223035548.2591882-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm100001.china.huawei.com (7.185.36.93) X-Rspamd-Queue-Id: 22F21C000C X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 8in6jsdjq1xgr5n8hafwpps4aj6aod3s X-HE-Tag: 1708660565-8170 X-HE-Meta: U2FsdGVkX19oqC0SUf1n3u6prPk3M64YlOyJHtQxbasghimqYYIO+gSsc0s8QE/JGowtkz6mfRp6Ayit46Lcy0AHa54DsQg/42plHgZNkmuS8WTA9fZFZ+u7MZZmsxHvb4NJ+LPsFfNcwmhnQ0RymzpLaPkWKXk/ms45LX5xSu6avApDv74c6NuGPjHNt6naNu149pXo0P0S9A1bl8DogKAXOPGryNjG5nWDlZ8ajKm1MIDiKA8PWhaCUkgJzlN/m0YTM5q4P/WNM+6RWZPGnOyxpHAOaqA8m6qcjtm4aEw5+kLZb51jXwCTuXYizF0162bF1eF5IKUOqvzPmf2L4WhGv5B0MuJ/j8vjeHoyKBd2jpC2WOacCHG+CTtM8moZEG6tNfVuUQXabSH9H3BS5+hYs5OzbhCiLWuN0oW30KPm1ry8x9gRLMWN1WLgh59EKSFBZM8yObbL/hFUZKUUmpmGEJoJTIzrs6UGjNWkg6TX0MaspVErd4CMKi66vB9PvbKO4YF4TxsecRfA3A4pbGybke6rXV1ruy8KjR8G5KIaDFnmmHfKUrS+ZQrvrmRsr01Hz9PyY4ZjEa6z47JbVuZF4ELAFOnz4uoZcg5/EccmmZlN0XSb/mlh1bMqX7+7ZVkGH8D5O+HAUr8Gs9QItIdtXpo0SlBCz6q6tplYnaprDV9ulmgy3WrBfgCYhWAe8x+T7UiDadCh+/5kAQhAqS6ASmqUXj2UaMMHAI8Lz2SGGNVsiOERd5LYFMbJJFo6dGH8Zw3bf7zvnRNesJTd1WsxY2i/4kTsWHH6aL9uysCMzgmgzt3Vz7rPKS7lvxwjC5+2+vSmqt0TN9eNwOpuels/NFJMXQtoM1DCAiv9ARPgMcIARXs85nMQmgFRNUlP7m54sn1ijetk9OL+G2OF/BcyUaFuqopbZTN+kErmtuoozXnSi4UJXJOtflyHXt9E21asow/Yr70suTL3iow StyiG3Fn 5ZmLEtepOkdBU0UNXwiPD3/oEXOkvJgt96CiqIaCWRN1qe9543riDPdlqQ+qNBLhOUBSx8xdDB81mSoYn9h23j2C3jtrH4JtxLAV/AOyKZJaCgwWRWI5vimycvJf5rYAUI3A3Z0JHVePMBGPtP/pQZR/i6H5yb3nwqRvK9FpYrQ6nzMl8lvc3B6hNVGbzrXLJ4KkWH0K4QGuxKn8= 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: List-Subscribe: List-Unsubscribe: Since lzo-rle performance is better than lzo, see commit ce82f19fd580 ("zram: default to lzo-rle instead of lzo"), converting zswap to use lze-rle too. Signed-off-by: Kefeng Wang --- mm/Kconfig | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mm/Kconfig b/mm/Kconfig index b1448aa81e15..f41a28b74efd 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -62,7 +62,7 @@ config ZSWAP_SHRINKER_DEFAULT_ON choice prompt "Default compressor" depends on ZSWAP - default ZSWAP_COMPRESSOR_DEFAULT_LZO + default ZSWAP_COMPRESSOR_DEFAULT_LZORLE help Selects the default compression algorithm for the compressed cache for swap pages. @@ -72,7 +72,7 @@ choice available at the following LWN page: https://lwn.net/Articles/751795/ - If in doubt, select 'LZO'. + If in doubt, select 'LZO-RLE'. The selection made here can be overridden by using the kernel command line 'zswap.compressor=' option. @@ -83,6 +83,12 @@ config ZSWAP_COMPRESSOR_DEFAULT_DEFLATE help Use the Deflate algorithm as the default compression algorithm. +config ZSWAP_COMPRESSOR_DEFAULT_LZORLE + bool "LZO-RLE" + select CRYPTO_LZO + help + Use the LZO algorithm as the default compression algorithm. + config ZSWAP_COMPRESSOR_DEFAULT_LZO bool "LZO" select CRYPTO_LZO @@ -118,6 +124,7 @@ config ZSWAP_COMPRESSOR_DEFAULT string depends on ZSWAP default "deflate" if ZSWAP_COMPRESSOR_DEFAULT_DEFLATE + default "lzo-rle" if ZSWAP_COMPRESSOR_DEFAULT_LZORLE default "lzo" if ZSWAP_COMPRESSOR_DEFAULT_LZO default "842" if ZSWAP_COMPRESSOR_DEFAULT_842 default "lz4" if ZSWAP_COMPRESSOR_DEFAULT_LZ4