Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1738751

Re: [PATCH] mm, swap: Make VMA based swap readahead configurable

Path csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod
From "Huang\, Ying" <ying.huang@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mm, swap: Make VMA based swap readahead configurable
Date Mon, 25 Sep 2017 08:00:01 +0200
Message-ID <utuAV-287-3@gated-at.bofh.it> (permalink)
References <urYD7-2va-7@gated-at.bofh.it> <uturf-24v-1@gated-at.bofh.it>
X-Extloop1 1
X-Ironport-Av E=Sophos;i="5.42,435,1500966000"; d="scan'208";a="1198611554"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version 1.0
Content-Type text/plain; charset=ascii
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 73
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Mon, 25 Sep 2017 13:54:42 +0800
X-Original-Message-ID <87bmlze319.fsf@yhuang-dev.intel.com>
X-Original-References <20170921013310.31348-1-ying.huang@intel.com> <20170925054133.GB27410@bbox>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1738751

Show key headers only | View raw


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.

>> +
>> +	  If set to no, the original physical swap readahead will be
>> +	  used.
>
> In here, could you point out kindly somewhere where describes two
> readahead algorithm in the system?
>
> I don't mean we should explain how it works. Rather than, there are
> two parallel algorithm in swap readahead.
>
> Anonymous memory works based on VMA while shm works based on physical
> block. There are working separately on parallel. Each of knobs are
> vma_ra_max_order and page-cluster, blah, blah.

Sure.  I will add some description about that somewhere.

>> +
>> +	  If unsure, say Y to enable VMA based swap readahead.
>> +
>>  config	TRANSPARENT_HUGE_PAGECACHE
>>  	def_bool y
>>  	depends on TRANSPARENT_HUGEPAGE

[snip]

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mm, swap: Make VMA based swap readahead configurable "Huang, Ying" <ying.huang@intel.com> - 2017-09-21 03:40 +0200
  Re: [PATCH] mm, swap: Make VMA based swap readahead configurable Minchan Kim <minchan@kernel.org> - 2017-09-25 07:50 +0200
    Re: [PATCH] mm, swap: Make VMA based swap readahead configurable "Huang\, Ying" <ying.huang@intel.com> - 2017-09-25 08:00 +0200
      Re: [PATCH] mm, swap: Make VMA based swap readahead configurable Minchan Kim <minchan@kernel.org> - 2017-09-25 08:20 +0200
        Re: [PATCH] mm, swap: Make VMA based swap readahead configurable "Huang\, Ying" <ying.huang@intel.com> - 2017-09-25 08:30 +0200
          Re: [PATCH] mm, swap: Make VMA based swap readahead configurable Minchan Kim <minchan@kernel.org> - 2017-09-25 08:40 +0200
  Re: [PATCH] mm, swap: Make VMA based swap readahead configurable Michal Hocko <mhocko@kernel.org> - 2017-09-26 15:30 +0200

csiph-web