Re: [RFC v2 8/9] sysfs: Add cpu_avoid file

2025-07-01 Thread Shrikanth Hegde
Hi Greg, Thanks for looking into the patches. On Thu, Jun 26, 2025 at 12:41:07AM +0530, Shrikanth Hegde wrote: Add a sysfs file called "avoid" which prints the current CPUs makred as avoid. This could be used by userspace components or tools such as irqbalance. /sys/devices/system/cpu # ca

Re: [PATCH v1 00/29] mm/migration: rework movable_ops page migration (part 1)

2025-07-01 Thread David Hildenbrand
On 30.06.25 14:59, David Hildenbrand wrote: Based on mm/mm-new. In the future, as we decouple "struct page" from "struct folio", pages that support "non-lru page migration" -- movable_ops page migration such as memory balloons and zsmalloc -- will no longer be folios. They will not have ->mappin

Re: [PATCH v1 23/29] mm/page-alloc: remove PageMappingFlags()

2025-07-01 Thread David Hildenbrand
On 01.07.25 15:02, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 03:00:04PM +0200, David Hildenbrand wrote: We can now simply check for PageAnon() and remove PageMappingFlags(). ... and while at it, use the folio instead and operate on folio->mapping. Probably worth mentioning to be super cr

Re: [PATCH v1 22/29] mm/page-flags: rename PAGE_MAPPING_MOVABLE to PAGE_MAPPING_ANON_KSM

2025-07-01 Thread David Hildenbrand
On 01.07.25 14:54, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 03:00:03PM +0200, David Hildenbrand wrote: KSM is the only remaining user, let's rename the flag. While at it, adjust to remaining page -> folio in the doc. Hm I wonder if we could just ideally have this be a separate flag rathe

Re: [PATCH v1 21/29] mm: rename PG_isolated to PG_movable_ops_isolated

