From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) (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 F08B710A1F; Sun, 29 Jun 2025 11:29:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.111 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751196564; cv=none; b=CEIscjRPYA7glpfHGxHOuemXNXMZTKVxX4mKkwJkVPPkjZJvY3zunCGAfJaH3qZ751C4LmIIv+Qnl7ezrYIbuf6nfjK8j3c0vgF1GxTanR5sbJABYxGcqJwpeIeVGLv30jfHktbI243awvY1yM7qUPn5wTxd74o505mbtoWQU04= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751196564; c=relaxed/simple; bh=Mp0ZQrvSfkXHIaP5jgz7YayUIfi2aH+uu2FQFAw4D1I=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=JK/fsBZx+BOkwawRIm9s2L21TShJtUzSigeRgj+hGvZN9jIkrSBFzvLD9s2YwpoZL/PL30fWbsM7SENMMWCd4H3OE3n7jmdpxsGpWIq6cmEVWW/waDn2vwPGUNrnScmlkgeIQy83tk7CMsKtncjkweU0VSLc6lLMbRNDqv4iaVA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=FFkV0alo; arc=none smtp.client-ip=115.124.30.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="FFkV0alo" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1751196550; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=Td91IaRHPLMg0S4S34rjLSxSTe+KTe00bq2/ozJgwkc=; b=FFkV0aloih2gxDgBc+OBf/Fp49oPe6mgV9Pth16liNXVindwkrzBZMcE0duoQNJQC+e9nzycIfqvtl17WXkQsWyR6CZHd5RMqSN8WQXNgyJ/Ppn5k1driigB59e/WyASTGXWlMG0UR+qzD9PJ0uUSKIY0hszhM116B6ROqyz7P4= 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) Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ascii 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