From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 1B02D3085DF; Wed, 18 Jun 2025 19:18:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750274298; cv=none; b=iCedYfglCpP+aSXsmt43lI8/CDL65jIKkIF0j9O+tmWsjpKfJp1jGur0zSh3XEP+RhX51JKLi9rMkj3ix+e3KDQriGXG6GHDhAud/Otv1F04v4ht3uo9P+wSU2P5JXlEFpZ8aL6MIlnxhqxNWcTZYBEUIWn3UxCQgs8ip/slBOs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750274298; c=relaxed/simple; bh=8zXPPI7wQtFubFkuPAOZHHOy42oI8d2nYZJfltve1mw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=B8Znc283esgqL+obRQ0wW6eqMzLgkE3wT6bDUKtNjp9l0BZ4vmEzG2ijFe0yuZ2zWzKgHop3u8iOF5isHpY2O3QueUMnTC/IwMMhUNV9x+u13BPpG5gdKdltn4UJMTls7oYpC2HGUtmlV7mR9LyaHTbwJJu01AOeNA7pSJ4TU0o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=uxWTjN/+; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="uxWTjN/+" 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> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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().