2025-07-01 Thread David Hildenbrand
PAGEFLAG(MovableOps, movable_ops, PF_NO_TAIL); +/* + * A movable_ops page has this flag set while it is isolated for migration. + * This flag primarily protects against concurrent migration attempts. + * + * Once migration ended (success or failure), the flag is cleared. The + * flag is manag

Re: [PATCH v1 08/29] mm/migrate: rename putback_movable_folio() to putback_movable_ops_page()

2025-07-01 Thread Zi Yan
On 30 Jun 2025, at 8:59, David Hildenbrand wrote: > ... and factor the complete handling of movable_ops pages out. > Convert it similar to isolate_movable_ops_page(). > > While at it, convert the VM_BUG_ON_FOLIO() into a VM_WARN_ON_PAGE(). > > Signed-off-by: David Hildenbrand > --- > mm/migrate.

Re: [PATCH] arch/powerpc: Remove .interp section in vmlinux

2025-07-01 Thread Segher Boessenkool
Hi! On Tue, Jul 01, 2025 at 12:49:29PM +0200, Christophe Leroy wrote: > When building with CONFIG_RELOCATABLE, there is a .interp section > which contains the name of the expected ELF interpreter: > > Contents of section .interp: > c21c1bac 2f757372 2f6c6962 2f6c642e 736f2e31 /usr/lib/l

Re: [RFC v2 8/9] sysfs: Add cpu_avoid file

2025-07-01 Thread Greg KH
On Thu, Jun 26, 2025 at 12:41:07AM +0530, Shrikanth Hegde wrote: > Add a sysfs file called "avoid" which prints the current CPUs > makred as avoid. > > This could be used by userspace components or tools such as irqbalance. > > /sys/devices/system/cpu # cat avoid > 70-479 You forgot to docum

[PATCH 00/23] binfmt_elf,arch/*: Use elf.h for coredump note names

2025-07-01 Thread Dave Martin
This series aims to clean up an aspect of coredump generation: ELF coredumps contain a set of notes describing the state of machine registers and other information about the dumped process. Notes are identified by a numeric identifier n_type and a "name" string, although this terminology is somew

[PATCH 15/23] powerpc/ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

2025-07-01 Thread Dave Martin
Instead of having the core code guess the note name for each regset, use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h. Signed-off-by: Dave Martin Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Oleg Nesterov Cc: Kees Cook Cc: Akihiko

Re: [PATCH v2 00/11] kasan: unify kasan_arch_is_ready with kasan_enabled

2025-07-01 Thread Christophe Leroy
Le 01/07/2025 à 12:15, Heiko Carstens a écrit : Another thing that needs careful consideration is whether it's possible to combine kasan_arch_is_ready() and kasan_enabled() into the same check logically at all. There's one issue mentioned in [1]: Hello, I've removed kasan_arch_is_ready() at

Re: [PATCH v1 26/29] mm: rename PAGE_MAPPING_* to FOLIO_MAPPING_*

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 03:00:07PM +0200, David Hildenbrand wrote: > Now that the mapping flags are only used for folios, let's rename the > defines. > > Reviewed-by: Zi Yan > Signed-off-by: David Hildenbrand As the official King of Churn (TM) I approve of this :) Reviewed-by: Lorenzo Stoakes

Re: [PATCH v2 00/11] kasan: unify kasan_arch_is_ready with kasan_enabled

2025-07-01 Thread Heiko Carstens
On Tue, Jul 01, 2025 at 12:25:32PM +0200, Christophe Leroy wrote: > Your patch below is simpler than what I proposed, but it keeps the static > branches so the overhead remains. > > I also proposed a change, it goes further by removing the static branch for > architectures that don't need it, see

Re: [PATCH v1 29/29] mm/balloon_compaction: provide single balloon_page_insert() and balloon_mapping_gfp_mask()

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 03:00:10PM +0200, David Hildenbrand wrote: > Let's just special-case based on IS_ENABLED(CONFIG_BALLOON_COMPACTION > like we did for balloon_page_finalize(). > > Signed-off-by: David Hildenbrand LGTM, so: Reviewed-by: Lorenzo Stoakes > --- > include/linux/balloon_compa

Re: [PATCH v1 17/29] mm/page_isolation: drop __folio_test_movable() check for large folios

2025-07-01 Thread David Hildenbrand
On 01.07.25 13:03, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:58PM +0200, David Hildenbrand wrote: Currently, we only support migration of individual movable_ops pages, so we can not run into that. Reviewed-by: Zi Yan Signed-off-by: David Hildenbrand Seems sensible, so: Reviewed-

Re: [PATCH v1 28/29] mm/balloon_compaction: "movable_ops" doc updates

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 03:00:09PM +0200, David Hildenbrand wrote: > Let's bring the docs up-to-date. Setting PG_movable_ops + page->private > very likely still requires to be performed under documented locks: > it's complicated. > > We will rework this in the future, as we will try avoiding using

Re: [PATCH v1 27/29] docs/mm: convert from "Non-LRU page migration" to "movable_ops page migration"

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 03:00:08PM +0200, David Hildenbrand wrote: > Let's bring the docs up-to-date. > > Reviewed-by: Zi Yan > Signed-off-by: David Hildenbrand LGTM, so: Reviewed-by: Lorenzo Stoakes > --- > Documentation/mm/page_migration.rst | 39 - > 1 file cha

Re: [PATCH v1 25/29] mm: simplify folio_expected_ref_count()

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 03:00:06PM +0200, David Hildenbrand wrote: > Now that PAGE_MAPPING_MOVABLE is gone, we can simplify and rely on the > folio_test_anon() test only. > > ... but staring at the users, this function should never even have been > called on movable_ops pages. E.g., > * __buffer_mi

Re: [PATCH v1 23/29] mm/page-alloc: remove PageMappingFlags()

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 03:00:04PM +0200, David Hildenbrand wrote: > We can now simply check for PageAnon() and remove PageMappingFlags(). > > ... and while at it, use the folio instead and operate on > folio->mapping. Probably worth mentioning to be super crystal clear that this is because now it

Re: [PATCH v1 24/29] mm/page-flags: remove folio_mapping_flags()

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 03:00:05PM +0200, David Hildenbrand wrote: > It's unused and the page counterpart is gone, so let's remove it. > > Reviewed-by: Zi Yan > Signed-off-by: David Hildenbrand LGTM, so: Reviewed-by: Lorenzo Stoakes > --- > include/linux/page-flags.h | 5 - > 1 file chan

Re: [PATCH v1 22/29] mm/page-flags: rename PAGE_MAPPING_MOVABLE to PAGE_MAPPING_ANON_KSM

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 03:00:03PM +0200, David Hildenbrand wrote: > KSM is the only remaining user, let's rename the flag. While at it, > adjust to remaining page -> folio in the doc. Hm I wonder if we could just ideally have this be a separate flag rather than a bitwise combination, however I be

Re: [PATCH 3/3 v4] ACPI: extlog: Trace CPER CXL Protocol Error Section

2025-07-01 Thread Jonathan Cameron
On Mon, 23 Jun 2025 16:54:20 +0200 "Fabio M. De Francesco" wrote: > When Firmware First is enabled, BIOS handles errors first and then it makes > them available to the kernel via the Common Platform Error Record (CPER) > sections (UEFI 2.10 Appendix N). Linux parses the CPER sections via one of >

Re: [PATCH 2/3 v4] ACPI: extlog: Trace CPER PCI Express Error Section

2025-07-01 Thread Jonathan Cameron
On Mon, 23 Jun 2025 16:54:19 +0200 "Fabio M. De Francesco" wrote: > I/O Machine Check Architecture events may signal failing PCIe components > or links. The AER event contains details on what was happening on the wire > when the error was signaled. > > Trace the CPER PCIe Error section (UEFI v2.

Re: [PATCH v1 21/29] mm: rename PG_isolated to PG_movable_ops_isolated

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 03:00:02PM +0200, David Hildenbrand wrote: > Let's rename the flag to make it clearer where it applies (not folios > ...). > > While at it, define the flag only with CONFIG_MIGRATION. > > Reviewed-by: Zi Yan > Signed-off-by: David Hildenbrand LGTM, so: Reviewed-by: Loren

Re: [PATCH v1 20/29] mm: convert "movable" flag in page->mapping to a page flag

2025-07-01 Thread David Hildenbrand
On 01.07.25 14:44, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 03:00:01PM +0200, David Hildenbrand wrote: Instead, let's use a page flag. As the page flag can result in false-positives, glue it to the page types for which we support/implement movable_ops page migration. The flag reused by Pa

Re: [PATCH v1 19/29] mm: stop storing migration_ops in page->mapping

2025-07-01 Thread David Hildenbrand
On 01.07.25 14:12, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 03:00:00PM +0200, David Hildenbrand wrote: ... instead, look them up statically based on the page type. Maybe in the future we want a registration interface? At least for now, it can be easily handled using the two page types that

Re: [PATCH v1 20/29] mm: convert "movable" flag in page->mapping to a page flag

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 03:00:01PM +0200, David Hildenbrand wrote: > Instead, let's use a page flag. As the page flag can result in > false-positives, glue it to the page types for which we > support/implement movable_ops page migration. > > The flag reused by PageMovableOps() might be sued by othe

[PATCH] arch/powerpc: Remove support for older GCC and binutils

2025-07-01 Thread Christophe Leroy
Commit 118c40b7b503 ("kbuild: require gcc-8 and binutils-2.30") raised minimum GCC_VERSION and LD_VERSION. Simplify powerpc build accordingly. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 2 +- arch/powerpc/boot/wrapper | 6 +- 2 files changed, 2 insertions(+), 6 deletion

Re: [PATCH v1 18/29] mm: remove __folio_test_movable()

2025-07-01 Thread David Hildenbrand
--- include/linux/page-flags.h | 6 -- mm/migrate.c | 43 -- mm/vmscan.c| 6 -- 3 files changed, 17 insertions(+), 38 deletions(-) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index c67163b73c

Re: [PATCH v1 13/29] mm/balloon_compaction: stop using __ClearPageMovable()

2025-07-01 Thread David Hildenbrand
OK I guess this is fine... :) An aside, unrelated tot his series: it'd be nice to use 'deflate' consistently in this code. We do __count_vm_event(BALLOON_DEFLATE) in balloon_page_list_dequeue() but say 'deflate' nowhere else... well before this patch :) Right, dequeue is actually deflate, becau

Re: [PATCH v1 16/29] mm: rename __PageMovable() to page_has_movable_ops()

2025-07-01 Thread David Hildenbrand
On 01.07.25 12:59, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:57PM +0200, David Hildenbrand wrote: Let's make it clearer that we are talking about movable_ops pages. While at it, convert a VM_BUG_ON to a VM_WARN_ON_ONCE_PAGE. <3 Reviewed-by: Zi Yan Signed-off-by: David Hildenbra

Re: [PATCH v1 15/29] mm/migration: remove PageMovable()

2025-07-01 Thread David Hildenbrand
On 01.07.25 12:50, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:56PM +0200, David Hildenbrand wrote: As __ClearPageMovable() is gone that would have only made PageMovable()==false but still __PageMovable()==true, now PageMovable() == __PageMovable(). I think this could be rephrased to

Re: [PATCH v1 14/29] mm/migrate: remove __ClearPageMovable()

2025-07-01 Thread David Hildenbrand
On 01.07.25 12:43, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:55PM +0200, David Hildenbrand wrote: Unused, let's remove it. The Chinese docs in Documentation/translations/zh_CN/mm/page_migration.rst still mention it, but that whole docs is destined to get outdated and updated by someb

[PATCH] arch/powerpc: Remove .interp section in vmlinux

2025-07-01 Thread Christophe Leroy
When building with CONFIG_RELOCATABLE, there is a .interp section which contains the name of the expected ELF interpreter: Contents of section .interp: c21c1bac 2f757372 2f6c6962 2f6c642e 736f2e31 /usr/lib/ld.so.1 c21c1bbc 00 . That information

Re: [PATCH v1 19/29] mm: stop storing migration_ops in page->mapping

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 03:00:00PM +0200, David Hildenbrand wrote: > ... instead, look them up statically based on the page type. Maybe in the > future we want a registration interface? At least for now, it can be > easily handled using the two page types that actually support page > migration. > >

Re: [PATCH v1 18/29] mm: remove __folio_test_movable()

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 02:59:59PM +0200, David Hildenbrand wrote: > Convert to page_has_movable_ops(). While at it, cleanup relevant code > a bit. > > The data_race() in migrate_folio_unmap() is questionable: we already > hold a page reference, and concurrent modifications can no longer > happen (

Re: [PATCH v1 13/29] mm/balloon_compaction: stop using __ClearPageMovable()

2025-07-01 Thread Lorenzo Stoakes
On Tue, Jul 01, 2025 at 12:19:47PM +0200, David Hildenbrand wrote: > On 01.07.25 12:03, Lorenzo Stoakes wrote: > > On Mon, Jun 30, 2025 at 02:59:54PM +0200, David Hildenbrand wrote: > > > We can just look at the balloon device (stored in page->private), to see > > > if the page is still part of the

Re: [PATCH v1 10/29] mm/migrate: remove folio_test_movable() and folio_movable_ops()

2025-07-01 Thread Lorenzo Stoakes
On Tue, Jul 01, 2025 at 12:15:41PM +0200, David Hildenbrand wrote: > On 30.06.25 19:07, Lorenzo Stoakes wrote: > > On Mon, Jun 30, 2025 at 02:59:51PM +0200, David Hildenbrand wrote: > > > Folios will have nothing to do with movable_ops page migration. These > > > functions are now unused, so let's

Re: [PATCH v1 17/29] mm/page_isolation: drop __folio_test_movable() check for large folios

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 02:59:58PM +0200, David Hildenbrand wrote: > Currently, we only support migration of individual movable_ops pages, so > we can not run into that. > > Reviewed-by: Zi Yan > Signed-off-by: David Hildenbrand Seems sensible, so: Reviewed-by: Lorenzo Stoakes Maybe worth add

Re: [PATCH v1 16/29] mm: rename __PageMovable() to page_has_movable_ops()

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 02:59:57PM +0200, David Hildenbrand wrote: > Let's make it clearer that we are talking about movable_ops pages. > > While at it, convert a VM_BUG_ON to a VM_WARN_ON_ONCE_PAGE. <3 > > Reviewed-by: Zi Yan > Signed-off-by: David Hildenbrand Great, love it. Reviewed-by: Lo

Re: [PATCH v1 04/29] mm/page_alloc: let page freeing clear any set page type

2025-07-01 Thread David Hildenbrand
On 01.07.25 10:27, Lorenzo Stoakes wrote: On Tue, Jul 01, 2025 at 10:17:13AM +0200, David Hildenbrand wrote: On 30.06.25 17:27, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:45PM +0200, David Hildenbrand wrote: Currently, any user of page types must clear that type before freeing a page

Re: [PATCH v1 15/29] mm/migration: remove PageMovable()

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 02:59:56PM +0200, David Hildenbrand wrote: > As __ClearPageMovable() is gone that would have only made > PageMovable()==false but still __PageMovable()==true, now > PageMovable() == __PageMovable(). I think this could be rephrased to be clearer, something like: Pre

Re: [PATCH v1 14/29] mm/migrate: remove __ClearPageMovable()

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 02:59:55PM +0200, David Hildenbrand wrote: > Unused, let's remove it. > > The Chinese docs in Documentation/translations/zh_CN/mm/page_migration.rst > still mention it, but that whole docs is destined to get outdated and > updated by somebody that actually speaks that langua

Re: [PATCH v1 12/29] mm/zsmalloc: stop using __ClearPageMovable()

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 02:59:53PM +0200, David Hildenbrand wrote: > Instead, let's check in the callbacks if the page was already destroyed, > which can be checked by looking at zpdesc->zspage (see reset_zpdesc()). > > If we detect that the page was destroyed: > > (1) Fail isolation, just like the

Re: [PATCH v1 13/29] mm/balloon_compaction: stop using __ClearPageMovable()

2025-07-01 Thread David Hildenbrand
On 01.07.25 12:03, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:54PM +0200, David Hildenbrand wrote: We can just look at the balloon device (stored in page->private), to see if the page is still part of the balloon. As isolated balloon pages cannot get released (they are taken off the b

Re: [PATCH v2 00/11] kasan: unify kasan_arch_is_ready with kasan_enabled

2025-07-01 Thread Heiko Carstens
> > > Another thing that needs careful consideration is whether it's > > > possible to combine kasan_arch_is_ready() and kasan_enabled() into the > > > same check logically at all. There's one issue mentioned in [1]: > > > > Hello, > > I've removed kasan_arch_is_ready() at all in this series: > > [

Re: [PATCH v1 10/29] mm/migrate: remove folio_test_movable() and folio_movable_ops()

2025-07-01 Thread David Hildenbrand
On 30.06.25 19:07, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:51PM +0200, David Hildenbrand wrote: Folios will have nothing to do with movable_ops page migration. These functions are now unused, so let's remove them. Maybe worth mentioning that __folio_test_movable() is still a thing

Re: [PATCH v1 09/29] mm/migrate: factor out movable_ops page handling into migrate_movable_ops_page()

2025-07-01 Thread David Hildenbrand
On 01.07.25 11:24, David Hildenbrand wrote: On 30.06.25 19:05, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:50PM +0200, David Hildenbrand wrote: Let's factor it out, simplifying the calling code. The assumption is that flush_dcache_page() is not required for movable_ops pages: as docum

Re: [PATCH v1 13/29] mm/balloon_compaction: stop using __ClearPageMovable()

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 02:59:54PM +0200, David Hildenbrand wrote: > We can just look at the balloon device (stored in page->private), to see > if the page is still part of the balloon. > > As isolated balloon pages cannot get released (they are taken off the > balloon list while isolated), we don'

Re: [PATCH v1 04/29] mm/page_alloc: let page freeing clear any set page type

2025-07-01 Thread David Hildenbrand
On 01.07.25 10:37, Lorenzo Stoakes wrote: On Tue, Jul 01, 2025 at 10:34:33AM +0200, David Hildenbrand wrote: Reviewed-by: Zi Yan Acked-by: Harry Yoo Signed-off-by: David Hildenbrand Based on discussion below, I'm good with this now with the comment change, so feel free to add: Reviewed-by:

Re: [PATCH v1 02/29] mm/balloon_compaction: convert balloon_page_delete() to balloon_page_finalize()

2025-07-01 Thread David Hildenbrand
[...] -{ - __ClearPageOffline(page); - __ClearPageMovable(page); - set_page_private(page, 0); - /* -* No touch page.lru field once @page has been isolated -* because VM is using the field. -*/ - if (!PageIsolated(page)) - list_d

