From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0A0DF2E62D0 for ; Tue, 2 Dec 2025 21:07:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764709668; cv=none; b=ZWaVcPpzSexoLDQkKJtFVliqb+hDpDGMNl+6ouRlOqFBZx4//U1Fm/nZLIEkDn8vxYhbjle8A/XRNJgXvpqhe8cNDGqyYV1HcM7GgpxgV6slPwQBXNrfkEilCXDBSnGPdbEQ4jniD3wsrb+SXH/gFdtYlRTTnyRg6QxrFHOdLWg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764709668; c=relaxed/simple; bh=R7wirYtaBEcs1xFV1lZaS34XeFV0tOTVeKSuu6PoBGo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=tIOYkAV+5NYecFJOPpAOxZWt9y7SPvwWqe+681aJBu7r08Oon5QwvaWh52iFx2Jc4huI+ysxETzqThcY/vLyOCRoS3dxmt110DMFMRTCRBIujAoqBy4J0I6U+5qaNWGWxXTVk9mqSm57wiYpfWm0sD3Jhx5tzVhLhO32cdN78uw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GaEd9RLi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GaEd9RLi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8EE50C19422 for ; Tue, 2 Dec 2025 21:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764709666; bh=R7wirYtaBEcs1xFV1lZaS34XeFV0tOTVeKSuu6PoBGo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=GaEd9RLiH7ri28LVoXr7lFwfUy5aX5mO7Dr3p0XEKDZZZmycMLSXZ+I4QMpxHzVNc 1wKo4PozE1iORedZ7KxZQ7JfHKx9LVOxnxBbTPGflRLyQw5FML4Z+eTxb1LTdAcgOZ r5D1AFCJpe56Tx2WJPNyxi+hWHlPTZ6c6ScvDpykO+BYcAoqu6gQ7WgQBe1lzcuDyv 4YWKpIU2rlYpqJCgQRdMdwNhl/GgXl8vQtSiVaF/56XTxNhKCoT/DUX8TY0nDljpj4 FboOH40BMjfF31dNFKRJnIljlS4LbkKn6Tqq2AjEYxUtw1W1uewz6TV1jhulUnihcy mv+D8BULY7bNQ== Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-787e7aa1631so3838297b3.1 for ; Tue, 02 Dec 2025 13:07:46 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXw6bMtmUKDgqCmeKrcVORLOQHzIXtiguHm2xAML5lz/djIRY3ZtWxV277qnRtXCen1muOskKjBkhq6pV8=@vger.kernel.org X-Gm-Message-State: AOJu0Yzjq93m7eiYMD+SE1+sv2H3vDfg3qdwvTGyJ7/0HXaSGJJ87eAF WkHQNrmKsZdTaX95BCJnZ72OuLBKvECXnJu8j8pptZmzbRUyzJg/jgWvXiRbEsPa6d7B6UqOi1F aypWtTi0ys7d+Wl+lxODtRD6iEU9YABk5jt2OwN7xpg== X-Google-Smtp-Source: AGHT+IHT8JKJd5Gonrvn4OPp//KBo77YDHUmEjWN3NXefgnOgG1SL2jlkHMPwyPwDpPFaiBmno6rFcNYsn+2Qou65b8= X-Received: by 2002:a05:690c:6985:b0:788:fb3:765d with SMTP id 00721157ae682-78bff4e7b1cmr33144547b3.7.1764709665859; Tue, 02 Dec 2025 13:07:45 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20251121-ghost-v1-1-cfc0efcf3855@kernel.org> <20251121114011.GA71307@cmpxchg.org> <20251124172717.GA476776@cmpxchg.org> <20251124193258.GB476776@cmpxchg.org> <20251125213126.GB135004@cmpxchg.org> In-Reply-To: From: Chris Li Date: Wed, 3 Dec 2025 01:07:34 +0400 X-Gmail-Original-Message-ID: X-Gm-Features: AWmQ_bm_Mv5p88JXKLVIUwCIjbiOtpmMhLDdg10n3nA-NT2bQbO4J85vg6YzE5Q Message-ID: Subject: Re: [PATCH RFC] mm: ghost swapfile support for zswap To: Nhat Pham Cc: Johannes Weiner , Andrew Morton , Kairui Song , Kemeng Shi , Baoquan He , Barry Song , Yosry Ahmed , Chengming Zhou , linux-mm@kvack.org, linux-kernel@vger.kernel.org, pratmal@google.com, sweettea@google.com, gthelen@google.com, weixugc@google.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 2, 2025 at 10:19=E2=80=AFPM Nhat Pham wrote= : > > > That indirection is the tradeoff for swapped pages. In turn you're > > getting back all that other stuff for swap slots that *aren't* > > currently used. This is a win for the vast majority of users. > > I will also note though, that we will merge the zswap tree with the > virtual swap descriptors as well. What is the merged per swap slot entry size? If your descritor is over 48 bytes plus some zswap pool handles and compressed buffer size etc I am not sure that is an overall win. Provide actual number helps. > So for zswap entries there are actually no extra overhead induced by > the backend indirection pointer :) > > IOW, overhead for zswap-only users (such as Google) will be much > smaller than what Johannes is describing here - pretty much > non-existent :) While you will still gain all the other benefits (swap The per swap slot memory usage size, zswap+ swap core, is it smaller than the ghost swap file patch I posted here? Do you have a number in bytes? Chris