From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (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 340F9436358 for ; Tue, 16 Jun 2026 11:45:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781610305; cv=none; b=eGS6B9a7iSx/6/nVP4AJZef8fvtbU0X8gVWuq6ONMqf53xVNI6RjWbkrUkfOrtMKtI1TJulm3ERFVaW492MK1FXUzS8OmJ1EUzM6qkcXg2t0XqnPFZWJEujE7HtGsGDrnDfLMIvkRXhmZ6ZHP1iY8aTD8JXRUzMZe4jI7gEjzgU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781610305; c=relaxed/simple; bh=XW/W70UCJPXlo6BQSu3fiF2BX0RKImaQD7G1BvfPpF8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ScXU4N3cfVT5YKoIqE5F/1jTYGEri+G1e8MZ4T3Cd00gLXCSXaa5Ns/0aoFxrbKDwG8Rwj2y1v17PJGeGmqBvx3FxulphnZJrVBRVoqMzO1mbA0D4bgPsP+AM7LCrPInPnvMB8TRmmPudA6myG38/0F/3Pwn5HvToc2rpJ27/Gg= 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=n6JMByQm; arc=none smtp.client-ip=91.218.175.184 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="n6JMByQm" Date: Tue, 16 Jun 2026 04:44:53 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1781610299; 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=NzBAgympJtYUEU+5A/fuaOCbTXFBDK/+39XU8Cb2Gw0=; b=n6JMByQmgnXBs9uYwcuDjqLOej3/SSY5IJg6+zETivRa94jrYvges1yy88DGQpfnU1wfTC JtgEGCDMOXGGdJ2z6k+EbIOVRclJsdyL6GJduFnKXhLtBKGlu/g57kP39Qc+frioDcNjsK /b0ZHxnp2a5BUzcROVXUjY28bc3A0SU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: YoungJun Park Cc: Yosry Ahmed , 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 , chrisl@kernel.org, kasong@tencent.com, baoquan.he@linux.dev, joshua.hahnjy@gmail.com Subject: Re: [swap tier discussion] Re: [PATCH v3 2/4] mm/zswap: Implement proactive writeback Message-ID: References: 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT On Tue, Jun 16, 2026 at 10:03:08AM +0900, YoungJun Park wrote: > On Mon, Jun 15, 2026 at 12:55:09PM -0700, Yosry Ahmed wrote: > > > In that case, the internal logic could stay roughly the same rather > > > than counting via a page counter. Something like: > > > > > > 1. Change the interface shell: tier.*.max — allow only 0 ~ max. > > > > What about a single interface as I suggested to remain consistent with > > memory tiering? > > Hello Yosry! > > I agree. As I was implementing the interface for seeing feasibility > , I reconsidered it. Since swap tiers can be added or removed at runtime, > having static memory."tier_name".max files seems unnatural. > > A single interface like `swap.tiers.max` would be better. We can use a > flat-keyed format (similar to io.weight. same as you suggested) > > echo ["tier_name"] ["0 or max"] > swap.tiers.max > > I am now leaning towards this is a better direction than what I initially > suggested (memory.swap.tiers and memory.swap.tiers.effective). > > Considering other reviews and Shakeel's reply, I will update my swap tier > patch accordingly. I like Yosry's proposal. Let's go with that. (I am travelling, so will be slow to respond)