From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lgeamrelo07.lge.com (lgeamrelo07.lge.com [156.147.51.103]) (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 D49F5379C28 for ; Tue, 16 Jun 2026 01:29:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.147.51.103 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781573351; cv=none; b=csPEsYlf5MZyHWjbV5bMxCj4pkGjtagon8EeqqpjXPpBxeuFXqqEL+bZkLgYIacz6/8fL0FC9qXaN1WyRUWtqwCXyv0//TLOSZz5hNEhtU3HmXdbmAoLvB0LLqTg73hTJk1Yha0YA3bPLJn2IDbR+iu3l3YAl/LzKhNcywfPCI0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781573351; c=relaxed/simple; bh=KiChCwZqxm54uhaQQsZr9QsxUIoKEkOIVvi6nCtazyA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Gfo2sQFv5XmcDuaGaFLDSEXMg5DT6w6Cvl11RNzhyOAego9IF3a2DPIGxSoSMO5pzU6boXlC2bIeukGxJEbyVRU3lWFB8SyS7mRmL4tg4i7WQm9fDtoaWoMzR2+zF5c9iX+KsskeJlA4yqSek2M0MFU2wHrtzk+ziMen/xpqjOM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lge.com; spf=pass smtp.mailfrom=lge.com; arc=none smtp.client-ip=156.147.51.103 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lge.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lge.com Received: from unknown (HELO yjaykim-PowerEdge-T330) (10.177.112.156) by 156.147.51.103 with ESMTP; 16 Jun 2026 10:29:08 +0900 X-Original-SENDERIP: 10.177.112.156 X-Original-MAILFROM: youngjun.park@lge.com Date: Tue, 16 Jun 2026 10:29:07 +0900 From: YoungJun Park To: Yosry Ahmed Cc: Nhat Pham , akpm@linux-foundation.org, chrisl@kernel.org, kasong@tencent.com, hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, shakeel.butt@linux.dev, david@kernel.org, muchun.song@linux.dev, shikemeng@huaweicloud.com, baoquan.he@linux.dev, baohua@kernel.org, chengming.zhou@linux.dev, ljs@kernel.org, liam@infradead.org, vbabka@kernel.org, rppt@kernel.org, surenb@google.com, qi.zheng@linux.dev, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, riel@surriel.com, gourry@gourry.net, haowenchao22@gmail.com, kernel-team@meta.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [RFC PATCH v2 0/7] mm, swap: Virtual Swap Space (Swap Table Edition) Message-ID: References: <20260612193738.2183968-1-nphamcs@gmail.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Jun 15, 2026 at 12:56:26PM -0700, Yosry Ahmed wrote: > On Sun, Jun 14, 2026 at 7:39 PM Nhat Pham wrote: > > > > On Sun, Jun 14, 2026 at 4:20 AM YoungJun Park wrote: > > > > > > ... > > > > * Integration with swap.tier by Youngjun (see [12]). For now, I'm > > > > leaning towards opting out the vswap device from swap.tier entirely, and > > > > treat it as a special device. Integrating it with swap.tiers will > > > > benefit the cases where you want some cgroups to skip vswap for fast > > > > swap devices (pmem), whereas other should go through zswap first. But > > > > most other use cases, either the overhead of vswap will be acceptable > > > > (or not the bottleneck), or we can just disable CONFIG_VSWAP entirely :) > > > > > > > > Youngjun, may I ask for your thoughts on this? > > > > > > Hi Nhat, > > > > > > Tier 1: VSWAP, Tier 2: ZSWAP ... > > > > > > I don't see any problem applying the desired functionality with the > > > currently proposed mechanism and interface. With this, a user would be > > > assigned the default Virtual -> RAM swap tier, and the overall picture > > > becomes one where swap tiers are composed according to the priority > > > setting. > > > > It's more - is there a strong argument to let vswap be a tier (which > > is not supported by just turning of vswap altogether). > > > > Because right now I'm not exposing vswap device to userspace in any > > manner, pretty much. It's abstract and transparent, and minimizes > > complexity (no vswap and swap.tier interaction) and surfaces for > > issues. > > I definitely think vswap should *not* be a tier. First of all, a vswap > entry can be backed by zswap or an actual swap device, which would be > two different tiers. How does that work? > > I also think vswap should not be exposed to userspace in any way, at > least not now. I still think we should aim to just make the > redirection layer always on and eliminate "vswap devices". After following the answers and giving it some thought, I agree that vswap should be kept user-transparent. If there is a strict need to disable it, relying on CONFIG_VSWAP to remove it entirely seems like the right approach. If a strong use case for user interaction emerges in the future, we can revisit the design and figure out how to handle it at that time. Thanks, Youngjun Park