linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: John Hubbard <jhubbard@nvidia.com>,
	Joel Savitz <jsavitz@redhat.com>,
	linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Rafael Aquini <aquini@redhat.com>,
	linux-mm@kvack.org
Subject: Re: [PATCH] mm/page_alloc: increase default min_free_kbytes bound
Date: Thu, 27 Feb 2020 13:45:57 +0100	[thread overview]
Message-ID: <bd3f55cd-7aaa-f99f-1e85-dcc0072d0ae3@suse.cz> (raw)
In-Reply-To: <4778f04b-7ff0-0648-1ff9-dd02c79f45ea@nvidia.com>

On 2/21/20 2:53 AM, John Hubbard wrote:
> On 2/20/20 7:01 AM, Joel Savitz wrote:
>> 
>> Currently, the vm.min_free_kbytes sysctl value is capped at a hardcoded
>> 64M in init_per_zone_wmark_min (unless it is overridden by khugepaged
>> initialization).
>> 
>> This value has not been modified since 2005, and enterprise-grade
>> systems now frequently have hundreds of GB of RAM and multiple 10, 40,
>> or even 100 GB NICs. We have seen page allocation failures on heavily
>> loaded systems related to NIC drivers. These issues were resolved by an
>> increase to vm.min_free_kbytes.
>> 
>> This patch increases the hardcoded value by a factor of 4 as a temporary
>> solution.
>> 
>> Further work to make the calculation of vm.min_free_kbytes more
>> consistent throughout the kernel would be desirable.
>> 
>> As an example of the inconsistency of the current method, this value is
>> recalculated by init_per_zone_wmark_min() in the case of memory hotplug
>> which will override the value set by set_recommended_min_free_kbytes()
>> called during khugepaged initialization even if khugepaged remains
>> enabled, however an on/off toggle of khugepaged will then recalculate
>> and set the value via set_recommended_min_free_kbytes().
>> 
>> Signed-off-by: Joel Savitz <jsavitz@redhat.com>
>> ---
>>  mm/page_alloc.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> index 3c4eb750a199..32cbfb13e958 100644
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -7867,8 +7867,8 @@ int __meminit init_per_zone_wmark_min(void)
>>  		min_free_kbytes = new_min_free_kbytes;
>>  		if (min_free_kbytes < 128)
>>  			min_free_kbytes = 128;
>> -		if (min_free_kbytes > 65536)
>> -			min_free_kbytes = 65536;
>> +		if (min_free_kbytes > 262144)
>> +			min_free_kbytes = 262144;
> 
> 
> Would it be any better to at least use symbols, instead of numbers, in the
> routine? Like this:

+1

Thanks


      reply	other threads:[~2020-02-27 12:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 15:01 Joel Savitz
2020-02-21  0:40 ` Andrew Morton
2020-02-21  1:27 ` Mike Kravetz
2020-02-21  1:53 ` John Hubbard
2020-02-27 12:45   ` Vlastimil Babka [this message]

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=bd3f55cd-7aaa-f99f-1e85-dcc0072d0ae3@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=aquini@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=jsavitz@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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