Re: [PATCH v1 11/29] mm/migrate: move movable_ops page handling out of move_to_new_folio()

2025-07-01 Thread Lorenzo Stoakes
On Mon, Jun 30, 2025 at 02:59:52PM +0200, David Hildenbrand wrote: > Let's move that handling directly into migrate_folio_move(), so we can > simplify move_to_new_folio(). While at it, fixup the documentation a > bit. > > Note that unmap_and_move_huge_page() does not care, because it only > deals w

Re: [PATCH v1 09/29] mm/migrate: factor out movable_ops page handling into migrate_movable_ops_page()

2025-07-01 Thread David Hildenbrand
On 30.06.25 19:05, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:50PM +0200, David Hildenbrand wrote: Let's factor it out, simplifying the calling code. The assumption is that flush_dcache_page() is not required for movable_ops pages: as documented for flush_dcache_folio(), it really onl

[powerpc:merge] BUILD SUCCESS 837f3b82898b077b38ea6739f4dc87e4ccfc7751

2025-07-01 Thread kernel test robot
15.1.0 archsdk_defconfiggcc-15.1.0 arc randconfig-001-20250630gcc-10.5.0 arc randconfig-001-20250701gcc-13.3.0 arc randconfig-002-20250630gcc-12.4.0 arc randconfig-002-20250701gcc-

