From patchwork Mon Mar 25 23:50:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yosry Ahmed X-Patchwork-Id: 13603186 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 09A85C54E58 for ; Mon, 25 Mar 2024 23:50:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 36FF96B0089; Mon, 25 Mar 2024 19:50:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2F6EB6B0092; Mon, 25 Mar 2024 19:50:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1716E6B0093; Mon, 25 Mar 2024 19:50:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id EFCE26B0089 for ; Mon, 25 Mar 2024 19:50:30 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id C8C49A0A99 for ; Mon, 25 Mar 2024 23:50:30 +0000 (UTC) X-FDA: 81937208220.01.19321BD Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf19.hostedemail.com (Postfix) with ESMTP id 0F1ED1A0003 for ; Mon, 25 Mar 2024 23:50:28 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="PDAk0Ax/"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf19.hostedemail.com: domain of 3xA0CZgoKCB8TJNMT5CH98BJJBG9.7JHGDIPS-HHFQ57F.JMB@flex--yosryahmed.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3xA0CZgoKCB8TJNMT5CH98BJJBG9.7JHGDIPS-HHFQ57F.JMB@flex--yosryahmed.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1711410629; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=6rS+9vqlodSMLG0LOLi3GYviKuQ0ce9GmEUN+BZASUg=; b=FXjVVYlnsER9GnTvluX43ufNmmEWnb/XbuCJWjjEH+Fg+U6kCw6q7mKODPjdbLFryQ9gS+ XvdBOeyjAczq/2VbOR61PcI2gyyUoLpo3jnFcKuqf/PFrAALQ5h/cQ2lXmJxwPVEFXtDJq 79bnabGNJFpA9/w5l8Bh2lIPyPo1d3I= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="PDAk0Ax/"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf19.hostedemail.com: domain of 3xA0CZgoKCB8TJNMT5CH98BJJBG9.7JHGDIPS-HHFQ57F.JMB@flex--yosryahmed.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3xA0CZgoKCB8TJNMT5CH98BJJBG9.7JHGDIPS-HHFQ57F.JMB@flex--yosryahmed.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711410629; a=rsa-sha256; cv=none; b=YyAUic/rr5wcMS7IViXn25Am3WSWAy1raTMYZpr5WKNxTWF8TupqVUZGC3JTOimv3ihmqJ UtmyaA0HTLxYKxYeLU5FlGektQbWoaVjFRevTCh6HOulovpqBRIkkDOu986qlyLaL4aa28 tW7JxqJE1Dlh15gthd78o3l56Sekz9Q= Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dc6b269686aso7529481276.1 for ; Mon, 25 Mar 2024 16:50:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1711410628; x=1712015428; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=6rS+9vqlodSMLG0LOLi3GYviKuQ0ce9GmEUN+BZASUg=; b=PDAk0Ax/obFn0Eji4GCSh2vtwHDZkMbCR0YW7RRUe3gPeqCGJoujJGUfXteVVFrQfK GTP3EqjQKO59CAnCGGeYnI+bdwRqa0eLxv/zpXxaN3Ga7Qk3HnSVLNlNtvWOzdRKhZDe HRHw+0jYwmkjzqaZjlkoqWhVCsEFvsGirxbc7YtLEluFGFg2k4C4KIABP/kCoIVNMxkR zoYLpY4R9CIZwn2eJwc1XJXCU6haMNkNN/uGgCV1lCsy4BZw79rk6EOunbU+QKOH4k8g LXBoiUsqUrJ5dq6jigq1To2X1ejC9FmQt4sz+g/3fg9KXeIx+eDXt9JK4hP52Vz84AhB a/Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711410628; x=1712015428; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6rS+9vqlodSMLG0LOLi3GYviKuQ0ce9GmEUN+BZASUg=; b=JfvRpn5QUHcyTGiq14OMFMpuiF9TE4tPvAmRlQfC44KErw9we/IrBL5epQlCijSUCG xgEvQwzkR6sbJUikc9WBqhdk27hh/3jp3YH/6A1khPr4tGupvoqxYfUoM6xvYgdtlfJF p3puIpcdGv73fp9rPt5JlMtYEJ00Zgjrf49Cp+OWtfDR7GGfuxU66V6GOOEcWLCxSjFS oGmefMcFAlPpsw5z4Dhr3a4eK4zLj366LCQz8hJTioSpJR7JyxGCC6XxJRAmbZ4bWfr4 9RkWE3mfSf9u3H9aHdt7uQRO7QtDZtvRNRi2v4a8GlK3hr5jVRz2mPOYmaNus0KhanGO npZw== X-Forwarded-Encrypted: i=1; AJvYcCXFWa0vv2Bgo8S7mB9bF0TN0kG3zo6zcWNZ+SIFxGweSdvaJnIuBUjyL1orH9jWOcBWcRWSzyEzP3GNFUFBSsYMSBQ= X-Gm-Message-State: AOJu0Yy4qa3xGFN8Py3Y5RWBKxmcChAmD9xQTyhRcjg2WOMu2Vc+Ooxl MNbz0S2WUmm2ZPsSUxMufkXPoBQl8s1mOsgkkumtaPCvyNa8hGsHUQK+cc7fyNQP4Xa9H9AR9m6 7cV6LxwSbnLwuEHzgFQ== X-Google-Smtp-Source: AGHT+IGKv5EFMnzQrdwPt+dy51PJVNwrFBzsXHDzxlAniqnpd5xrXPYCvCMKdfAD9j2nV5K8TiJsS4lrUK/HiNL3 X-Received: from yosry.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:29b4]) (user=yosryahmed job=sendgmr) by 2002:a05:6902:e82:b0:dc6:dfd9:d423 with SMTP id dg2-20020a0569020e8200b00dc6dfd9d423mr371033ybb.3.1711410628291; Mon, 25 Mar 2024 16:50:28 -0700 (PDT) Date: Mon, 25 Mar 2024 23:50:13 +0000 In-Reply-To: <20240325235018.2028408-1-yosryahmed@google.com> Mime-Version: 1.0 References: <20240325235018.2028408-1-yosryahmed@google.com> X-Mailer: git-send-email 2.44.0.396.g6e790dbe36-goog Message-ID: <20240325235018.2028408-6-yosryahmed@google.com> Subject: [RFC PATCH 5/9] mm: zswap: remove zswap_same_filled_pages_enabled From: Yosry Ahmed To: Andrew Morton Cc: Johannes Weiner , Nhat Pham , Chengming Zhou , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yosry Ahmed X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 0F1ED1A0003 X-Stat-Signature: q6z51ct4exmspg1e5f7e6aqy6z6nxo8t X-Rspam-User: X-HE-Tag: 1711410628-81093 X-HE-Meta: U2FsdGVkX19cX4uTTOklzy4uX0JYP8T6GaRbl8i69JPrHSGxs5y2me8DGq/jwbyT5z9fYuoVsjLUca0C3xe2jobkVe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REezKuzA9j72vcASqbrRFDYTt1nKFRu6iF3k1EFkaQ1isnwL+ayX6zOgFNy2PB0DOjqZuTP/4V2dA1LygWu/YM4Q3RCB+LrTwF63kyP+N6Z6szHh/yD2i/RVsKkc7ylcZUdpdIMu82UjybT97W5G9jEbcB6Y2+Ezqm5kko/lyqHaUse5joHGAhiKsYw9HzBR4tqpPAfFCjRXtLWRQFqqO6JuBREfAoCIA9TKS7D+fXkoPS0V0b53foHyg2krkVqMjbMPS1qGWQCF4Lu4MycbX+ddYJa2dg0Iqw1HRys4f2uGUg07twjAROdK3wM5fDE9Wp41pMws1/D9qkhgzFteMMRmNRa89u9qHUA7/EE/ajW0Qk0ekICS2jGt3jlA9lHimoVIe2cmVCl+cx02H7mM+iM+0ye+fI39ofz0b5KAEtf2Ew8y80C6H8sCT5HG6h4Gskb7sTbOpn22KloVyjic/8lAxeXTHe+smXJH2J0lH5C/q3Di1PIRbUqwgzz4mbi0ABcbDD9trVo6g== 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: There is no logical reason to refuse storing same-filled pages more efficiently and opt for compression. Remove the userspace knob. Signed-off-by: Yosry Ahmed Reviewed-by: Nhat Pham Reviewed-by: Chengming Zhou Acked-by: Johannes Weiner --- mm/zswap.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/mm/zswap.c b/mm/zswap.c index 498a6c5839bef..0fc27ae950c74 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -123,14 +123,6 @@ static unsigned int zswap_accept_thr_percent = 90; /* of max pool size */ module_param_named(accept_threshold_percent, zswap_accept_thr_percent, uint, 0644); -/* - * Enable/disable handling same-value filled pages (enabled by default). - * If disabled every page is considered non-same-value filled. - */ -static bool zswap_same_filled_pages_enabled = true; -module_param_named(same_filled_pages_enabled, zswap_same_filled_pages_enabled, - bool, 0644); - /* Enable/disable handling non-same-value filled pages (enabled by default) */ static bool zswap_non_same_filled_pages_enabled = true; module_param_named(non_same_filled_pages_enabled, zswap_non_same_filled_pages_enabled, @@ -1392,9 +1384,6 @@ static bool zswap_is_folio_same_filled(struct folio *folio, unsigned long *value unsigned int pos, last_pos = PAGE_SIZE / sizeof(*page) - 1; bool ret; - if (!zswap_same_filled_pages_enabled) - return false; - page = kmap_local_folio(folio, 0); val = page[0];