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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6130BC7EE39 for ; Sun, 29 Jun 2025 11:29:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4213A6B0088; Sun, 29 Jun 2025 07:29:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D24F6B0089; Sun, 29 Jun 2025 07:29:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 299BE6B008A; Sun, 29 Jun 2025 07:29:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 0DABD6B0088 for ; Sun, 29 Jun 2025 07:29:15 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 643B612092E for ; Sun, 29 Jun 2025 11:29:14 +0000 (UTC) X-FDA: 83608217028.23.46300EA Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) by imf15.hostedemail.com (Postfix) with ESMTP id E4403A0005 for ; Sun, 29 Jun 2025 11:29:11 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b=RrghhCCJ; spf=pass (imf15.hostedemail.com: domain of ying.huang@linux.alibaba.com designates 115.124.30.100 as permitted sender) smtp.mailfrom=ying.huang@linux.alibaba.com; dmarc=pass (policy=none) header.from=linux.alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1751196552; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Td91IaRHPLMg0S4S34rjLSxSTe+KTe00bq2/ozJgwkc=; b=eSHWACxnkPK4PeBBa5CVitAYWUXUyHj0yaetQpcSsJirqhK6xQMn+2Wnoog9GMs4EWNx9R 4lqjpJwIhbe8zlDqOhDP783W+oHjt+XJdCGhCu3Uh3YSOsUru2MZI0w6QG98IZWY1YBDTm wNL/iQkAgnxrVD77RQTOOEJL7KRIc2c= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1751196553; a=rsa-sha256; cv=none; b=vjxPbIJjX7R/Ge73u2g/LMPqfdHV6D7mXYIrhJoJsgcnE6yXrKahI8WX/glfc86z78oaiP BvYExKgVxWXVW/hggvuU2KUJd5ZLdnbr65g5C4hXsVpz119T+GlKgP/vhkhA4PFhmhTO9i rp15EX6W2BlwCvTCYcbxwMiZLpuHkKU= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b=RrghhCCJ; spf=pass (imf15.hostedemail.com: domain of ying.huang@linux.alibaba.com designates 115.124.30.100 as permitted sender) smtp.mailfrom=ying.huang@linux.alibaba.com; dmarc=pass (policy=none) header.from=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1751196547; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=Td91IaRHPLMg0S4S34rjLSxSTe+KTe00bq2/ozJgwkc=; b=RrghhCCJVl4oug50hmbLa+lwIQe1I6JBAxX5ES78peOnKjwcjLMBWXg/VOrBICGtxOnw203LfTmvYZIhwxsqPWXzh1eWPC2TMkkbt5HJ4UKTyWYTemuWmL9/PqkXxjje8gqsgu+FJZt9K9bqj0ejWjEZ2lgei5XWi409+xkbR4g= Received: from DESKTOP-5N7EMDA(mailfrom:ying.huang@linux.alibaba.com fp:SMTPD_---0WfwyPTY_1751196530 cluster:ay36) by smtp.aliyun-inc.com; Sun, 29 Jun 2025 19:29:05 +0800 From: "Huang, Ying" To: David Hildenbrand , Zi Yan Cc: Matthew Wilcox , 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 =?utf-8?Q?P=C3=A9rez?= , Alexander Viro , Christian Brauner , Jan Kara , Matthew Brost , Joshua Hahn , Rakie Kim , Byungchul Park , Gregory Price , 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 07/29] mm/migrate: rename isolate_movable_page() to isolate_movable_ops_page() In-Reply-To: (David Hildenbrand's message of "Mon, 23 Jun 2025 17:33:15 +0200") References: <20250618174014.1168640-1-david@redhat.com> <20250618174014.1168640-8-david@redhat.com> <9F76592E-BB0E-4136-BDBA-195CC6FF3B03@nvidia.com> <4D6D7321-CAEC-4D82-9354-4B9786C4D05E@nvidia.com> Date: Sun, 29 Jun 2025 19:28:50 +0800 Message-ID: <87h5zyrdl9.fsf@DESKTOP-5N7EMDA> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: E4403A0005 X-Stat-Signature: ra51pm65dqa8jcci8egc8cg8aro3u7xa X-Rspam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 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: David Hildenbrand writes: > On 18.06.25 20:48, Zi Yan wrote: >> On 18 Jun 2025, at 14:39, Matthew Wilcox wrote: >> >>> On Wed, Jun 18, 2025 at 02:14:15PM -0400, Zi Yan wrote: >>>> On 18 Jun 2025, at 13:39, David Hildenbrand wrote: >>>> >>>>> ... and start moving back to per-page things that will absolutely not be >>>>> folio things in the future. Add documentation and a comment that the >>>>> remaining folio stuff (lock, refcount) will have to be reworked as well. >>>>> >>>>> While at it, convert the VM_BUG_ON() into a WARN_ON_ONCE() and handle >>>>> it gracefully (relevant with further changes), and convert a >>>>> WARN_ON_ONCE() into a VM_WARN_ON_ONCE_PAGE(). >>>> >>>> The reason is that there is no upstream code, which use movable_ops for >>>> folios? Is there any fundamental reason preventing movable_ops from >>>> being used on folios? >>> >>> folios either belong to a filesystem or they are anonymous memory, and >>> so either the filesystem knows how to migrate them (through its a_ops) >>> or the migration code knows how to handle anon folios directly. > > Right, migration of folios will be handled by migration core. > >> for device private pages, to support migrating >0 order anon or fs >> folios >> to device, how should we represent them for devices? if you think folio is >> only for anon and fs. > > I assume they are proper folios, so yes. Just like they are handled > today (-> folios) > > I was asking a related question at LSF/MM in Alistair's session: are > we sure these things will be folios even before they are assigned to a > filesystem? I recall the answer was "yes". > > So we don't (and will not) support movable_ops for folios. Is it possible to use some device specific callbacks (DMA?) to copy from/to the device private folios (or pages) to/from the normal file/anon folios in the future? --- Best Regards, Huang, Ying