Re: [PATCH v1 07/29] mm/migrate: rename isolate_movable_page() to isolate_movable_ops_page()

2025-07-01 Thread Lorenzo Stoakes
On Tue, Jul 01, 2025 at 10:29:54AM +0200, David Hildenbrand wrote: > > I wonder, in the wonderful future where PageXXX() always refers to a page, > > can > > we use something less horrible than these macros? > > Good question. It all interacts with how we believe compound pages will work > / look

Re: [PATCH v1 04/29] mm/page_alloc: let page freeing clear any set page type

2025-07-01 Thread Lorenzo Stoakes
On Tue, Jul 01, 2025 at 10:17:13AM +0200, David Hildenbrand wrote: > On 30.06.25 17:27, Lorenzo Stoakes wrote: > > On Mon, Jun 30, 2025 at 02:59:45PM +0200, David Hildenbrand wrote: > > > Currently, any user of page types must clear that type before freeing > > > a page back to the buddy, otherwise

Re: [PATCH v1 02/29] mm/balloon_compaction: convert balloon_page_delete() to balloon_page_finalize()

2025-07-01 Thread Lorenzo Stoakes
On Tue, Jul 01, 2025 at 09:58:09AM +0200, David Hildenbrand wrote: > On 30.06.25 17:15, Lorenzo Stoakes wrote: > > On Mon, Jun 30, 2025 at 02:59:43PM +0200, David Hildenbrand wrote: > > > Let's move the removal of the page from the balloon list into the single > > > caller, to remove the dependency

