From: "Huang\, Ying" <ying.huang@intel.com>
To: Minchan Kim <minchan@kernel.org>
Cc: "Huang, Ying" <ying.huang@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.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, swap: Make VMA based swap readahead configurable
Date: Mon, 25 Sep 2017 14:24:46 +0800 [thread overview]
Message-ID: <87377be1n5.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <20170925061734.GA27678@bbox> (Minchan Kim's message of "Mon, 25 Sep 2017 15:17:34 +0900")
Minchan Kim <minchan@kernel.org> writes:
> On Mon, Sep 25, 2017 at 01:54:42PM +0800, Huang, Ying wrote:
>> Hi, Minchan,
>>
>> Minchan Kim <minchan@kernel.org> writes:
>>
>> > Hi Huang,
>> >
>> > On Thu, Sep 21, 2017 at 09:33:10AM +0800, Huang, Ying wrote:
>> >> From: Huang Ying <ying.huang@intel.com>
>>
>> [snip]
>>
>> >> diff --git a/mm/Kconfig b/mm/Kconfig
>> >> index 9c4bdddd80c2..e62c8e2e34ef 100644
>> >> --- a/mm/Kconfig
>> >> +++ b/mm/Kconfig
>> >> @@ -434,6 +434,26 @@ config THP_SWAP
>> >>
>> >> For selection by architectures with reasonable THP sizes.
>> >>
>> >> +config VMA_SWAP_READAHEAD
>> >> + bool "VMA based swap readahead"
>> >> + depends on SWAP
>> >> + default y
>> >> + help
>> >> + VMA based swap readahead detects page accessing pattern in a
>> >> + VMA and adjust the swap readahead window for pages in the
>> >> + VMA accordingly. It works better for more complex workload
>> >> + compared with the original physical swap readahead.
>> >> +
>> >> + It can be controlled via the following sysfs interface,
>> >> +
>> >> + /sys/kernel/mm/swap/vma_ra_enabled
>> >> + /sys/kernel/mm/swap/vma_ra_max_order
>> >
>> > It might be better to discuss in other thread but if you mention new
>> > interface here again, I will discuss it here.
>> >
>> > We are creating new ABI in here so I want to ask question in here.
>> >
>> > Did you consier to use /sys/block/xxx/queue/read_ahead_kb for the
>> > swap readahead knob? Reusing such common/consistent knob would be better
>> > than adding new separate konb.
>>
>> The problem is that the configuration of VMA based swap readahead is
>> global instead of block device specific. And because it works in
>> virtual way, that is, the swap blocks on the different block devices may
>> be readahead together. It's a little hard to use the block device
>> specific configuration.
>
> Fair enough. page-cluster from the beginning should have been like that
> instead of vma_ra_max_order.
>
> One more questions: Do we need separate vma_ra_enable?
>
> Can't we disable it via echo 0 > /sys/kernel/mm/swap/vma_ra_max_order
> like page-cluster?
The difference is,
vma_ra_eanble: 0
=> use original physical swap readahead
vma_ra_enable: 1 && vma_ra_max_order: 0
=> use VMA based swap readahead and disable the readahead.
Best Regards,
Huang, Ying
--
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>
next prev parent reply other threads:[~2017-09-25 6:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 1:33 [PATCH] mm, swap: Make VMA based swap readahead configurable Huang, Ying
2017-09-25 5:41 ` Minchan Kim
2017-09-25 5:54 ` Huang, Ying
2017-09-25 6:17 ` Minchan Kim
2017-09-25 6:24 ` Huang, Ying [this message]
2017-09-25 6:30 ` Minchan Kim
2017-09-26 13:21 ` Michal Hocko
2017-09-27 1:36 ` Huang, Ying
2017-09-27 5:04 ` Minchan Kim
2017-09-27 7:48 ` Michal Hocko
2017-09-27 8:04 ` Minchan Kim
2017-09-27 8:35 ` Michal Hocko
2017-09-27 13:15 ` Minchan Kim
2017-09-27 13:22 ` Michal Hocko
2017-09-27 13:41 ` Minchan Kim
2017-09-27 13:50 ` Michal Hocko
2017-09-27 14:10 ` Minchan Kim
2017-09-27 14:17 ` Michal Hocko
2017-09-28 1:02 ` Huang, Ying
2017-10-02 7:23 ` Michal Hocko
2017-10-02 15:45 ` Dave Hansen
2017-10-02 21:49 ` Andrew Morton
2017-10-06 12:28 ` 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=87377be1n5.fsf@yhuang-dev.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;
as well as URLs for NNTP newsgroup(s).