linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Huang\, Ying" <ying.huang@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Huang, Ying" <ying.huang@intel.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Johannes Weiner <hannes@cmpxchg.org>,
	Minchan Kim <minchan@kernel.org>, Rik van Riel <riel@redhat.com>,
	Shaohua Li <shli@kernel.org>, Hugh Dickins <hughd@google.com>,
	Fengguang Wu <fengguang.wu@intel.com>,
	Tim Chen <tim.c.chen@intel.com>,
	Dave Hansen <dave.hansen@intel.com>
Subject: Re: [PATCH -mm -v4 1/5] mm, swap: Add swap readahead hit statistics
Date: Thu, 10 Aug 2017 07:17:30 +0800	[thread overview]
Message-ID: <87valwz5yt.fsf@yhuang-mobile.sh.intel.com> (raw)
In-Reply-To: <20170809145042.46398074c40e95a8827b9bdf@linux-foundation.org> (Andrew Morton's message of "Wed, 9 Aug 2017 14:50:42 -0700")

Andrew Morton <akpm@linux-foundation.org> writes:

> On Mon,  7 Aug 2017 13:40:34 +0800 "Huang, Ying" <ying.huang@intel.com> wrote:
>
>> From: Huang Ying <ying.huang@intel.com>
>> 
>> 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 algorithm and parameters could be tuned
>> accordingly.
>> 
>> ...
>>
>> --- a/include/linux/vm_event_item.h
>> +++ b/include/linux/vm_event_item.h
>> @@ -106,6 +106,8 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
>>  		VMACACHE_FIND_HITS,
>>  		VMACACHE_FULL_FLUSHES,
>>  #endif
>> +		SWAP_RA,
>> +		SWAP_RA_HIT,
>>  		NR_VM_EVENT_ITEMS
>>  };
>
> swap_state.o isn't even compiled if CONFIG_SWAP=n so there doesn't seem
> much point in displaying these?

Oh, Yes!  Thanks for pointing this out.

Best Regards,
Huang, Ying

> --- a/include/linux/vm_event_item.h~mm-swap-add-swap-readahead-hit-statistics-fix
> +++ a/include/linux/vm_event_item.h
> @@ -106,8 +106,10 @@ enum vm_event_item { PGPGIN, PGPGOUT, PS
>  		VMACACHE_FIND_HITS,
>  		VMACACHE_FULL_FLUSHES,
>  #endif
> +#ifdef CONFIG_SWAP
>  		SWAP_RA,
>  		SWAP_RA_HIT,
> +#endif
>  		NR_VM_EVENT_ITEMS
>  };
>  
> --- a/mm/vmstat.c~mm-swap-add-swap-readahead-hit-statistics-fix
> +++ a/mm/vmstat.c
> @@ -1098,9 +1098,10 @@ const char * const vmstat_text[] = {
>  	"vmacache_find_hits",
>  	"vmacache_full_flushes",
>  #endif
> -
> +#ifdef CONFIG_SWAP
>  	"swap_ra",
>  	"swap_ra_hit",
> +#endif
>  #endif /* CONFIG_VM_EVENTS_COUNTERS */
>  };
>  #endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA */
> _

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-08-09 23:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07  5:40 [PATCH -mm -v4 0/5] mm, swap: VMA based swap readahead Huang, Ying
2017-08-07  5:40 ` [PATCH -mm -v4 1/5] mm, swap: Add swap readahead hit statistics Huang, Ying
2017-08-09 21:50   ` Andrew Morton
2017-08-09 23:17     ` Huang, Ying [this message]
2017-08-07  5:40 ` [PATCH -mm -v4 2/5] mm, swap: Fix swap readahead marking Huang, Ying
2017-08-07  5:40 ` [PATCH -mm -v4 3/5] mm, swap: VMA based swap readahead Huang, Ying
2017-09-13  1:40   ` Minchan Kim
2017-09-13 21:02     ` Andrew Morton
2017-09-14  0:53       ` Huang, Ying
2017-09-14  8:15         ` Minchan Kim
2017-09-14  7:53       ` Minchan Kim
2017-09-14 12:01         ` Huang, Ying
2017-09-14 13:14           ` Minchan Kim
2017-09-14 21:21             ` Andrew Morton
2017-09-15  3:15             ` Huang, Ying
2017-09-15  3:42               ` Minchan Kim
2017-09-15  4:46                 ` Huang, Ying
2017-08-07  5:40 ` [PATCH -mm -v4 4/5] mm, swap: Add sysfs interface for " Huang, Ying
2017-08-07  5:40 ` [PATCH -mm -v4 5/5] mm, swap: Don't use VMA based swap readahead if HDD is used as swap Huang, Ying

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87valwz5yt.fsf@yhuang-mobile.sh.intel.com \
    --to=ying.huang@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=fengguang.wu@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=riel@redhat.com \
    --cc=shli@kernel.org \
    --cc=tim.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox