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

Configure Feed

Select the types of activity you want to include in your feed.

mm: use self-explanatory macros rather than "2"

Signed-off-by: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Shi <alex.shi@linux.alibaba.com>
Link: http://lkml.kernel.org/r/20200831175042.3527153-2-yuzhao@google.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Yu Zhao and committed by
Linus Torvalds
ed017373 955cc774

+10 -6
+8 -4
include/linux/mmzone.h
··· 266 266 return (lru == LRU_ACTIVE_ANON || lru == LRU_ACTIVE_FILE); 267 267 } 268 268 269 + #define ANON_AND_FILE 2 270 + 269 271 enum lruvec_flags { 270 272 LRUVEC_CONGESTED, /* lruvec has many dirty pages 271 273 * backed by a congested BDI ··· 285 283 unsigned long file_cost; 286 284 /* Non-resident age, driven by LRU movement */ 287 285 atomic_long_t nonresident_age; 288 - /* Refaults at the time of last reclaim cycle, anon=0, file=1 */ 289 - unsigned long refaults[2]; 286 + /* Refaults at the time of last reclaim cycle */ 287 + unsigned long refaults[ANON_AND_FILE]; 290 288 /* Various lruvec state flags (enum lruvec_flags) */ 291 289 unsigned long flags; 292 290 #ifdef CONFIG_MEMCG ··· 443 441 444 442 #ifndef __GENERATING_BOUNDS_H 445 443 444 + #define ASYNC_AND_SYNC 2 445 + 446 446 struct zone { 447 447 /* Read-mostly fields */ 448 448 ··· 564 560 #if defined CONFIG_COMPACTION || defined CONFIG_CMA 565 561 /* pfn where compaction free scanner should start */ 566 562 unsigned long compact_cached_free_pfn; 567 - /* pfn where async and sync compaction migration scanner should start */ 568 - unsigned long compact_cached_migrate_pfn[2]; 563 + /* pfn where compaction migration scanner should start */ 564 + unsigned long compact_cached_migrate_pfn[ASYNC_AND_SYNC]; 569 565 unsigned long compact_init_migrate_pfn; 570 566 unsigned long compact_init_free_pfn; 571 567 #endif
+1 -1
include/linux/vmstat.h
··· 28 28 unsigned nr_writeback; 29 29 unsigned nr_immediate; 30 30 unsigned nr_pageout; 31 - unsigned nr_activate[2]; 31 + unsigned nr_activate[ANON_AND_FILE]; 32 32 unsigned nr_ref_keep; 33 33 unsigned nr_unmap_fail; 34 34 unsigned nr_lazyfree_fail;
+1 -1
mm/vmscan.c
··· 2239 2239 struct mem_cgroup *memcg = lruvec_memcg(lruvec); 2240 2240 unsigned long anon_cost, file_cost, total_cost; 2241 2241 int swappiness = mem_cgroup_swappiness(memcg); 2242 - u64 fraction[2]; 2242 + u64 fraction[ANON_AND_FILE]; 2243 2243 u64 denominator = 0; /* gcc */ 2244 2244 enum scan_balance scan_balance; 2245 2245 unsigned long ap, fp;