Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm, vmscan: remove ISOLATE_UNMAPPED

This isolate_mode_t flag is effectively unused since 89f6c88a6ab4 ("mm:
__isolate_lru_page_prepare() in isolate_migratepages_block()") as
sc->may_unmap is now checked directly (and only node_reclaim has a mode
that sets it to 0). The last remaining place is mm_vmscan_lru_isolate
tracepoint for the isolate_mode parameter. That one was mainly used to
indicate the active/inactive mode, which the trace-vmscan-postprocess.pl
script consumed, but that got silently broken. After fixing the script by
the previous patch, it does not need the isolate_mode anymore. So just
remove the parameter and with that the whole ISOLATE_UNMAPPED flag.

Link: https://lkml.kernel.org/r/20230914131637.12204-4-vbabka@suse.cz
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Vlastimil Babka and committed by
Andrew Morton
3dfbb555 83121580

+7 -14
+4 -4
Documentation/trace/postprocess/trace-vmscan-postprocess.pl
··· 112 112 my $regex_kswapd_wake_default = 'nid=([0-9]*) order=([0-9]*)'; 113 113 my $regex_kswapd_sleep_default = 'nid=([0-9]*)'; 114 114 my $regex_wakeup_kswapd_default = 'nid=([0-9]*) order=([0-9]*) gfp_flags=([A-Z_|]*)'; 115 - my $regex_lru_isolate_default = 'isolate_mode=([0-9]*) classzone=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_skipped=([0-9]*) nr_taken=([0-9]*) lru=([a-z_]*)'; 115 + my $regex_lru_isolate_default = 'classzone=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_skipped=([0-9]*) nr_taken=([0-9]*) lru=([a-z_]*)'; 116 116 my $regex_lru_shrink_inactive_default = 'nid=([0-9]*) nr_scanned=([0-9]*) nr_reclaimed=([0-9]*) nr_dirty=([0-9]*) nr_writeback=([0-9]*) nr_congested=([0-9]*) nr_immediate=([0-9]*) nr_activate_anon=([0-9]*) nr_activate_file=([0-9]*) nr_ref_keep=([0-9]*) nr_unmap_fail=([0-9]*) priority=([0-9]*) flags=([A-Z_|]*)'; 117 117 my $regex_lru_shrink_active_default = 'lru=([A-Z_]*) nr_taken=([0-9]*) nr_active=([0-9]*) nr_deactivated=([0-9]*) nr_referenced=([0-9]*) priority=([0-9]*) flags=([A-Z_|]*)' ; 118 118 my $regex_writepage_default = 'page=([0-9a-f]*) pfn=([0-9]*) flags=([A-Z_|]*)'; ··· 204 204 $regex_lru_isolate = generate_traceevent_regex( 205 205 "vmscan/mm_vmscan_lru_isolate", 206 206 $regex_lru_isolate_default, 207 - "isolate_mode", classzone", "order", 207 + "classzone", "order", 208 208 "nr_requested", "nr_scanned", "nr_skipped", "nr_taken", 209 209 "lru"); 210 210 $regex_lru_shrink_inactive = generate_traceevent_regex( ··· 379 379 print " $regex_lru_isolate/o\n"; 380 380 next; 381 381 } 382 - my $nr_scanned = $5; 383 - my $lru = $8; 382 + my $nr_scanned = $4; 383 + my $lru = $7; 384 384 385 385 # To closer match vmstat scanning statistics, only count 386 386 # inactive lru as scanning
-2
include/linux/mmzone.h
··· 639 639 #endif 640 640 }; 641 641 642 - /* Isolate unmapped pages */ 643 - #define ISOLATE_UNMAPPED ((__force isolate_mode_t)0x2) 644 642 /* Isolate for asynchronous migration */ 645 643 #define ISOLATE_ASYNC_MIGRATE ((__force isolate_mode_t)0x4) 646 644 /* Isolate unevictable pages */
+2 -6
include/trace/events/vmscan.h
··· 285 285 unsigned long nr_scanned, 286 286 unsigned long nr_skipped, 287 287 unsigned long nr_taken, 288 - isolate_mode_t isolate_mode, 289 288 int lru), 290 289 291 - TP_ARGS(highest_zoneidx, order, nr_requested, nr_scanned, nr_skipped, nr_taken, isolate_mode, lru), 290 + TP_ARGS(highest_zoneidx, order, nr_requested, nr_scanned, nr_skipped, nr_taken, lru), 292 291 293 292 TP_STRUCT__entry( 294 293 __field(int, highest_zoneidx) ··· 296 297 __field(unsigned long, nr_scanned) 297 298 __field(unsigned long, nr_skipped) 298 299 __field(unsigned long, nr_taken) 299 - __field(unsigned int, isolate_mode) 300 300 __field(int, lru) 301 301 ), 302 302 ··· 306 308 __entry->nr_scanned = nr_scanned; 307 309 __entry->nr_skipped = nr_skipped; 308 310 __entry->nr_taken = nr_taken; 309 - __entry->isolate_mode = (__force unsigned int)isolate_mode; 310 311 __entry->lru = lru; 311 312 ), 312 313 ··· 313 316 * classzone is previous name of the highest_zoneidx. 314 317 * Reason not to change it is the ABI requirement of the tracepoint. 315 318 */ 316 - TP_printk("isolate_mode=%d classzone=%d order=%d nr_requested=%lu nr_scanned=%lu nr_skipped=%lu nr_taken=%lu lru=%s", 317 - __entry->isolate_mode, 319 + TP_printk("classzone=%d order=%d nr_requested=%lu nr_scanned=%lu nr_skipped=%lu nr_taken=%lu lru=%s", 318 320 __entry->highest_zoneidx, 319 321 __entry->order, 320 322 __entry->nr_requested,
+1 -2
mm/vmscan.c
··· 1689 1689 } 1690 1690 *nr_scanned = total_scan; 1691 1691 trace_mm_vmscan_lru_isolate(sc->reclaim_idx, sc->order, nr_to_scan, 1692 - total_scan, skipped, nr_taken, 1693 - sc->may_unmap ? 0 : ISOLATE_UNMAPPED, lru); 1692 + total_scan, skipped, nr_taken, lru); 1694 1693 update_lru_sizes(lruvec, lru, nr_zone_taken); 1695 1694 return nr_taken; 1696 1695 }