From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta1.migadu.com (out-182.mta1.migadu.com [95.215.58.182]) (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 7062A40801D for ; Thu, 4 Jun 2026 14:01:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780581693; cv=none; b=UKWsyCBYcK0WmMbCvhis4po5IfLRFABdyYFucJkUzvZnVp/47FJfqesyjIwuJYCb7kpSxEjFsSuI8qn+t0xAYKCaDzUXX8sEI0HMBo/PS7+yj2Dxu+2/TX/+2kfYI2RNUA/xyyQw7ob30kNhRbw/9OvMyW1HVAKYNnm7bG7njHw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780581693; c=relaxed/simple; bh=D451ygHIzVM1uZMJR2jBtNVXfXya+bWc233wPuiCby0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X3HDwUL2Z8pyktnS44JmZMI39CF0a9q7yaaADXgrlqE5qegSPFxHCylz/Ffm2ZIDiIecypQpq/uPbqqOCNSPOWxzbGgCT5lKMLMlcYuxd81nycYCFgBesZ6qn77mfNuAoltlTHMYKmDiVp0/Y9r8R0mYHqleCmW+K229ljHBBjU= 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=NEv7KS8Y; arc=none smtp.client-ip=95.215.58.182 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="NEv7KS8Y" Date: Thu, 4 Jun 2026 07:01:22 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1780581689; 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: in-reply-to:in-reply-to:references:references; bh=h+zIBXCKO/oX06loH2iD7dO3/BmxxF4yAbeS+B4E8Lg=; b=NEv7KS8Yk6sEcTFnudCS+03flc8fd1Ov7H+pai87DuvhwhTi+GLWSGYyP6kB5H3T2D6G7n 3WmHH/0OXnVuXJYNQu6HNgP4LQGRDUZcLnvmnFFsNQpPYy9dU9M50WFmf80DzRdIZMflar 4XqR/KLhCaWRwIemjSaxlpQMfRUJLPc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Yosry Ahmed Cc: Hao Jia , Johannes Weiner , mhocko@kernel.org, tj@kernel.org, mkoutny@suse.com, roman.gushchin@linux.dev, Nhat Pham , akpm@linux-foundation.org, chengming.zhou@linux.dev, muchun.song@linux.dev, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Hao Jia Subject: Re: [PATCH v3 2/4] mm/zswap: Implement proactive writeback Message-ID: References: <20260526114601.67041-1-jiahao.kernel@gmail.com> <20260526114601.67041-3-jiahao.kernel@gmail.com> <6deeaea7-3cd1-4403-29fc-d2dc55c297f8@gmail.com> <6db27a22-cc7a-9a94-db3f-c912fd39aa32@gmail.com> Precedence: bulk X-Mailing-List: linux-doc@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: X-Migadu-Flow: FLOW_OUT On Wed, Jun 03, 2026 at 10:36:07PM -0700, Yosry Ahmed wrote: > > >> But doesn't it make more sense to specify the compressed size, which is > > >> ultimately the amount of memory you actually want to reclaim. > > >> > > > > > > I personally prefer compressed size to pre-compressed size. That's > > > kinda what user cares about, no? > > > > > > One thing we can do is let users prescribe a compressed size, but > > > internally, we can multiply that by the average compression ratio. > > > That gives us a guesstimate of how many pages we need to reclaim, and > > > you can follow the rest of your implementation as is (perhaps with > > > short-circuit when we reach the goal with fewer pages reclaimed). > > > > Got it. I will change it to use the compressed size in the next version. > > > > Yosry, Nhat, should we continue using the zswap_writeback_only key to > > trigger proactive writeback? > > I *really* want the memcg maintainers to chime in here, it's > ultimately their call. > > Michal? Johannes? Shakeel? Roman? Anyone? :D Sorry for the delay, I will take a look in a day or two.