Re: [PATCH v1 03/29] mm/zsmalloc: drop PageIsolated() related VM_BUG_ONs

2025-07-01 Thread Lorenzo Stoakes
On Tue, Jul 01, 2025 at 10:03:57AM +0200, David Hildenbrand wrote: > > > diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c > > > index 999b513c7fdff..7f1431f2be98f 100644 > > > --- a/mm/zsmalloc.c > > > +++ b/mm/zsmalloc.c > > > @@ -1719,8 +1719,6 @@ static bool zs_page_isolate(struct page *page, > > > i

Re: [PATCH v1 04/29] mm/page_alloc: let page freeing clear any set page type

2025-07-01 Thread Lorenzo Stoakes
On Tue, Jul 01, 2025 at 10:34:33AM +0200, David Hildenbrand wrote: > > > > > Reviewed-by: Zi Yan > > > > > Acked-by: Harry Yoo > > > > > Signed-off-by: David Hildenbrand Based on discussion below, I'm good with this now with the comment change, so feel free to add: Reviewed-by: Lorenzo Stoakes

Re: [PATCH v1 14/29] mm/migrate: remove __ClearPageMovable()

2025-07-01 Thread Harry Yoo
On Mon, Jun 30, 2025 at 02:59:55PM +0200, David Hildenbrand wrote: > Unused, let's remove it. > > The Chinese docs in Documentation/translations/zh_CN/mm/page_migration.rst > still mention it, but that whole docs is destined to get outdated and > updated by somebody that actually speaks that langu

Re: [PATCH v1 07/29] mm/migrate: rename isolate_movable_page() to isolate_movable_ops_page()

2025-07-01 Thread David Hildenbrand
On 30.06.25 18:24, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:48PM +0200, 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 h

Re: [PATCH v1 06/29] mm/zsmalloc: make PageZsmalloc() sticky until the page is freed

2025-07-01 Thread David Hildenbrand
On 30.06.25 18:03, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:47PM +0200, David Hildenbrand wrote: Let the page freeing code handle clearing the page type. Acked-by: Zi Yan Reviewed-by: Sergey Senozhatsky Acked-by: Harry Yoo Signed-off-by: David Hildenbrand On basis of sanity of

Re: [PATCH v1 12/29] mm/zsmalloc: stop using __ClearPageMovable()

2025-07-01 Thread Harry Yoo
On Mon, Jun 30, 2025 at 02:59:53PM +0200, David Hildenbrand wrote: > Instead, let's check in the callbacks if the page was already destroyed, > which can be checked by looking at zpdesc->zspage (see reset_zpdesc()). > > If we detect that the page was destroyed: > > (1) Fail isolation, just like t

Re: [PATCH v1 05/29] mm/balloon_compaction: make PageOffline sticky until the page is freed

2025-07-01 Thread David Hildenbrand
On 30.06.25 18:01, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:46PM +0200, David Hildenbrand wrote: Let the page freeing code handle clearing the page type. Why is this advantageous? We want to keep the page marked offline for longer? Less code? ;) I will add: "Being able to ident

