From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (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 119262DB79C for ; Thu, 23 Jul 2026 14:31:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784817075; cv=none; b=RQXMzdR6c3QYva0ad7N9AmiuBmTOp8B9ZNE0JBZDnKEyM0lXDDyZA15uEFeFbvZT/kRXvAcObhIrjF6gsSzZ5i0ivCCIeftGlbieKtrgLD3loEu0j72GtLC5d4LR8nblRUdPUEUJVcYSg/bmpOoCKtAiH0J4X1yBMzAEBdsz+Ag= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784817075; c=relaxed/simple; bh=GKtdiZX3y0NX17bJQGexbS+5JDeyRbkGDRGXZr48qhc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=g7xJajk3+wUniVzBQAKjtIBaJa9nNndMRwDibyUyDxy6J4YzhCBWS5UdzbqlIlLhDP5Q4gVw1Aq9JNBnUK+DYAxT2rVDyjIkRe6/yDhLe+DzvB53wJ5jqrEgJHuQsP0AiIOpvrVyQz4VGlouZ6VOVZS0oCKe2Wrf4I9tCMa/q9w= 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 header.i=@cmpxchg.org header.b=MFTbYGaX; arc=none smtp.client-ip=209.85.160.175 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b="MFTbYGaX" Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-526f963372aso7006981cf.1 for ; Thu, 23 Jul 2026 07:31:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg.org; s=google; t=1784817072; x=1785421872; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=1zAg+xMWc/xZ3o/AF2/ksssRntRxa3XS2KXW4/UcoJg=; b=MFTbYGaXqAiwmFu5CD7m/aXDYP8ot5f+MAvFwWo1x8RiyXoIvt1bn8TdJOS71357tm TGF5lD36hTjgCZbV4loCP2o6zsPRGYG3ZqOb6+smuERIanB2S5wXl/1Ge+UDNmqux2U5 16sGsUk4KvU7W1BnKC4r4q62otqi3rW/QFNDWVQcNm1BwjyS08wavt409dcQSl5yQQQ3 LkcGQUxvOGmDPDNfxSkVxFwrQxgNmmGc8YAFTEvLSw3hLg1b8SjP/dX8T24emlIh1cN6 MPNDOFW7XcYt2xjcO2m8H0Uv+Ut5rDqxgKf1/Sur1z/B2mHa6E3g88oDZpXlRx7jyUFj KT0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784817072; x=1785421872; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=1zAg+xMWc/xZ3o/AF2/ksssRntRxa3XS2KXW4/UcoJg=; b=GL66+4TJH6UyY0YQcuCCC6kJMO1XreoPXC5xaiYr7fZ/Fe6mMXybPcLXm71nYa0jvt AS2ACYdLLyYXM65ZX+VJmnSMyrvM69AgWnJXwQEzwm/LLG4Lf2rP+ypSwjhjXiodeFGp RdfU4KxWo/pa2FLynGaukEJO6Q7Yy4LNoaWuIu2bbs+gZVJndwbsmWxDhUOUtnSo4kG/ h4qT/jtY/aQpKzFiPotn6/ewn6dYv0NX0JCz1Ud6MUcMQl+2LIAF+j/9NT+RjTgtFUOS DskEta3Et0pxOMGX4giPcD/i8bgxAe7Mj9fA0VrdUmD3l83EWgWoeWi8OOIiHyrTOj3D FixQ== X-Forwarded-Encrypted: i=1; AHgh+Rr7uX3SfrlxYuMQlxXRHmS8K8iLG3G6R+i1cHZXWA4mJodxFJIBaOYVwRs6dxzWcZvcxEdYuIN5Dvewp6M=@vger.kernel.org X-Gm-Message-State: AOJu0YwpLvA4/oFtGEhh2TY2G1INNoDfph4TF1/HEKSMophdcGeUwCg6 wr2RCjQLkp3JUb99WcTvF9ga+YQb13vAhxTF3/L6CkWlCrZYPold+nfP0SekWtmPLlw= X-Gm-Gg: AR+sD13mJwqQfFb5+q5rr/efVxGRK+oEg5ps0uMcBOtkB/1Mje5RyTGG6NrQwvECPTB +AFmUht+5flsVJXAueVznDs1Ff7vrTI8hCODXBBzC+tS1PtOWoWI4kFS3Nd9JJOOaeVSieZNSS0 47V8JbKcm1cK4nNL4fTfNwKdFHOR1Pm2j3lpEa3LgOjUQ9gyMJ+6+qzCy0hn2EyzA7v3LJw/EkM DSrJIpJR8i/QLMIk/TT8a/UCd8ZMiwpTrnPVhBx3YmjjOnA/NB02NZMNOIS19I2cSpfzK6SCTQK 6jZmT7UTRAg+DBj0WNue2NjaCrdSByHTupTRwtbt2yrnjBZ0qow3X2iUjsZAQWlPcWEeUFevWxd tgao2VIkl48t3O7YOWuP+AOUKwCv1ai3nv1T7yjxvreZeXaxxJ12L0z6dBcidI2a7GJgKgIIB1m Se X-Received: by 2002:a05:622a:1196:b0:51a:8c97:938d with SMTP id d75a77b69052e-5283df677edmr29089161cf.68.1784817071384; Thu, 23 Jul 2026 07:31:11 -0700 (PDT) Received: from localhost ([2603:7001:f100:500:365a:60ff:fe62:ff29]) by smtp.gmail.com with ESMTPSA id af79cd13be357-930f6a4f11fsm424226585a.36.2026.07.23.07.31.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2026 07:31:08 -0700 (PDT) Date: Thu, 23 Jul 2026 10:31:04 -0400 From: Johannes Weiner To: Youngjun Park Cc: h@yjaykim-poweredge-t330, akpm@linux-foundation.org, chrisl@kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kasong@tencent.com, mhocko@kernel.org, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, shikemeng@huaweicloud.com, baoquan.he@linux.dev, baohua@kernel.org, yosry@kernel.org, joshua.hahnjy@gmail.com, gunho.lee@lge.com, taejoon.song@lge.com, hyungjun.cho@lge.com, baver.bae@lge.com, her0gyugyu@gmail.com Subject: Re: [PATCH v10 0/6] mm/swap, memcg: Introduce swap tiers for cgroup based swap control Message-ID: References: <20260713025644.170839-1-youngjun.park@lge.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: Hello Youngjun, On Thu, Jul 23, 2026 at 08:39:22PM +0900, Youngjun Park wrote: > On Wed, Jul 22, 2026 at 09:14:10AM -0400, Johannes Weiner wrote: > > Hello Johannes! > > > Zswap is a first-order swap destination with writeback semantics. The > > way the discussion around zswap has been going in this thread is > > disappointing, and I don't feel comfortable adding permanent user > > interfaces on this basis. > > I have given this a lot of thought. First, could you clarify exactly which > part of the discussion or consensus makes you hesitate? Understanding this > will help me re-evaluate my proposal. > > To make sure we are on the same page, I would like to share my thoughts and > vision for the present and future of the tier interface semantics for your > further consideration. > > The interface should provide the swap amount allocated to a tier and allow > the use of the swap device defined by that tier via swap.tiers.max. > Currently, it would only support 0 and 'max' (essentially on/off for > explicit usage). Auto-demotion is planned for the future, and specifying > exact capacity limits is still to be determined. (I have also reviewed > potential interface collisions and duplications based on Yosry's guidance.) This is the part that makes me uncomfortable. The interface as proposed now is just a small subset of what should eventually be "swap tiers" - with limits, hierarchies and demotion rules. It seems to be an unordered blacklist/whitelist for swapfiles right now. And how the final form looks like depends on the indirection layer. As Chris says upthread, virtual swap will be a whole new world. But unfortunately interfaces are permanent. So I'm sorry, but it's premature to start tying us to an ABI direction here. > > We will not be merging a memcg swap tier interface until the swap side > > has a story for indirection and backend migration. > > Regarding this point, is your position that an indirect layer (I see > this is virtualized swap) must be implemented first? It is implemented. There have been patches floating around since the beginning of 2025. Initial proposals date back to 2023. But we need settled consensus before we can start adding interfaces that are supposed to control that very layer long-term.