Commit b1df9c5
mm/page_isolation: remove migratetype from move_freepages_block_isolate()
Since migratetype is no longer overwritten during pageblock isolation,
moving a pageblock out of MIGRATE_ISOLATE no longer needs a new
migratetype.
Add pageblock_isolate_and_move_free_pages() and
pageblock_unisolate_and_move_free_pages() to be explicit about the page
isolation operations. Both share the common code in
__move_freepages_block_isolate(), which is renamed from
move_freepages_block_isolate().
Add toggle_pageblock_isolate() to flip pageblock isolation bit in
__move_freepages_block_isolate().
Make set_pageblock_migratetype() only accept non MIGRATE_ISOLATE types, so
that one should use set_pageblock_isolate() to isolate pageblocks. As a
result, move pageblock migratetype code out of __move_freepages_block().
Link: https://lkml.kernel.org/r/20250617021115.2331563-5-ziy@nvidia.com
Signed-off-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kirill A. Shuemov <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Richard Chang <richardycc@google.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 1bc3587 commit b1df9c5
File tree
3 files changed
+75
-31
lines changed- include/linux
- mm
3 files changed
+75
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | | - | |
50 | | - | |
| 48 | + | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
529 | | - | |
| 528 | + | |
| 529 | + | |
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
| 537 | + | |
| 538 | + | |
538 | 539 | | |
539 | 540 | | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
540 | 544 | | |
541 | 545 | | |
542 | 546 | | |
| |||
1921 | 1925 | | |
1922 | 1926 | | |
1923 | 1927 | | |
1924 | | - | |
1925 | | - | |
| 1928 | + | |
| 1929 | + | |
1926 | 1930 | | |
1927 | 1931 | | |
1928 | 1932 | | |
| |||
1954 | 1958 | | |
1955 | 1959 | | |
1956 | 1960 | | |
1957 | | - | |
1958 | | - | |
1959 | 1961 | | |
1960 | 1962 | | |
1961 | 1963 | | |
| |||
2013 | 2015 | | |
2014 | 2016 | | |
2015 | 2017 | | |
| 2018 | + | |
2016 | 2019 | | |
2017 | 2020 | | |
2018 | 2021 | | |
2019 | 2022 | | |
2020 | | - | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
2021 | 2028 | | |
2022 | 2029 | | |
2023 | 2030 | | |
| |||
2045 | 2052 | | |
2046 | 2053 | | |
2047 | 2054 | | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
2048 | 2063 | | |
2049 | | - | |
| 2064 | + | |
2050 | 2065 | | |
2051 | 2066 | | |
2052 | | - | |
| 2067 | + | |
2053 | 2068 | | |
2054 | 2069 | | |
2055 | 2070 | | |
| |||
2064 | 2079 | | |
2065 | 2080 | | |
2066 | 2081 | | |
2067 | | - | |
2068 | | - | |
| 2082 | + | |
| 2083 | + | |
2069 | 2084 | | |
2070 | 2085 | | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
2071 | 2094 | | |
2072 | 2095 | | |
2073 | 2096 | | |
| |||
2084 | 2107 | | |
2085 | 2108 | | |
2086 | 2109 | | |
2087 | | - | |
| 2110 | + | |
2088 | 2111 | | |
2089 | 2112 | | |
2090 | 2113 | | |
| |||
2095 | 2118 | | |
2096 | 2119 | | |
2097 | 2120 | | |
2098 | | - | |
| 2121 | + | |
2099 | 2122 | | |
2100 | 2123 | | |
2101 | 2124 | | |
2102 | 2125 | | |
2103 | | - | |
2104 | | - | |
2105 | | - | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
2106 | 2140 | | |
2107 | 2141 | | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
2108 | 2153 | | |
2109 | 2154 | | |
2110 | 2155 | | |
| |||
2296 | 2341 | | |
2297 | 2342 | | |
2298 | 2343 | | |
| 2344 | + | |
2299 | 2345 | | |
2300 | 2346 | | |
2301 | 2347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | | - | |
268 | | - | |
| 267 | + | |
| 268 | + | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
| 436 | + | |
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
| 507 | + | |
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
520 | | - | |
521 | | - | |
| 520 | + | |
522 | 521 | | |
523 | 522 | | |
524 | 523 | | |
| |||
548 | 547 | | |
549 | 548 | | |
550 | 549 | | |
551 | | - | |
| 550 | + | |
552 | 551 | | |
553 | 552 | | |
554 | 553 | | |
| |||
0 commit comments