From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE49FC4BA24 for ; Thu, 27 Feb 2020 12:46:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5A50524697 for ; Thu, 27 Feb 2020 12:46:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A50524697 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 965106B0003; Thu, 27 Feb 2020 07:46:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 916686B0005; Thu, 27 Feb 2020 07:46:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 82BA86B0006; Thu, 27 Feb 2020 07:46:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0150.hostedemail.com [216.40.44.150]) by kanga.kvack.org (Postfix) with ESMTP id 6BBB16B0003 for ; Thu, 27 Feb 2020 07:46:01 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 1F6979892 for ; Thu, 27 Feb 2020 12:46:01 +0000 (UTC) X-FDA: 76535879322.27.swim21_5195e5ca26d1b X-HE-Tag: swim21_5195e5ca26d1b X-Filterd-Recvd-Size: 3188 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Thu, 27 Feb 2020 12:46:00 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C92E2AC44; Thu, 27 Feb 2020 12:45:58 +0000 (UTC) Subject: Re: [PATCH] mm/page_alloc: increase default min_free_kbytes bound To: John Hubbard , Joel Savitz , linux-kernel@vger.kernel.org Cc: Andrew Morton , Rafael Aquini , linux-mm@kvack.org References: <20200220150103.5183-1-jsavitz@redhat.com> <4778f04b-7ff0-0648-1ff9-dd02c79f45ea@nvidia.com> From: Vlastimil Babka Message-ID: Date: Thu, 27 Feb 2020 13:45:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <4778f04b-7ff0-0648-1ff9-dd02c79f45ea@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 >> --- >> 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