mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	mm/page_alloc.c: show watermark_boost of zone in zoneinfo
min/low/high_wmark_pages(z) is defined as (z->_watermark[WMARK_MIN/LOW/HIGH] + z->watermark_boost) If kswapd is frequently woken up due to the increase of min/low/high_wmark_pages, printing watermark_boost can quickly locate whether watermark_boost or _watermark[WMARK_MIN/LOW/HIGH] caused min/low/high_wmark_pages to increase. Link: https://lkml.kernel.org/r/1632472566-12246-1-git-send-email-liangcaifan19@gmail.com Signed-off-by: Liangcai Fan <liangcaifan19@gmail.com> Cc: Chunyan Zhang <zhang.lyra@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									8ca1b5a498
								
							
						
					
					
						commit
						a6ea8b5b9f
					
				
					 2 changed files with 4 additions and 0 deletions
				
			
		|  | @ -5993,6 +5993,7 @@ void show_free_areas(unsigned int filter, nodemask_t *nodemask) | ||||||
| 		printk(KERN_CONT | 		printk(KERN_CONT | ||||||
| 			"%s" | 			"%s" | ||||||
| 			" free:%lukB" | 			" free:%lukB" | ||||||
|  | 			" boost:%lukB" | ||||||
| 			" min:%lukB" | 			" min:%lukB" | ||||||
| 			" low:%lukB" | 			" low:%lukB" | ||||||
| 			" high:%lukB" | 			" high:%lukB" | ||||||
|  | @ -6013,6 +6014,7 @@ void show_free_areas(unsigned int filter, nodemask_t *nodemask) | ||||||
| 			"\n", | 			"\n", | ||||||
| 			zone->name, | 			zone->name, | ||||||
| 			K(zone_page_state(zone, NR_FREE_PAGES)), | 			K(zone_page_state(zone, NR_FREE_PAGES)), | ||||||
|  | 			K(zone->watermark_boost), | ||||||
| 			K(min_wmark_pages(zone)), | 			K(min_wmark_pages(zone)), | ||||||
| 			K(low_wmark_pages(zone)), | 			K(low_wmark_pages(zone)), | ||||||
| 			K(high_wmark_pages(zone)), | 			K(high_wmark_pages(zone)), | ||||||
|  |  | ||||||
|  | @ -1656,6 +1656,7 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat, | ||||||
| 	} | 	} | ||||||
| 	seq_printf(m, | 	seq_printf(m, | ||||||
| 		   "\n  pages free     %lu" | 		   "\n  pages free     %lu" | ||||||
|  | 		   "\n        boost    %lu" | ||||||
| 		   "\n        min      %lu" | 		   "\n        min      %lu" | ||||||
| 		   "\n        low      %lu" | 		   "\n        low      %lu" | ||||||
| 		   "\n        high     %lu" | 		   "\n        high     %lu" | ||||||
|  | @ -1664,6 +1665,7 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat, | ||||||
| 		   "\n        managed  %lu" | 		   "\n        managed  %lu" | ||||||
| 		   "\n        cma      %lu", | 		   "\n        cma      %lu", | ||||||
| 		   zone_page_state(zone, NR_FREE_PAGES), | 		   zone_page_state(zone, NR_FREE_PAGES), | ||||||
|  | 		   zone->watermark_boost, | ||||||
| 		   min_wmark_pages(zone), | 		   min_wmark_pages(zone), | ||||||
| 		   low_wmark_pages(zone), | 		   low_wmark_pages(zone), | ||||||
| 		   high_wmark_pages(zone), | 		   high_wmark_pages(zone), | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Liangcai Fan
						Liangcai Fan