From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F652C71157 for ; Wed, 18 Jun 2025 19:18:24 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4bMtnC0BWpz3bcj; Thu, 19 Jun 2025 05:18:23 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2001:8b0:10b:1236::1" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1750274302; cv=none; b=knAqAi9/oBGU5VJpNmW7QugiVBQ3VjfDrJ0SwId5Fcgb6u2uv8PY8haus6ru1FJ8qSP3WsGnntwhFVXtSfhwG29OK392B+2AxWRMUzrlMnQ6zMXMdXG16KYvw0jD5JW2rsjrN2afyUUtYZk4yMRB89x3l/QMrQ+a3PTENfhT6KZwr4QnUU4ID4PFMXi4XpS4nZYHq1JluZSfP+B7h22QlF/Xcluh/cvtKftRHJ0BQiRc4kVIiqVNfaV47eQDqdSPlZvMfvgBojDciis+fgOvfOiAQt7JLm4FkO7W0gfjcoos5NmtROVkfTrwB39u1lCTfOSc0DD3U9ihdKjAAsCrfg== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1750274302; c=relaxed/relaxed; bh=8hntqsSm7ttpU2p3v9XMZdIXXcuDbNK0+BZVau+dW3k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Uq7Dwofiu2HbxS4DpZkNYq043LpgDdwSuiK2VffuBQR5JbtsLIS+KSX38Lt6veRK8rMjqSb4zD183jOj0efqOCw3Qs5HQptTWyc4jytK+BXTCyRq/g9HhO8Jf6nnjYhAR7TCMK4/8j80JIu8xxiH8MUPdkIruhOyR20qog73rF5diIQAaOYXxgrZzd7rrAiPbxdYAWBtcwE9UE1RAYqUhaYShFuc/e0hk8XccEdniOyLtK+NbhQM/SINNyxUlBFE2eHqvWF31Jpm5Wt5qfsrEsBdVaqASUmDD5X5VyxpB3UvuecK7B5S8EG3Xl56vOnCZ0eUg4osmQX8GjbyELajXw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=uxWTjN/+; dkim-atps=neutral; spf=none (client-ip=2001:8b0:10b:1236::1; helo=casper.infradead.org; envelope-from=willy@infradead.org; receiver=lists.ozlabs.org) smtp.mailfrom=infradead.org Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=uxWTjN/+; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=infradead.org (client-ip=2001:8b0:10b:1236::1; helo=casper.infradead.org; envelope-from=willy@infradead.org; receiver=lists.ozlabs.org) Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4bMtn82TQwz30TG for ; Thu, 19 Jun 2025 05:18:20 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=8hntqsSm7ttpU2p3v9XMZdIXXcuDbNK0+BZVau+dW3k=; b=uxWTjN/+ZWc+mTjBMRrp/oTsXW rnH540ClGs1DNrTnrTu8s8zdw72fa8ksy2E3fwirF0Tkn52OUhXgWXhaCsyhvWsUVTX55kVNy8YQj MCSW9Rl6c+qNx/WyXrJZCN7CWw+S26o6oF0PH+Xpc42Km6pTCtbsPIhLeO7f2toarX3K6oeojX+HP Wyn/eU55xKr3xiE3iMbBU8LkO4HEak7HXqbLdGOfXrtXYkL/c43HdgXdRHekTOG9H+ihWaRphVSnA H53jr1wk84BYDLQEZRUKbRv6gsckr3u0EDiswDQv3XKSdVhnREeXbczHdYwBqXH6OZgi16c/dTDqd c+X5pPGw==; Received: from willy by casper.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1uRyIO-00000004eRU-0SVD; Wed, 18 Jun 2025 19:18:04 +0000 Date: Wed, 18 Jun 2025 20:18:03 +0100 From: Matthew Wilcox To: Zi Yan Cc: David Hildenbrand , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, virtualization@lists.linux.dev, linux-fsdevel@vger.kernel.org, Andrew Morton , Jonathan Corbet , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Jerrin Shaji George , Arnd Bergmann , Greg Kroah-Hartman , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , Eugenio =?iso-8859-1?Q?P=E9rez?= , Alexander Viro , Christian Brauner , Jan Kara , 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 , Minchan Kim , Sergey Senozhatsky , Brendan Jackman , Johannes Weiner , Jason Gunthorpe , John Hubbard , Peter Xu , Xu Xin , Chengming Zhou , Miaohe Lin , Naoya Horiguchi , Oscar Salvador , Rik van Riel , Harry Yoo , Qi Zheng , Shakeel Butt Subject: Re: [PATCH RFC 08/29] mm/migrate: rename putback_movable_folio() to putback_movable_ops_page() Message-ID: References: <20250618174014.1168640-1-david@redhat.com> <20250618174014.1168640-9-david@redhat.com> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jun 18, 2025 at 03:10:10PM -0400, Zi Yan wrote: > On 18 Jun 2025, at 13:39, David Hildenbrand wrote: > > + /* > > + * TODO: these pages will not be folios in the future. All > > + * folio dependencies will have to be removed. > > + */ > > + struct folio *folio = page_folio(page); > > + > > + VM_WARN_ON_ONCE_PAGE(!PageIsolated(page), page); > > + folio_lock(folio); > > + /* If the page was released by it's owner, there is nothing to do. */ > > + if (PageMovable(page)) > > + page_movable_ops(page)->putback_page(page); > > + ClearPageIsolated(page); > > + folio_unlock(folio); > > + folio_put(folio); > > Why not use page version of lock, unlock, and put? Especially you are > thinking about not using folio for these pages. Just a question, > I am OK with current patch. That would reintroduce unnecessary calls to compound_head().