diff options
| author | Harry Yoo <[email protected]> | 2025-07-04 10:30:53 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-07-20 02:26:15 +0000 |
| commit | 694d6b99923eb05a8fd188be44e26077d19f0e21 (patch) | |
| tree | 8cb7fd07409abb82ad758abc2a8f2cc681cf732f /drivers/pwm/pwm-microchip-core.c | |
| parent | mm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list (diff) | |
| download | kernel-694d6b99923eb05a8fd188be44e26077d19f0e21.tar.gz kernel-694d6b99923eb05a8fd188be44e26077d19f0e21.zip | |
mm/zsmalloc: do not pass __GFP_MOVABLE if CONFIG_COMPACTION=n
Commit 48b4800a1c6a ("zsmalloc: page migration support") added support for
migrating zsmalloc pages using the movable_operations migration framework.
However, the commit did not take into account that zsmalloc supports
migration only when CONFIG_COMPACTION is enabled. Tracing shows that
zsmalloc was still passing the __GFP_MOVABLE flag even when compaction is
not supported.
This can result in unmovable pages being allocated from movable page
blocks (even without stealing page blocks), ZONE_MOVABLE and CMA area.
Possible user visible effects:
- Some ZONE_MOVABLE memory can be not actually movable
- CMA allocation can fail because of this
- Increased memory fragmentation due to ignoring the page mobility
grouping feature
I'm not really sure who uses kernels without compaction support, though :(
To fix this, clear the __GFP_MOVABLE flag when
!IS_ENABLED(CONFIG_COMPACTION).
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 48b4800a1c6a ("zsmalloc: page migration support")
Signed-off-by: Harry Yoo <[email protected]>
Acked-by: David Hildenbrand <[email protected]>
Reviewed-by: Sergey Senozhatsky <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-microchip-core.c')
0 files changed, 0 insertions, 0 deletions