Re: [PATCH v1 04/29] mm/page_alloc: let page freeing clear any set page type

2025-07-01 Thread David Hildenbrand
On 30.06.25 17:27, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:45PM +0200, David Hildenbrand wrote: Currently, any user of page types must clear that type before freeing a page back to the buddy, otherwise we'll run into mapcount related sanity checks (because the page type currently ov

Re: [PATCH v1 05/29] mm/balloon_compaction: make PageOffline sticky until the page is freed

2025-07-01 Thread David Hildenbrand
On 30.06.25 18:14, Zi Yan wrote: On 30 Jun 2025, at 12:01, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:46PM +0200, David Hildenbrand wrote: Let the page freeing code handle clearing the page type. Why is this advantageous? We want to keep the page marked offline for longer? Acked

Re: [PATCH v1 05/29] mm/balloon_compaction: make PageOffline sticky until the page is freed

2025-07-01 Thread David Hildenbrand
On 01.07.25 08:13, Harry Yoo wrote: On Mon, Jun 30, 2025 at 12:14:01PM -0400, Zi Yan wrote: On 30 Jun 2025, at 12:01, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:46PM +0200, David Hildenbrand wrote: Let the page freeing code handle clearing the page type. Why is this advantageous?

Re: [PATCH v1 03/29] mm/zsmalloc: drop PageIsolated() related VM_BUG_ONs

