From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796219447; b=bOSaKe+t2sB6Ho4Hs00zqqhfUFy6Es1a6aEP1uHVs0+G4DN76Disxvstbqz4BSNOmXCo Bso49joxr+egAmlR+7reGeZd4alDIs/TxAthuCv+JAf6ey2Brk0zsSlx8xdy/JLTntxgv QtVHgiBaq8VdzIaOjqmg1whd2pl/fW9mqtlE+2ac62LAhmXYWMaExduik4JZ+cf5tRO4p u6F6EQJhzAkdogNIp5ZQVLd3PIuWgTq7f6rKuBIkzsQAF5ZfMy2AiFY7yQGDafllYWheO kKj6BgySnye7Mp3Nsx/pJWPQxN4Jt3ivDQJ7TgfyVsgVtwyADf26TjN4GCO+n/2b1Lg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796219447; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=wS0ARO4sjTTk3vApP12CD0WagxvdHem+mch6+Q05Zpw=; b=d7wS8KZ18sE/6/SyeFgm7nRH037jDdUisgFNTbLcyJEZtJ4EpXqHttrQiMSbYgelGpCA cNYbMAeqSGlwxXE/WXmsFu7hU4YZed73IKffYAc8VnOkacIjXQC6yPnQh4CHxPak2QywV 4xuLLUX5AE4RNlM+6HD041pHxgijpLOXD6tA7RUGg2HIntd4hlMtffnvsnRQQ+gAjc1HO u2PK7q/Xgw/SXPdb5/1PHgnQaOhYKjPtjWeeESDC5YcM4FqVPQXs7Drb/R1LqjJV4URyC TWWF4PaolmXEIbUYr/QDjviDqlhMrhswH9gnfNzNniAcn8fv91D+kkCg2Hy6SoveFBw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=cxZfQKnd; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4DBFD606A31A for ; Wed, 2 Dec 2026 13:50:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=cxZfQKnd Received: by smtp.kernel.org (Postfix) with ESMTPSA id 292921F000C1; Wed, 2 Dec 2026 13:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796219446; bh=wS0ARO4sjTTk3vApP12CD0WagxvdHem+mch6+Q05Zpw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cxZfQKndvcDrNAdbYJ6WO4Vhccv1+lk+qHsscrZDfGs5RR/K+pldq3wbc2/keqA0+ eNJcHUB6YqMU2UB6EwpXr55CGTkWKNBH0OLjSBUQ5I0A+6U6ih9tBGQCdYoJThx1PP XOS/re2IDbf8k+0rPN32jvmdEiHcBJynq4Tp/Xri7Ojs9B0YoO2cQV0XsauVpJCCgl Nnx1Xr5BzDdRnF7UXngW4SSFRK0sERuh9QRSh2KwwdeqgmfgWf2EzMDBmA8SoongV1 d70l4dv3IhrSE08E1JLmWsJ0Rn5fToSXzg8V4D7KQgW3gLcs634SkrqXDWesZxFrPg 17i2JP+gjXxZw== From: "David Hildenbrand (Arm)" To: Andrew Morton , linux-mm@kvack.org, Alexandre Ghiti Cc: David Hildenbrand , linux-kernel@vger.kernel.org, Barry Song , Kairui Song , Chris Li , Nhat Pham , Johannes Weiner , Yosry Ahmed , Chengming Zhou , Baoquan He , Kemeng Shi , Youngjun Park , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko Subject: Re: [PATCH v2] mm: free the swap slot of a dirty swapin folio Date: Wed, 2 Dec 2026 14:50:36 +0100 Message-ID: <179621942315.5069.3046736261127187699.b4-ty@b4> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261127142357.1112193-1-alex@ghiti.fr> References: <20261127142357.1112193-1-alex@ghiti.fr> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Fri, 27 Nov 2026 15:23:27 +0100, Alexandre Ghiti wrote: > do_swap_page() frees the swap cache of an exclusive folio on a write > fault only. But when the folio is already dirty, the copy in its swap > slot is stale: the slot only reserves swap space until the folio is > reclaimed again or its owner exits, and the folio has to be written out > again anyway. > > The common case is zswap: zswap_load() drops its compressed copy and > dirties the folio, so every zswap read fault leaves such a folio behind. > Without zswap, it only happens when reclaim bailed out after adding the > folio to the swap cache but before writing it out, or when the swap > write failed. > > [...] Applied, thanks! tree: mm/core.git branch: core-7.5.misc Applied patches will appear soon in mm-next, followed by linux-next. Please report any outstanding bugs that were missed during review, so we can either drop the patch series or decide how to fix it up. It is encouraged to provide Acked-bys, Reviewed-bys, and Tested-bys even though the patches have already been applied. If possible, patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. Further, this is not a guarantee that the patches will go upstream. If in doubt, please check the listed branch. [1/1] mm: free the swap slot of a dirty swapin folio https://git.kernel.org/mm/core/c/b309c401 -- Cheers, David