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 66481C7EE39 for ; Mon, 30 Jun 2025 00:58:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E9E496B0093; Sun, 29 Jun 2025 20:58:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E75A46B0096; Sun, 29 Jun 2025 20:58:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DB2856B0098; Sun, 29 Jun 2025 20:58:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id C88126B0093 for ; Sun, 29 Jun 2025 20:58:13 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 81FD61602E3 for ; Mon, 30 Jun 2025 00:58:13 +0000 (UTC) X-FDA: 83610255666.30.C133AE3 Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) by imf13.hostedemail.com (Postfix) with ESMTP id 9AA772000E for ; Mon, 30 Jun 2025 00:58:09 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b=oYm9hv30; spf=pass (imf13.hostedemail.com: domain of ying.huang@linux.alibaba.com designates 115.124.30.110 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=1751245091; 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=KE5Ke26crJ20g62CV0eTsdMDqmR58zlWRKiqOi/7eNA=; b=DnXUoTS+PQNO0sTP75SVKzFMSjibpPqi8HPTi21Kt9SBMMy9uqXB8GKd91GQdVAdUfRrVg 3SDZ+4BZCwGFiNdOGt3LwQN9Hj9owV/MjNokVLvzLbb+sx9EHPk3VLay64XCSp2ukUievK 1zzjHhYgI7qq/aGdUak8DMHKgl5OlJ4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1751245091; a=rsa-sha256; cv=none; b=xNAvnC4pVlobUXRp3PFRHinC9diqF234X00wa4ihS941sBjDOWi9G+xBPlxp65hucTxW9c 8BCSW9sSpgscttuiKi4Nz/wO0YmoFn8oLTJSYsX/WxyscQpJ4ogo9TeSQc6yQBJ8TKIDBo +lUC4QnJckS8JxHyAkbuXkeP9Dyhlkk= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b=oYm9hv30; spf=pass (imf13.hostedemail.com: domain of ying.huang@linux.alibaba.com designates 115.124.30.110 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=1751245086; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=KE5Ke26crJ20g62CV0eTsdMDqmR58zlWRKiqOi/7eNA=; b=oYm9hv30l+7CwVBMKs9NXiASrij/O2bhV0oFUitfs5a2bBDe1rIzgpZSQvfShxY50y6gg1D2eRy9SwjXJDs4KbUHKInOFTPNc7G1iuo2f9WTRnYg0YxDtNRhMhWPef30ZSylYiDsQU5R73axM1CUI4tD0wLhZfZm/uFKCXu5pYI= Received: from DESKTOP-5N7EMDA(mailfrom:ying.huang@linux.alibaba.com fp:SMTPD_---0Wg25R9f_1751245082 cluster:ay36) by smtp.aliyun-inc.com; Mon, 30 Jun 2025 08:58:04 +0800 From: "Huang, Ying" To: Alistair Popple Cc: David Hildenbrand , Zi Yan , 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 , 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: (Alistair Popple's message of "Mon, 30 Jun 2025 10:20:56 +1000") 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> <87h5zyrdl9.fsf@DESKTOP-5N7EMDA> Date: Mon, 30 Jun 2025 08:58:03 +0800 Message-ID: <878qlaqc4k.fsf@DESKTOP-5N7EMDA> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 9AA772000E X-Stat-Signature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aj+L64EgsjnBD+jZ0A/D0STqA/dX5kR9OUGGv0Jp9C2O04fRpIuJ7BBkyCkn768RXG1ixTDL9+ySYe6VPTc/42hdUmB8rZmeKydctb1I+9BQ4k+VpKgiaNYJougmFf3R8098CWPybVjNmFpgJ/TxSTj7bGlCTOA9tnkd7uFRZGqYH2g8O+KxF6CqP6qmlxA70Kb4f604NOp68sQr2pX0PqNI29KYnmizPhTJSOtDZLX/cATTSd9sg+U/pGycMhCKH1f9NYyXG1M0ZjcwCAeMQ0WVSIPyL9HCvrGE6geg/gSMqcxUYVuP7jvX29dzNdCFsctRjHQpPScqsCKtI/qzGxdk0GwxckZ4NR8GBHAqP3f1atvm3I+PKVgnWX/Wvdo2gS90Hw/fgk29uYnIBdgjKaA9QSjAdL5m5d3yQqjWbrZD4/X4 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Alistair Popple writes: > On Sun, Jun 29, 2025 at 07:28:50PM +0800, Huang, Ying wrote: >> 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) > > Yes, they should be proper folios. So, folios include file cache, anonymous, and some device private. >> > 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? > > I guess we could put such callbacks on the folio->pgmap, but I'm not sure why > we would want to. Currently all migration to/from device private (or coherent) > folios is managed by the device, which is one of the features of ZONE_DEVICE. Yes. The is the current behavior per my understanding too. > Did you have some particular reason/idea for why we might want to do this? No. Just want to check whether there are some requirements for that. I think that it's just another way to organize code. --- Best Regards, Huang, Ying