From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f199.google.com (mail-qk0-f199.google.com [209.85.220.199]) by kanga.kvack.org (Postfix) with ESMTP id 7D0286B0005 for ; Mon, 19 Feb 2018 06:41:14 -0500 (EST) Received: by mail-qk0-f199.google.com with SMTP id c76so9328675qke.19 for ; Mon, 19 Feb 2018 03:41:14 -0800 (PST) Received: from aserp2130.oracle.com (aserp2130.oracle.com. [141.146.126.79]) by mx.google.com with ESMTPS id y30si3966342qtd.117.2018.02.19.03.41.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Feb 2018 03:41:13 -0800 (PST) From: Robert Harris Message-Id: <8C0380A8-56B9-43C4-9F80-996805FAE980@oracle.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_0D433A24-8820-47A1-80DF-3C3AD7B2662F" Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: [PATCH 0/1] mm, compaction: correct the bounds of __fragmentation_index() Date: Mon, 19 Feb 2018 11:40:39 +0000 In-Reply-To: <20180219082428.GC21134@dhcp22.suse.cz> References: <1518972475-11340-1-git-send-email-robert.m.harris@oracle.com> <20180219082428.GC21134@dhcp22.suse.cz> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Jonathan Corbet , Andrew Morton , Vlastimil Babka , "Kirill A. Shutemov" , Johannes Weiner , Kemi Wang , David Rientjes , Yafang Shao , Kangmin Park , Mel Gorman , Yisheng Xie , Davidlohr Bueso , Greg Kroah-Hartman , Huang Ying , Vinayak Menon --Apple-Mail=_0D433A24-8820-47A1-80DF-3C3AD7B2662F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 19 Feb 2018, at 08:24, Michal Hocko wrote: >=20 > On Sun 18-02-18 16:47:54, robert.m.harris@oracle.com = wrote: >> From: "Robert M. Harris" >>=20 >> __fragmentation_index() calculates a value used to determine whether >> compaction should be favoured over page reclaim in the event of >> allocation failure. 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. >>=20 >> Here's an illustration using a zone that I fragmented with selective >> calls to __alloc_pages() and __free_pages --- the fragmentation for >> order-1 could not be minimised further yet is reported as 0.5: >=20 > Cover letter for a single patch is usually an overkill. Why is this > information not valuable in the patch description directly? This is my first patch and I=E2=80=99m not familiar with all the = conventions. I=E2=80=99ll incorporate those details in the next version of the commit = message. Robert Harris= --Apple-Mail=_0D433A24-8820-47A1-80DF-3C3AD7B2662F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On 19 Feb 2018, at 08:24, Michal Hocko <mhocko@kernel.org> = wrote:

On Sun 18-02-18 16:47:54, 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 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.

Here's an = illustration using a zone that I fragmented with selective
calls to __alloc_pages() and __free_pages --- the = fragmentation for
order-1 could not be minimised further = yet is reported as 0.5:

Cover letter for a single patch is usually an = overkill. Why is this
information not valuable in the = patch description directly?

This = is my first patch and I=E2=80=99m not familiar with all the = conventions.
I=E2=80=99ll incorporate those details = in the next version of the commit message.

Robert Harris
= --Apple-Mail=_0D433A24-8820-47A1-80DF-3C3AD7B2662F-- -- 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: email@kvack.org