linux/arch/powerpc
David Hildenbrand 15504b1163 mm/balloon_compaction: convert balloon_page_delete() to balloon_page_finalize()
Let's move the removal of the page from the balloon list into the single
caller, to remove the dependency on the PG_isolated flag and clarify
locking requirements.

Note that for now, balloon_page_delete() was used on two paths:

(1) Removing a page from the balloon for deflation through
    balloon_page_list_dequeue()
(2) Removing an isolated page from the balloon for migration in the
    per-driver migration handlers. Isolated pages were already removed from
    the balloon list during isolation.

So instead of relying on the flag, we can just distinguish both cases
directly and handle it accordingly in the caller.

We'll shuffle the operations a bit such that they logically make more
sense (e.g., remove from the list before clearing flags).

In balloon migration functions we can now move the balloon_page_finalize()
out of the balloon lock and perform the finalization just before dropping
the balloon reference.

Document that the page lock is currently required when modifying the
movability aspects of a page; hopefully we can soon decouple this from the
page lock.

Link: https://lkml.kernel.org/r/20250704102524.326966-3-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: Byungchul Park <byungchul@sk.com>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Eugenio Pé rez <eperezma@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Gregory Price <gourry@gourry.net>
Cc: Harry Yoo <harry.yoo@oracle.com>
Cc: "Huang, Ying" <ying.huang@linux.alibaba.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Jerrin Shaji George <jerrin.shaji-george@broadcom.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Mathew Brost <matthew.brost@intel.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Peter Xu <peterx@redhat.com>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Rakie Kim <rakie.kim@sk.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: xu xin <xu.xin16@zte.com.cn>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-07-13 16:38:25 -07:00
..
boot powerpc: dts: mpc8315erdb: Add GPIO controller node 2025-06-13 12:32:21 +05:30
configs Networking changes for 6.16. 2025-05-28 15:24:36 -07:00
crypto crypto: powerpc/sha256 - implement library instead of shash 2025-05-05 18:20:43 +08:00
include mm: remove devmap related functions and page table bits 2025-07-09 22:42:18 -07:00
kernel powerpc/eeh: Fix missing PE bridge reconfiguration during VFIO EEH recovery 2025-06-13 12:30:48 +05:30
kexec powerpc/crash: Fix non-smp kexec preparation 2025-04-29 11:40:46 +05:30
kvm mm: update architecture and driver code to use vm_flags_t 2025-07-09 22:42:14 -07:00
lib powerpc updates for 6.16 2025-05-26 14:38:57 -07:00
math-emu
mm powerpc: remove checks for devmap pages and PMDs/PUDs 2025-07-09 22:42:17 -07:00
net powerpc/bpf: fix JIT code size calculation of bpf trampoline 2025-04-29 11:04:27 +05:30
perf Performance events updates for v6.16: 2025-05-26 15:40:23 -07:00
platforms mm/balloon_compaction: convert balloon_page_delete() to balloon_page_finalize() 2025-07-13 16:38:25 -07:00
purgatory
sysdev A set of cleanups for the generic interrupt subsystem: 2025-05-27 08:07:32 -07:00
tools powerpc/ftrace: Fix ftrace bug with KASAN=y 2024-11-10 22:33:51 +11:00
xmon powerpc: Don't use --- in kernel logs 2025-04-29 11:41:38 +05:30
Kbuild powerpc64/ftrace: Move ftrace sequence out of line 2024-10-31 11:00:54 +11:00
Kconfig mm: remove devmap related functions and page table bits 2025-07-09 22:42:18 -07:00
Kconfig.debug powerpc: Remove UDBG_RTAS_CONSOLE 2025-02-26 21:15:09 +05:30
Makefile Kbuild updates for v6.13 2024-11-30 13:41:50 -08:00
Makefile.postlink powerpc/ftrace: Add a postlink script to validate function tracer 2024-10-31 11:00:54 +11:00