From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6045C606A32D for ; Fri, 4 Dec 2026 22:09:18 +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=TeL3P8cM Received: by kanga.kvack.org (Postfix) id 3F3576B05B7; Fri, 4 Dec 2026 17:09:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C9AA6B05B8; Fri, 4 Dec 2026 17:09:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2E0EC6B05B9; Fri, 4 Dec 2026 17:09:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 0C2766B05B7 for ; Fri, 4 Dec 2026 17:09:15 -0500 (EST) Received: from smtpin18.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 950C180617 for ; Fri, 4 Dec 2026 22:09:15 +0000 (UTC) X-FDA: 85507692270.18.1EE5FF3 Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by imf27.hostedemail.com (Postfix) with ESMTP id E8BDA40005 for ; Fri, 4 Dec 2026 22:09:13 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=TeL3P8cM; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf27.hostedemail.com: domain of sashiko-bot@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=sashiko-bot@kernel.org ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1796422154; b=aQazWEG9XL7leTUxisOWHVLc3aJKmP0rt9befySYL4jKwso/ewyBTy1zbZpuiEocLUxjMB 8TtgM8lC1HDUDfG64M8oltFqHEbtTOGpqu9Qz67tRrR73tBzOTiqwYEdG3LAyUdem1n7qm navVJKbN36BC3v036UK178+N12QU7rA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1796422154; h=from:from:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=APpfzJqSlJt/KFUW9rHicT0V0EhjkbsCxy814+2nDGo=; b=rLpGiGelRTQPzCvoihEo7+ZdxkUt35pE+Op567dYT6AvbSmZqce+7/oAyX55I51xbAvoMx lt3iI6H650vw6BGJyZvvkphioEGm7GC38x4M/AZyffPK0qqI55BeYJK3CBui8o04fjH+6Y lSPGRO9Nu8e1ggt8USGW1mQNpH1JdDU= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=TeL3P8cM; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf27.hostedemail.com: domain of sashiko-bot@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=sashiko-bot@kernel.org Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id D5E8A43C21; Fri, 4 Dec 2026 22:09:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76A5B1F00936; Fri, 4 Dec 2026 22:09:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796422152; bh=APpfzJqSlJt/KFUW9rHicT0V0EhjkbsCxy814+2nDGo=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=TeL3P8cMREkAvi66h5mUznfe3FrKK+TgiTbdFQTHX8vaL/euJIHKHA/anx7Kk3qUi gO6NqSpcLfRk+JBWqQ3/zSBfHKybOVOzjVrD6kRvDPHNdr514izA9eGd8QI91bZHjq lAK2CXrjPzbZGAyQ0zDJ+sgCGPoSia6q2pzbf+3R8ZA+WjsLdt5owFOZx+7k2gM0hP an1Ta7vaGupFUQuHwwP+cRGnEP0WvkSGPcfKn1oer+ccX7qMda0m6808MFntl2RRyC 7qRj9TJXEDCGeacmz9PxOrLn9rgU9vF/6NTUxZ25fKWzH6fTjsDSCngJuMn0tF8F87 zzhsav6QeuxMQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v7 02/20] mm, swap: prepare the swap IO path for vswap Reply-To: sashiko-reviews@lists.linux.dev To: "Nhat Pham" , linux-mm@kvack.org Cc: "Andrew Morton" , "Chris Li" , "Kairui Song" , "Kemeng Shi" , "Baoquan He" , "Barry Song" , "Youngjun Park" , "Johannes Weiner" , "Yosry Ahmed" , "Chengming Zhou" , "Qi Zheng" , "Shakeel Butt" , "Axel Rasmussen" , "Yuanchu Xie" , "Wei Xu" , "Baolin Wang" , "Michal Hocko" , "David Hildenbrand" , "Liam R. Howlett" , "Vlastimil Babka" , "Mike Rapoport" , "Hugh Dickins" , "Jonathan Corbet" , "Shuah Khan" , "Randy Dunlap" , "Roman Gushchin" , "Muchun Song" , "Arnd Bergmann" , "Karl Mehltretter" , "Dapeng Mi" , "Marco Elver" , "Ethan Nelson-Moore" , =?utf-8?b?Qm9yaXNsYXYgUGV0a292IChBTUQp?= , "Jeff Layton" , "Tejun Heo" , =?utf-8?b?TWljaGFsIEtvdXRuw70=?= In-Reply-To: <20261203220010.1302207-3-nphamcs@gmail.com> References: <20261203220010.1302207-1-nphamcs@gmail.com> <20261203220010.1302207-3-nphamcs@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 22:09:11 +0000 X-Stat-Signature: o55d3qaqbzmjtgn9cen3faensxkb4ofo X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: E8BDA40005 X-HE-Tag: 1796422153-107939 X-HE-Meta: U2FsdGVkX19wgrDETlkQK7c9TdrGJhM9u+EK4T6SUkD9lDSPwymwesOQhOgaqzwyAd73h9Cm5bvQANbWMVBiNEpinBxyPFYBxM2l3z02XqP3tFqNDeY26O/kz6PHgssEhkUQq3sGWReUX4Erg/7+064/ZzoSYJZBmnOX164XAMXVPAlDgGUqxe8dYifOUkIJsW3lUIq+m8gJsLiCM0ZL4ZUuN8ztWDy/QqPn1BYNkTesexQELgu9TlHQimJ8Nry6+36ubSwhnZo4h0cAz9l7tWyg4VWrxe7hghzWuJpYqIuboxfXoQhQXyuI/2jSn7XK11oub+0gjHift6LCjOBXMRm0ZNp65aGiuSiiDk1tq3oQpWpkeo67UxsacZOaiAnqVepTBHfFas/J132VPEBHIQeM4cnJOanxW5aXV36Pox26SAM9K/Hp7hiREYmvqyvLF5W6/zkHZ2gbU7+NmQqbdWfWRd4zUKb1hJ0Orvr0VgwHbI8q7jsCrhWkgsffVBRMq2WcT3Hvjl0qj20Uc8eHOV6YlBkG0lRnMLxcQBMmijRSKq7WP8s6DpE8WN9WvzcX6gIAidAp/Spi4SLBnNja3nZrLa10GL0cXnx+OqBCGzdd4M3gskm+pW+k5ywFtCdRPR9fTDqJtVQ/x3pvhZ0Y4CBoWTDiyf2FKludmZLI4g/TxosgBIxgVjmX/vc6XAklMXrpbGvqlFb9NvZ+QRQ70rAmYJXfNeovKlCxEUZ40Yijlr8MQgJsAUDySKZOsParnSum9JQtJkp6eLDKtNs8Lf9kQBmTax8HOQCa0TfG8yImjfR0dhjW5VsQ353hCJQ97G8ZnjGBxMLTY0NGIUNAChQk7EwmjTuj/X0Yq5xsOQtc8/DPcn8k3gLt8tOKe6ruJ1GfWYDOLaACSywk6vLcmb3/tel2Z+y6EssN6hRKqG1Lc8jUe48NChzJrLNzMay8V9Dbn/5CyUNpXXHVEed LitiCzeT 2b41zTy08QJlQpOw9xjr4m4mOVngbJNX1sMcgW6PB0JLErjpSRWlz78qfhFfcZuIdkCed8fc/vYeYbLH3xctMlmT7XSAxRvbxKn13i4uXNmRvbkG64bRJGQj+gKrjuj5WoFc8BRQMNzz5P4iyK0pGKbAnflQi+TiKvjYFwoS5jCgfAxL0Ahbu4kyAvakjHpJMMPnBmsEsjYQ4zdZ+ZjAbT7uEdjV5EauQp2ZUuk/2XhRZHdsGZNWzt9s3CCOG3V/a8sTruxlVywwrFmqcLfObI/+a3rwqj/InSMfDKKYNhXuKlDsE6qiwo7A9N1rNF+L6F46I+InrfKgJW5zoBrfrFD8RtqAzyf+D5e7vjoOP9lqDJuqJ9VXf60MphF7p8Ptme6quLe6HywbWiO3e5sYUec5ZOo/Ofuff1Ac5Y4ODjbUNsuHykXsCQncJVre9L9oDEPzwK07pfBGQ0QfOnkpHg7wsELRHhIHHUF26zDvisgNuvNFSk9l0Zqa4SChQixNws2/cw88ADttLL2rUgD1sR3WKi1hdkidoIirVjGHh5gbUF1R3YD9k2MUP2yAKOq3nIDy/jKfXypieFFpALQmjOsylVE0CkaVhi6kHYXhk1goEzgxTylsq28B9nG6ZXO4vJ9bSZJnr+kUPmAG9Kk/cNUFrLNQujSSsNO8FDOZGOLNk2DOsPaIt7LxsSW1dWe2Pz1xbkL5kVo6iKAwvycGE1wUrCz08LLRu0xME5vr9dsvmpNPp2UW6ArAdmXBFehUy1d4VBW2XqbnXgwwS9CucQjkqWdWpjLtQ/JgwUQdqdTQq8lYc+QCSr7qvEbE7wEvvqSlKSFf15A7lBE5Ds7nRjkGSew== Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] mm: swap_ops and vswap architecture conflict with swap maintainer direction -- commit 429f81aecb8acc9ffb2ffad6070376dea9df3f7e Author: Nhat Pham mm, swap: prepare the swap IO path for vswap This commit updates the swap I/O submission, batch merging, and completion paths to pass a separate physical swap entry alongside each folio, and adds a nofs flag to struct swap_io_ctx for reclaim. > diff --git a/include/linux/swap_ops.h b/include/linux/swap_ops.h > index d57b95931cd94..61c5abf59a7b5 100644 > --- a/include/linux/swap_ops.h > +++ b/include/linux/swap_ops.h > @@ -12,11 +12,14 @@ struct swap_iocb { > struct bio_vec bvecs[SWAP_CLUSTER_MAX]; > int nr_bvecs; > int len; > + swp_entry_t entry; /* first slot in the batch; addresses the IO */ > + swp_entry_t prev_entry; > }; > =20 > struct swap_io_ctx { > struct swap_iocb *sio; > struct swap_info_struct *sis; > + bool nofs; > =20 > /* > * Pressure window: opened by swap_read_folio() on the first folio > @@ -40,15 +43,15 @@ struct swap_io_ctx { > struct swap_ops { > unsigned int flags; > =20 > - bool (*can_merge)(struct folio *folio, struct folio *prev_folio, > - size_t prev_folio_size, int rw); > + bool (*can_merge)(struct folio *folio, swp_entry_t phys, > + struct swap_iocb *sio, int rw); > void (*submit_write)(struct swap_io_ctx *ctx); > void (*submit_read)(struct swap_io_ctx *ctx); > }; > =20 > void swap_fs_prepare_rw(struct swap_io_ctx *ctx, int rw, struct iov_iter= *iter); > -bool swap_fs_can_merge(struct folio *folio, struct folio *prev_folio, > - size_t prev_folio_size, int rw); > +bool swap_fs_can_merge(struct folio *folio, swp_entry_t phys, > + struct swap_iocb *sio, int rw); > int swap_fs_activate(struct swap_info_struct *sis, const struct swap_ops= *ops); > =20 > #endif /* _MM_SWAP_OPS_H */ [Severity: Medium] As reported by Kairui Song on RFC [1], should virtual swap be routed through a generic VFS-like swap_ops extension layer rather than plumbing a separate physical swp_entry_t around swap_ops? Changing struct swap_ops::can_merge and exported swap_fs_can_merge() to pass phys alongside swap_iocb threads vswap-specific state through mm/page_io.c while vswap_ops stays empty. Landing that non-generic interface first adds extra churn to reach extendable swap_ops later. The series also keeps the two-personality cluster layout (cluster_info and cluster_info_pool), enables zswap without swapon in commit "mm/swap: make vswap mandatory", and bundles vswap plumbing, charging, and metadata changes into one series rather than incremental phases. [1] https://lore.kernel.org/r/ahz_iYG4lqWL4g-J@KASONG-MC4 --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203220010.1302= 207-1-nphamcs@gmail.com?part=3D2