Re: [PATCH -mm -v2 2/6] mm, swap: Add swap readahead hit statistics

2017-07-11 Thread Huang, Ying
Dave Hansen writes: > On 06/29/2017 06:44 PM, Huang, Ying wrote: >> >> static atomic_t swapin_readahead_hits = ATOMIC_INIT(4); >> +static atomic_long_t swapin_readahead_hits_total = ATOMIC_INIT(0); >> +static atomic_long_t swapin_readahead_total = ATOMIC_INIT(0); >> >> void show_swap_cache_

Re: [PATCH -mm -v2 2/6] mm, swap: Add swap readahead hit statistics

2017-07-11 Thread Dave Hansen
On 06/29/2017 06:44 PM, Huang, Ying wrote: > > static atomic_t swapin_readahead_hits = ATOMIC_INIT(4); > +static atomic_long_t swapin_readahead_hits_total = ATOMIC_INIT(0); > +static atomic_long_t swapin_readahead_total = ATOMIC_INIT(0); > > void show_swap_cache_info(void) > { > @@ -305,8 +3

[PATCH -mm -v2 2/6] mm, swap: Add swap readahead hit statistics

2017-06-29 Thread Huang, Ying
From: Huang Ying The statistics for total readahead pages and total readahead hits are recorded and exported via the following sysfs interface. /sys/kernel/mm/swap/ra_hits /sys/kernel/mm/swap/ra_total With them, the efficiency of the swap readahead could be measured, so that the swap readahead