From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (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 AD5D3345CBC; Sun, 27 Sep 2026 18:13:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=96.67.55.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790532821; cv=none; b=fZJCBtWMnvQhLmRUB6sUFzmycJ/XwabjeTscrIf4n9RGUoI37A5BoadYEDpWqKHXu36Q54I5ePk2vYb3ES3NmdMdzAPFGs/GpUWLRAAjR913m4KXqe3CYyvFK0PFHLDVcDTT/zG/Dl/Bq2MupX9aaVDXBJZdoV3Xb0yBgnmKuzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790532821; c=relaxed/simple; bh=0P7tqyZTwzBwbJvaiPJZX0pDFmwUCv9lhS7oxqr+H94=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=WOrIGpWqnRt1RMVuMpPI4ACBe44eR7m217Oh1ziR4k9yNZ8COEeGWnkeCb2V7EZzhl1VD6w2jkHwj9L2rR0T3MaugjBnBkeI1PUVKDo4ACR1CMrTsCEyYgItvB4OKhWTAxYd5UgGX0V9dep/FBSipu8fjefTi9JmspRciai36M0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=surriel.com; spf=pass smtp.mailfrom=surriel.com; dkim=pass (2048-bit key) header.d=surriel.com header.i=@surriel.com header.b=PdcFTXwt; arc=none smtp.client-ip=96.67.55.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=surriel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=surriel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=surriel.com header.i=@surriel.com header.b="PdcFTXwt" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=surriel.com ; s=mail; h=MIME-Version:Content-Transfer-Encoding:Content-Type:References: In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID; bh=0P7tqyZTwzBwbJvaiPJZX0pDFmwUCv9lhS7oxqr+H94=; b=PdcFTX wtM8Csj5/XVIZsrFPtA4zd1u+xYyJHfmIQC/uIRk6E0k0jIBe6GvUDGczEER32hmLzbPxNu3jnzgh lET5XamdnQ2iNW1x32dwQKM3W1G419i/YjEy17UQ7/VhUmRlxn3mGUUQu5MrvQM1mJzyo0EewUfFo AvzDic+FDT22YdHnN2iy7rhbE7TeSJ2x0DilMe9DDOSrEEqISYiuje9ZgS8MmXwJ9dWpayLgIP/qb nd17GKQbn2xQVNwLFhmmtPY6L+gUh94Qe654vFjeBreAnefoqaC+8r+2UeLDsYLbBukf/Y016IQHP f1jBwy1IlQVgGqzs+OMu1vr4pBmQ==; Received: from [2601:18c:8100:a0e0:5a47:caff:fe78:8708] by shelob.surriel.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.5) (envelope-from ) id 1xAtMD-00000009nLA-2XiP; Sun, 27 Sep 2026 18:12:13 +0000 Message-ID: <1739d52dcdebdc589826990ef2938b58b1055e18.camel@surriel.com> Subject: Re: Path forward for Virtualized Swap? From: Rik van Riel To: Chris Li Cc: Johannes Weiner , Kairui Song , Nhat Pham , Baoquan He , Shakeel Butt , Kairui Song , Michal Hocko , Roman Gushchin , Yosry Ahmed , David Hildenbrand , Muchun Song , Kemeng Shi , Barry Song , YoungJun Park , Chengming Zhou , "Lorenzo Stoakes (Oracle)" , "Liam R. Howlett" , "Vlastimil Babka (SUSE)" , Mike Rapoport , Suren =?UTF-8?Q?Baghdasaryan=EF=BF=BC?= , Qi Zheng , Axel Rasmussen , Yuanchu Xie , Wei Xu , Gregory Price , Wenchao Hao , Jonathan Corbet , Hugh Dickins , Baolin Wang , Tejun Heo , Michal =?ISO-8859-1?Q?Koutn=FD?= , Shuah Khan , Kunwu Chan , Meta kernel team , Linux Memory Management List , Linux Kernel Mailing List , linux-doc@vger.kernel.org, "open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)" , Andrew Morton , Joshua Hahn Date: Sun, 27 Sep 2026 14:12:13 -0400 In-Reply-To: References: <7ee199ddee81bf8026688def82f78ad9db09be9e.camel@surriel.com> <9499bc084e30df4d10bc069ed26d576e4dd3de80.camel@surriel.com> Autocrypt: addr=riel@surriel.com; prefer-encrypt=mutual; keydata=mQENBFIt3aUBCADCK0LicyCYyMa0E1lodCDUBf6G+6C5UXKG1jEYwQu49cc/gUBTTk33A eo2hjn4JinVaPF3zfZprnKMEGGv4dHvEOCPWiNhlz5RtqH3SKJllq2dpeMS9RqbMvDA36rlJIIo47 Z/nl6IA8MDhSqyqdnTY8z7LnQHqq16jAqwo7Ll9qALXz4yG1ZdSCmo80VPetBZZPw7WMjo+1hByv/ lvdFnLfiQ52tayuuC1r9x2qZ/SYWd2M4p/f5CLmvG9UcnkbYFsKWz8bwOBWKg1PQcaYHLx06sHGdY dIDaeVvkIfMFwAprSo5EFU+aes2VB2ZjugOTbkkW2aPSWTRsBhPHhV6dABEBAAG0HlJpayB2YW4gU mllbCA8cmllbEByZWRoYXQuY29tPokBHwQwAQIACQUCW5LcVgIdIAAKCRDOed6ShMTeg05SB/986o gEgdq4byrtaBQKFg5LWfd8e+h+QzLOg/T8mSS3dJzFXe5JBOfvYg7Bj47xXi9I5sM+I9Lu9+1XVb/ r2rGJrU1DwA09TnmyFtK76bgMF0sBEh1ECILYNQTEIemzNFwOWLZZlEhZFRJsZyX+mtEp/WQIygHV WjwuP69VJw+fPQvLOGn4j8W9QXuvhha7u1QJ7mYx4dLG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w== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.2 (3.60.2-1.fc44) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Sun, 2026-09-27 at 06:17 -1000, Chris Li wrote: > On Sun, Sep 27, 2026 at 2:29=E2=80=AFAM Rik van Riel > wrote: > >=20 > > On Sat, 2026-09-26 at 20:23 -1000, Chris Li wrote: > > >=20 > > > That is the part I am not sure I understand correctly. Fair in > > > what > > > sense? Using the swap file proportional to the memory limit of > > > the > > > cgroup? Do you have an example of perfectly fair swap file usage > > > for > > > a > > > cgroup with an 8G memory limit versus one with a 1G limit? > > >=20 > > > Sorry I am a bit slow grasping what exactly the fair behavior is. > >=20 > > Say we have a 64GB swap file, and several > > cgroups on the system, applications A & B, > > and system.slice. > >=20 > > We might give system.slice a 10GB memory.swap.max, > > and each application a 25GB memory.swap.max. > >=20 > > This way a memory leak in application B > > does not result in application A being > > unable to run. >=20 > Thanks for the explanation. To me, this is just standard > memory.swap.max limit behavior. I was thinking there was some new > concept of the fairness I haven't grasp..Thanks for the=C2=A0 > clarification > anyway. >=20 The only real change we are looking for is that once zswap no longer automatically takes up real swap space, the zswap use is no longer counted under memory.swap.max Only the data written out from zswap to physical swap would count toward memory.swap.max. That way both of the fixed size resources are counted according to their own limits: - memory.swap.max limits physical swap use - memory.max limits anon + file + slab + zswap --=20 All Rights Reversed.