Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp40573lqe; Tue, 26 Mar 2024 19:44:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmyzKjBy1cG1UagKhIBiw4+aMIfUXQq/84ydjn2ebdj6Q3KqOHdAiDzmzLN70sTDCEOCU2Q9vRnAdN6+7m/jW4c9NbxHOPgmweG0iTrQ== X-Google-Smtp-Source: AGHT+IGFQdCLV7YV/NHvrbeQ6TiXndKvX52zy6qL3Rgh2rPMV4pyq3G3ZGh6J+3iPuqLFWCzTsC+ X-Received: by 2002:a05:6a20:9588:b0:1a3:c9f2:1542 with SMTP id iu8-20020a056a20958800b001a3c9f21542mr1764012pzb.23.1711507472875; Tue, 26 Mar 2024 19:44:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711507472; cv=pass; d=google.com; s=arc-20160816; b=MlBuZTHJiXYTgJrQQfS+ve7RBp7nAoV9DB9Bqq9tRtCXH8nwcgKmC+iaGI5xhd2xeS a35ySV3pbXz9ecRTiYlpD+ChZ1RJhfzM15W85CGeXJ0EgljjbRSIelGaEj3PaR/tmC2G C5cA0hTyvZbmb4tq0BLtqdIOwSRS7kiwbUGhqKFT36YfRFvUAOQPJVqsdh22I8XIV+j4 unMLGhdkP0WDClITCVCbNlNSmkrgaXumplpad46qdLvfd4SdqR3P4l/BWfjesjsqzVwZ 6gUbdyt4dRygdy+v+p6WOSpSWSXBOl4ajiGKeTmm0ALnrWnzSjwgpEVMqXfh49qiwcEc q0Rg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=YV9H8m8+M/zUWvTG1qNucKVLnNsHNqSeiCVsLZ0jiZY=; fh=+6tuBzjp2pMpjT9dj+vXx1AyjiCreJh73RbziTYZDRw=; b=gWlVhZuvznehfIQ27BFFBxxQC7vgHox6lSUepFmte3V2geFHONtaeqtTXgZSCi71+x WzXbvmSq3tpINMeth8Y/Y7bjf/yz6vhK1qk2my1QOUNZ1vdkAYppyvpqd2xdrMsRs5je vxnmdyVMpgqRaDy80UvBHa7FKOlnSUzwDZZA6nPpc2onWEqnDK67UGE53s1o/X2nxo+7 UMIEUYEfYZqRtnd3/D4dckeV7ULLKEdlIFGRMiXYC3u4A1qoPzLXW7nhaWLBs3HFFLTr 1BJ6Yz2P+WgKkgdir0G/gMqoIkVE4kqrfyr/6C8HiYVv+ayKj0Daf6n2hXsC9RCQTbLq f8xw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=cTZ+xcvy; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-120238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t5-20020a170902e84500b001d91df66e39si8665150plg.210.2024.03.26.19.44.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 19:44:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=cTZ+xcvy; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-120238-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B0315B21E14 for ; Wed, 27 Mar 2024 02:44:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BAD2D21104; Wed, 27 Mar 2024 02:44:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="cTZ+xcvy" Received: from out-181.mta0.migadu.com (out-181.mta0.migadu.com [91.218.175.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25E7A171AD for ; Wed, 27 Mar 2024 02:44:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711507462; cv=none; b=Phh49u4IW91zouaz1eYRa+DgmQAKT2NhcFVcNtBhMrIq6SJc4byZ4uWP6byfouPPCwmPRMQBcmBT645qWwTrXg+xsAakMLrizmCvpc2XXe2tFiKzbM4GAqY2Wf0T2/HRt7H6LziMJjsgydaA2vB7MBU4efPXUqGhsqbEx8VREB8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711507462; c=relaxed/simple; bh=/nMN9bGkyVCXT67rKhoWoGALr6/KJ3zxKEc+pwvCYUQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HI/tGs1ORicTuSiQcGb5vMb8qM9dmzTDjXWGeB1GNrnhi5KbeEtFMVJIrcArZEjhDwxEdVLEdLbbSvboDnGOBeA4ZH9Ib16NkFXZxtlBgXXaBHxHr2w2zHrvoDjupSyqpkFcbIpVTfSE8OK8NgFp3w57c31Wm0ncj+SFnktU9CM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=cTZ+xcvy; arc=none smtp.client-ip=91.218.175.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: <3e1eedef-5e4c-448f-95ea-d50b431c4265@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1711507458; h=from:from: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=YV9H8m8+M/zUWvTG1qNucKVLnNsHNqSeiCVsLZ0jiZY=; b=cTZ+xcvyv/fKg+yi81sxZkRCkjFqaUAHzDZ1hrlBPH1XAZ/4IKg97CGVzN6PK+HSGNkiT5 U5eKUmTFF27fJfnrwHSaLXTASqRuwHd/u8yb9JHHJdBJ62RypfYOVkdK8cVNwsUwWdgfKA TBXKcFBErfo+Cz3FokjtYa0q1hfii0c= Date: Wed, 27 Mar 2024 10:44:01 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [RFC PATCH 5/9] mm: zswap: remove zswap_same_filled_pages_enabled Content-Language: en-US To: Yosry Ahmed , Andrew Morton Cc: Johannes Weiner , Nhat Pham , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20240325235018.2028408-1-yosryahmed@google.com> <20240325235018.2028408-6-yosryahmed@google.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Chengming Zhou In-Reply-To: <20240325235018.2028408-6-yosryahmed@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 2024/3/26 07:50, Yosry Ahmed wrote: > 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 LGTM, should we also remove zswap_non_same_filled_pages_enabled? Not sure if it has real usage... Reviewed-by: Chengming Zhou > --- > 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]; >