2025-07-01 Thread David Hildenbrand
On 30.06.25 17:17, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:44PM +0200, David Hildenbrand wrote: Let's drop these checks; these are conditions the core migration code must make sure will hold either way, no need to double check. Acked-by: Zi Yan Reviewed-by: Sergey Senozhatsky Ack

Re: [PATCH v1 02/29] mm/balloon_compaction: convert balloon_page_delete() to balloon_page_finalize()

2025-07-01 Thread David Hildenbrand
On 30.06.25 17:15, Lorenzo Stoakes wrote: On Mon, Jun 30, 2025 at 02:59:43PM +0200, David Hildenbrand wrote: 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. We'll shuffle the oper

Re: [PATCH v1 11/29] mm/migrate: move movable_ops page handling out of move_to_new_folio()

2025-07-01 Thread Harry Yoo
On Mon, Jun 30, 2025 at 02:59:52PM +0200, David Hildenbrand wrote: > Let's move that handling directly into migrate_folio_move(), so we can > simplify move_to_new_folio(). While at it, fixup the documentation a > bit. > > Note that unmap_and_move_huge_page() does not care, because it only > deals

Re: [PATCH v1 09/29] mm/migrate: factor out movable_ops page handling into migrate_movable_ops_page()

2025-07-01 Thread Harry Yoo
On Mon, Jun 30, 2025 at 02:59:50PM +0200, David Hildenbrand wrote: > Let's factor it out, simplifying the calling code. > > The assumption is that flush_dcache_page() is not required for > movable_ops pages: as documented for flush_dcache_folio(), it really > only applies when the kernel wrote to