Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp435929lqp; Thu, 4 Apr 2024 19:35:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVyyHSLmBt1q3bM4teTLTUwIUf+6vCCp2iP/opZI01IQSys6SdjjVzHtwimpb52zQx1o5pZJNm+7lCkfxMI/yDW/D0pU+Fhb/X2tq3Peg== X-Google-Smtp-Source: AGHT+IFtR23CQnI4CHltMTGDejJKa1cAl5v7RQuj+uIHo+IfbHPQzw74LJp6nu2QrGlD7TN6XrYE X-Received: by 2002:a17:906:b755:b0:a46:ec44:477c with SMTP id fx21-20020a170906b75500b00a46ec44477cmr40987ejb.41.1712284530339; Thu, 04 Apr 2024 19:35:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712284530; cv=pass; d=google.com; s=arc-20160816; b=InvcyArjbDdr53AyFX6egeVkjT9ZEhu0D922FYInzMOjrWktcbub6mMTmp5EyN6MGA u0irVXiMzHjC4JQLGYk59DgRCjXJM4wpv1CBT4gnSXxlM05U7jc+sO4GLPSIHxH3D0pA Z2Mhwlmg9KU7Xp+AjFQCilJPiUk8YbxhJMyXbgXDc1pzJ8eGAnx6FjLcRX/VnRKdkF4s Pd04qfBrrqPoU1vpmi0gDzcBMT9F4n8DetZ8zh/XctMYFxduW7K27QtiMT8Qv6Dp8tr2 g3T5yxe8JkOvd2ZzxGRE1rdolVoRVEs4PAxz1e1yIEPvSZ+RO51gza3gPZQLaNGIgC7C s+PA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qsXw1YjFtBVpFJsnCpS/NSSje6hdsmMH5gSMa3z1yUc=; fh=4HXgfZ5fEBL8Gu8V7h7Y7xjutwx2zHxOoOczxvreuzg=; b=d1yn+Z08pK0jwqHVe5hhlpwmUgLl/Qaqvc2pQZClLonSTKJUzC30aabmC2Um/KV+4S UIbaorVidE0uIWshzkF9Acc93oV7lDKDthTkLZG/c4ki6M1AjL/wN3VrC4o1CdxwNvVG n/yKhOYpQte7I6kRDfKJ1QG9N6UXIZV3NwSIINCXvjqh1Btk7vM0oJ+4KcSI4pbHb5dI LEw8Cb85XHDj8+Ae1XSEzCsB7yHQlXlV18P4iGfDHdlRpfEDY/W+XJIWGKt9Y8Fw5Cbx oGrjky+FhW9CW09Xnfzn7J24YNsdLYd0+2l+7QGb/yqKxVSuZ/hap4IQ0lWQkuJkwBT7 i1Cg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=g2ttrr0Z; arc=pass (i=1 spf=pass spfdomain=cmpxchg.org dkim=pass dkdomain=cmpxchg-org.20230601.gappssmtp.com dmarc=pass fromdomain=cmpxchg.org); spf=pass (google.com: domain of linux-kernel+bounces-132331-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132331-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gs24-20020a170906f19800b00a4e28c4f5d3si233370ejb.888.2024.04.04.19.35.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 19:35:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132331-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=g2ttrr0Z; arc=pass (i=1 spf=pass spfdomain=cmpxchg.org dkim=pass dkdomain=cmpxchg-org.20230601.gappssmtp.com dmarc=pass fromdomain=cmpxchg.org); spf=pass (google.com: domain of linux-kernel+bounces-132331-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132331-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 169481F223FE for ; Fri, 5 Apr 2024 02:35:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD2CC1643D; Fri, 5 Apr 2024 02:35:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b="g2ttrr0Z" Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9765A12B93 for ; Fri, 5 Apr 2024 02:35:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712284522; cv=none; b=P3ZW1iPlLtMz2CTAgoa3rINYy9d4vva2SiWPKHjEPlK3SrtpAHkKkYOKJue1WyCGVEKCGLXCnX1+u++79wNOvI1ZhnovR6uNTOq1Cu2BUfiNA5nt2Xn75nYfQst2+4hmqeGHP8wWd7LwoZvpGRyf/qXeH/HICLNiFGF5xeCr/JU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712284522; c=relaxed/simple; bh=oOJ3pVruGJwxJj72BbZBEj9WSxFnrbaaregTL2WEje0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YYJTaquJViSlsDP0B9efIy1Iwov1b8vb40lVWcv8KELmr6XhvljKPUMOvY8lKbVXcaPc+FTcsRdgsVlFtdpbMajyDQ7La09IAzFupSQww9Zxrp75Q6oBF0sLWvR/IY1HRPynO8/N3KYZuknRQkzd/fNkq4DOy9sXXV0P7CCWG8U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b=g2ttrr0Z; arc=none smtp.client-ip=209.85.222.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-78a2290b48eso91443585a.3 for ; Thu, 04 Apr 2024 19:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20230601.gappssmtp.com; s=20230601; t=1712284519; x=1712889319; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=qsXw1YjFtBVpFJsnCpS/NSSje6hdsmMH5gSMa3z1yUc=; b=g2ttrr0ZwU74bp6l/Gprv0kCmVPqRht/HwjHoQkpZ6pQZTKMI16gbW7eHzy3EZWOqe ArPmOj6eiHQa1g+NpwFmo9qSGf9wk+j69zB1KxF/7Pgot7Wqnyd9gQPnJVgPNtFzPaJS EDTTztohfDiNHqx52CiAoU38eFi44D5BmvERZcQOdUgP77VvZ0RfUOFxfO6WSFqXhjHP e0oPfuJvAUb3FF4A3G5Uwhv2OTIbTt2yMDuUuc61cJBRDPglxYdtYsLdwE5yK+CYND6t zjFGcZSTD4FPp+Qtw3ZeJxwQtraDMJNj1GjfJgdH+wQOS97VWSq2UPmvDzFSINkQIRU0 j99Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712284519; x=1712889319; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qsXw1YjFtBVpFJsnCpS/NSSje6hdsmMH5gSMa3z1yUc=; b=kp8G4+btbmU1eAVzZVuYdxZ55mC6+W5UIU9+ThDXmmG268RyCG7xHsN5bTwmqKXUTR gbNIEQ/hJX6Ld1rspNsEEo71Nql3IoOsTGFS6jkYz5zIlpYbxxSmBy05d8Kz9yjHfN3Y TGllFFI2uuKOEqY1WfHzhAQjow7+gUzeZmLxL1B/sPw4U9fGdCIY/semfffUYGzwjQu3 lppWeuFzaN5DlD3lcMlr4qvcCkwTOtX5EsuHtKsm+vXi5BBaHLe3Q6jhye4c+JLVc0Li KKU5OM0PMmN7t7etlfxLjWOs3mpgtmW/eFpPI+gNpKReREd/XmWp8Miszp6RXwuY7bII WLZQ== X-Forwarded-Encrypted: i=1; AJvYcCWkK2UNZwAaOSgS1bS0oybDXPtAht+p3gDibamjnvHl4qCzen9e0nqfgi45I2WvooJbpw3tv79bhzIBcMgxE7nekU30CIK/EgOZ3+ib X-Gm-Message-State: AOJu0YzKT+vBAyrLbUITPiPOPB+3dt/JOVbJgvdffa6SqxZOnHPt8cGk eBeLtJKJQO8jx4W47YswuYpO3zzlGMi/HCjorWZTVPkeSzYlijJDesXW40CpRVc= X-Received: by 2002:a05:620a:4152:b0:788:267c:8a1f with SMTP id k18-20020a05620a415200b00788267c8a1fmr198433qko.58.1712284519423; Thu, 04 Apr 2024 19:35:19 -0700 (PDT) Received: from localhost (2603-7000-0c01-2716-da5e-d3ff-fee7-26e7.res6.spectrum.com. [2603:7000:c01:2716:da5e:d3ff:fee7:26e7]) by smtp.gmail.com with ESMTPSA id x12-20020ae9f80c000000b0078a35fc488bsm268911qkh.52.2024.04.04.19.35.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 19:35:19 -0700 (PDT) Date: Thu, 4 Apr 2024 22:35:18 -0400 From: Johannes Weiner To: Yosry Ahmed Cc: Andrew Morton , Nhat Pham , Chengming Zhou , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 4/5] mm: zswap: remove same_filled module params Message-ID: <20240405023518.GD641486@cmpxchg.org> References: <20240405013547.1859126-1-yosryahmed@google.com> <20240405013547.1859126-5-yosryahmed@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240405013547.1859126-5-yosryahmed@google.com> On Fri, Apr 05, 2024 at 01:35:46AM +0000, Yosry Ahmed wrote: > These knobs offer more fine-grained control to userspace than needed and > directly expose/influence kernel implementation; remove them. > > For disabling same_filled handling, there is no logical reason to refuse > storing same-filled pages more efficiently and opt for compression. > Scanning pages for patterns may be an argument, but the page contents > will be read into the CPU cache anyway during compression. Also, > removing the same_filled handling code does not move the needle > significantly in terms of performance anyway [1]. > > For disabling non_same_filled handling, it was added when the compressed > pages in zswap were not being properly charged to memcgs, as workloads > could escape the accounting with compression [2]. This is no longer the > case after commit f4840ccfca25 ("zswap: memcg accounting"), and using > zswap without compression does not make much sense. > > [1]https://lore.kernel.org/lkml/CAJD7tkaySFP2hBQw4pnZHJJwe3bMdjJ1t9VC2VJd=khn1_TXvA@mail.gmail.com/ > [2]https://lore.kernel.org/lkml/19d5cdee-2868-41bd-83d5-6da75d72e940@maciej.szmigiero.name/ > > Signed-off-by: Yosry Ahmed Acked-by: Johannes Weiner