From: Robert Harris <robert.m.harris@oracle.com>
To: Mel Gorman <mgorman@suse.de>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>, Vlastimil Babka <vbabka@suse.cz>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Kemi Wang <kemi.wang@intel.com>,
David Rientjes <rientjes@google.com>,
Yafang Shao <laoar.shao@gmail.com>,
Kangmin Park <l4stpr0gr4m@gmail.com>,
Yisheng Xie <xieyisheng1@huawei.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Huang Ying <ying.huang@intel.com>,
Vinayak Menon <vinmenon@codeaurora.org>
Subject: Re: [PATCH 1/1] mm, compaction: correct the bounds of __fragmentation_index()
Date: Mon, 19 Feb 2018 14:37:02 +0000 [thread overview]
Message-ID: <EBC66026-6A17-4F90-920D-859921C7D9B9@oracle.com> (raw)
In-Reply-To: <20180219131024.oqonm6ba3pl2l4qa@suse.de>
> On 19 Feb 2018, at 13:10, Mel Gorman <mgorman@suse.de> wrote:
>
> On Mon, Feb 19, 2018 at 12:26:39PM +0000, Robert Harris wrote:
>>
>>
>>> On 19 Feb 2018, at 09:47, Mel Gorman <mgorman@suse.de> wrote:
>>>
>>> On Sun, Feb 18, 2018 at 04:47:55PM +0000, robert.m.harris@oracle.com wrote:
>>>> From: "Robert M. Harris" <robert.m.harris@oracle.com>
>>>>
>>>> __fragmentation_index() calculates a value used to determine whether
>>>> compaction should be favoured over page reclaim in the event of allocation
>>>> failure. The calculation itself is opaque and, on inspection, does not
>>>> match its existing description. The function purports to return a value
>>>> between 0 and 1000, representing units of 1/1000. Barring the case of a
>>>> pathological shortfall of memory, the lower bound is instead 500. This is
>>>> significant because it is the default value of sysctl_extfrag_threshold,
>>>> i.e. the value below which compaction should be avoided in favour of page
>>>> reclaim for costly pages.
>>>>
>>>> This patch implements and documents a modified version of the original
>>>> expression that returns a value in the range 0 <= index < 1000. It amends
>>>> the default value of sysctl_extfrag_threshold to preserve the existing
>>>> behaviour.
>>>>
>>>> Signed-off-by: Robert M. Harris <robert.m.harris@oracle.com>
>>>
>>> You have to update sysctl_extfrag_threshold as well for the new bounds.
>>
>> This patch makes its default value zero.
>>
>
> Sorry, I'm clearly blind.
>
>>> It effectively makes it a no-op but it was a no-op already and adjusting
>>> that default should be supported by data indicating it's safe.
>>
>> Would it be acceptable to demonstrate using tracing that in both the
>> pre- and post-patch cases
>>
>> 1. compaction is attempted regardless of fragmentation index,
>> excepting that
>>
>> 2. reclaim is preferred even for non-zero fragmentation during
>> an extreme shortage of memory
>>
>
> If you can demonstrate that for both reclaim-intensive and
> compaction-intensive workloads then yes. Also include the reclaim and
> compaction stats from /proc/vmstat and not just tracepoints to demonstrate
> that reclaim doesn't get out of control and reclaim the world in
> response to failed high-order allocations such as THP.
Understood. Thanks.
Robert Harris
--
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:[~2018-02-19 14:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-18 16:47 [PATCH 0/1] " robert.m.harris
2018-02-18 16:47 ` [PATCH 1/1] " robert.m.harris
2018-02-19 8:26 ` Michal Hocko
2018-02-19 12:14 ` Robert Harris
2018-02-19 12:39 ` Michal Hocko
2018-02-19 14:30 ` Robert Harris
2018-02-23 9:10 ` Michal Hocko
2018-02-23 13:40 ` Robert Harris
2018-02-23 13:52 ` Michal Hocko
2018-02-19 9:47 ` Mel Gorman
2018-02-19 12:26 ` Robert Harris
2018-02-19 13:10 ` Mel Gorman
2018-02-19 14:37 ` Robert Harris [this message]
2018-02-19 8:24 ` [PATCH 0/1] " Michal Hocko
2018-02-19 11:40 ` Robert Harris
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=EBC66026-6A17-4F90-920D-859921C7D9B9@oracle.com \
--to=robert.m.harris@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=dave@stgolabs.net \
--cc=gregkh@linuxfoundation.org \
--cc=hannes@cmpxchg.org \
--cc=kemi.wang@intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=l4stpr0gr4m@gmail.com \
--cc=laoar.shao@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
--cc=vinmenon@codeaurora.org \
--cc=xieyisheng1@huawei.com \
--cc=ying.huang@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