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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 13BC0C43331 for ; Thu, 2 Apr 2020 04:09:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C039E2074D for ; Thu, 2 Apr 2020 04:09:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="S/mXLPE2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C039E2074D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 688D28E0072; Thu, 2 Apr 2020 00:09:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 611328E000D; Thu, 2 Apr 2020 00:09:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5268F8E0072; Thu, 2 Apr 2020 00:09:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0164.hostedemail.com [216.40.44.164]) by kanga.kvack.org (Postfix) with ESMTP id 376D88E000D for ; Thu, 2 Apr 2020 00:09:46 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id F0A5B8248047 for ; Thu, 2 Apr 2020 04:09:45 +0000 (UTC) X-FDA: 76661586330.02.river64_553b27758243f X-HE-Tag: river64_553b27758243f X-Filterd-Recvd-Size: 3486 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Thu, 2 Apr 2020 04:09:45 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 922F6206E9; Thu, 2 Apr 2020 04:09:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585800584; bh=ul1FRIZObJ5TRIHKT08Jtpav0KJCZCd6X6uGjmqJ3QE=; h=Date:From:To:Subject:In-Reply-To:From; b=S/mXLPE20TlhZwsFdgdew4ofjUzsor0jf1xuTPzso+3DinriAhT4A8QCZ9QlcGWD5 lOSOJlDQ/DnbNUBSvIzBvP8ArXGV8V7O6LCLHuVk4jbJzo4+qK2AGwA8EaPVgzrA6Z VCskAB1zEdaWjNxRnFuXJ0/dlqTyDk4jT5h05iU0= Date: Wed, 01 Apr 2020 21:09:44 -0700 From: Andrew Morton To: akpm@linux-foundation.org, aquini@redhat.com, jsavitz@redhat.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 114/155] mm/page_alloc: increase default min_free_kbytes bound Message-ID: <20200402040944.GNLbwZ9bh%akpm@linux-foundation.org> In-Reply-To: <20200401210155.09e3b9742e1c6e732f5a7250@linux-foundation.org> User-Agent: s-nail v14.8.16 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: From: Joel Savitz Subject: mm/page_alloc: increase default min_free_kbytes bound 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(). Link: http://lkml.kernel.org/r/20200220150103.5183-1-jsavitz@redhat.com Signed-off-by: Joel Savitz Reviewed-by: Andrew Morton Cc: Rafael Aquini Signed-off-by: Andrew Morton --- mm/page_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/mm/page_alloc.c~mm-page_alloc-increase-default-min_free_kbytes-bound +++ a/mm/page_alloc.c @@ -7868,8 +7868,8 @@ int __meminit init_per_zone_wmark_min(vo 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; } else { pr_warn("min_free_kbytes is not updated to %d because user defined value %d is preferred\n", new_min_free_kbytes, user_min_free_kbytes); _