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=1796221196; b=yCINg3BysAjE7Bh/yxF5l/91AjftTlM3aS7315IQdJS+yBKgOh8BDscfYAsh9F4YMHsC 7s9O17zytWsD0ECLcFL14KOQD0w6LBuVie7affzso04avm/URXCq9ej0IXHN5ecDy82sd TRBClZOTJpYsCsCNYu+GulGWJkYx9ttxO9/BHJp5ALZSXXTObHuQpLX0cNow2RHUNc6o1 qNQlFwL2wYhBI0JOnDHQQlklVG+EpSE2SqWRc/h9csgmcZSlD9lUIm4xO5ipTRkDRny62 W8ySempXo5/RhhIdJ1mY1oybGT5WLX+HyeaQZFhaUa7YPS+SQb+d8bK5PRJRVv42l/Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796221196; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=2/y8sR9TAovaQdfNoy9yIC7thT6FFRFdt0aOZ4wcYtQ=; b=lJl09A6nOcOF2MkksEoTogyr2l4QQqYAbt7rmJTzVLsKvlri3leWtzOu4ZrzAjOQBzX3 N98GjxXdcIk4x3xguwnO8fpb63qcj2g3OukO8nF8CH5iSiIDMBamWbSeiFVi6UAeEv9qD do2QD7fserM4Rh7XwZ5LDXCoY/Wf2yUoglzqNSVT6DKmn8a6qqa/h0wY7+0S2nDc1CmBr fLxdxX+lY2MTTHt24yOl1UCa84KK4qOeBi48GCm/b5+BYBluQBKn67BHds9SZthiqdVaV J95KVe6MGYWiBE3W7JyGdj9bi4W1eJhtX+AcLGRC5a+puQU/I6iyc3YFnQRDGDtRgPQ== 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=ANzXM5aJ; 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 CC6C7606A330 for ; Wed, 2 Dec 2026 14:19:56 +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=ANzXM5aJ Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2C791F000C1; Wed, 2 Dec 2026 14:19:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796221196; bh=2/y8sR9TAovaQdfNoy9yIC7thT6FFRFdt0aOZ4wcYtQ=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=ANzXM5aJufAx833ZQuqdwVVzsdcUBeNSwzeCw/ztb8H0Z2xAOslSWuZruia6Borcw 0WkGI54cGwnAp1VpZTeEU57l+gFOkRUZoi6eKzGNd8PGCBnfXxIbP8j+jX1tSPyCiR G9riTYKBOBomnI6XDseN0gzVhVDj+4Cgj6ZizQCtDABjTXdStzTzOuBHTIZMVj+jQG kJF9oDVxkW/XqplcUYNoFu85dLVA8Wvx6xsDvHBLwqqSZ46yHPx73NfomQuKJPrNN9 f0l4Bat3+yhD78U1me2gxg3JTxhheHRbhxo/y7BGYiAprADnXSW4mTAdY+C73D/XPQ kZ5eAGzMZZDVw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [RFC PATCH 06/10] mm/migrate: keep folios with private data off the batch copy Reply-To: sashiko-reviews@lists.linux.dev To: "Daniel Byrne" , "Shivank Garg" , "Ravi Jonnalagadda" Cc: "Andrew Morton" , "David Hildenbrand" , "Zi Yan" , "Matthew Brost" , "Joshua Hahn" , "Rakie Kim" , "Byungchul Park" , "Gregory Price" , "Ying Huang" , "Alistair Popple" , "Lorenzo Stoakes" , "Liam R. Howlett" , "Vlastimil Babka" , "Mike Rapoport" , "Suren Baghdasaryan" , "Michal Hocko" , "Karim Manaouil" , "Frank van der Linden" , "Teja Vojjala" , "Pravin Tamkhane" , "Kinsey Ho" , "Wei Xu" , "Matthew Wilcox" , "Davidlohr Bueso" , "Vinod Koul" , "Bharata B Rao" , "SeongJae Park" , "David Rientjes" , "Xuezheng Chu" , "Yiannis Nikolakopoulos" , "Dave Hansen" , "Johannes Weiner" , "John Hubbard" , "Peter Xu" , "Rik van Riel" , "Shakeel Butt" , "Tejun Heo" , "Fan Ni" , "Jonathan Cameron" , "Aneesh Kumar K.V" , "Nathan Lynch" , "Frank Li" , "Dan Williams" , linux-mm@kvack.org, "Mike Day" , dmaengine@vger.kernel.org, "Vinicius Costa Gomes" , "Frank Li" , "Dave Jiang" In-Reply-To: <20261201141259.2124188-7-daniel1.byrne@intel.com> References: <20261201141259.2124188-1-daniel1.byrne@intel.com> <20261201141259.2124188-7-daniel1.byrne@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 14:19:52 +0000 X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] mm/migrate: link failure in folio_can_batch_copy() when !CONFIG_BUFFER_HEAD -- commit e70a8d154bb9f1be5ae698f19221f707a0703f6b Author: Daniel Byrne mm/migrate: keep folios with private data off the batch copy This commit excludes folios with attached private data or non-standard migrate_folio callbacks from the batch-copy migration path. > diff --git a/mm/migrate.c b/mm/migrate.c > index 79970170a53a8..e584c37766189 100644 > --- a/mm/migrate.c > +++ b/mm/migrate.c > @@ -1722,10 +1722,34 @@ static int migrate_hugetlbs(struct list_head *fro= m, new_folio_t get_new_folio, > =20 > static bool folio_can_batch_copy(struct folio *folio) > { > + struct address_space *mapping; > + > /* movable_ops pages have a separate migration path */ > if (unlikely(page_has_movable_ops(&folio->page))) > return false; > =20 > + /* > + * Buffer heads are written through without a folio reference, and > + * __buffer_migrate_folio() keeps such writers out only in the move > + * phase, after a batched copy would already have run. Other users > + * of folio->private have migrate_folio() callbacks with checks of > + * their own that a copy made ahead of them would bypass as well. > + */ > + if (folio_has_attached_private(folio)) > + return false; > + > + mapping =3D folio_mapping(folio); > + if (mapping) { > + const struct address_space_operations *a_ops =3D mapping->a_ops; > + > + if (a_ops->migrate_folio && > + a_ops->migrate_folio !=3D migrate_folio && > + a_ops->migrate_folio !=3D filemap_migrate_folio && > + a_ops->migrate_folio !=3D buffer_migrate_folio && > + a_ops->migrate_folio !=3D buffer_migrate_folio_norefs) > + return false; > + } [Severity: Medium] Does this fail to link when CONFIG_BUFFER_HEAD is disabled and CONFIG_MIGRATION_COPY_OFFLOAD is enabled? include/linux/buffer_head.h declares buffer_migrate_folio() and buffer_migrate_folio_norefs() under #ifdef CONFIG_MIGRATION, while mm/migrate.c defines them only under #ifdef CONFIG_BUFFER_HEAD. Comparing against them unconditionally leaves unresolved symbol references in mm/migrate.o when CONFIG_BUFFER_HEAD=3Dn. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201141259.2124= 188-1-daniel1.byrne@intel.com?part=3D6