From patchwork Thu Feb 20 15:01:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Savitz X-Patchwork-Id: 11394283 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0DB0092A for ; Thu, 20 Feb 2020 15:02:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C58C1206F4 for ; Thu, 20 Feb 2020 15:02:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OF++3KBZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C58C1206F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 25C536B0005; Thu, 20 Feb 2020 10:02:16 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1E5D26B0007; Thu, 20 Feb 2020 10:02:16 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0D49D6B0008; Thu, 20 Feb 2020 10:02:16 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id E50616B0005 for ; Thu, 20 Feb 2020 10:02:15 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 82E0618068C51 for ; Thu, 20 Feb 2020 15:02:15 +0000 (UTC) X-FDA: 76510821030.29.steam88_81ea568354648 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id A5EEF180868EC for ; Thu, 20 Feb 2020 15:01:34 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,jsavitz@redhat.com,:linux-kernel@vger.kernel.org:jsavitz@redhat.com:akpm@linux-foundation.org:aquini@redhat.com:,RULES_HIT:30051:30054,0,RBL:205.139.110.120:@redhat.com:.lbl8.mailshell.net-66.10.201.10 62.18.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: steam88_81ea568354648 X-Filterd-Recvd-Size: 3793 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Thu, 20 Feb 2020 15:01:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582210892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=akPGLEa5++8awpmZaCXevB0Sy30q2hFWMSty4YYV3yA=; b=OF++3KBZFYGDvn6rU53FCVUa/+1A5juvbokajP892r9C2psV2C3L4c8VXI1X5bNhLNPNpB 1A6Bu6Q+hVBnmx345V6faXUP2zHSJ0Zc0lHUTkrWgi1QxO+8sSHRj/vomLUHCEl9X6hn+P pJgCJr/CaorvOjN2b0tOiL6pNGqopf4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-384-2zfB-8laOpmnJ97p9pu7aA-1; Thu, 20 Feb 2020 10:01:29 -0500 X-MC-Unique: 2zfB-8laOpmnJ97p9pu7aA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 32C60800D5E; Thu, 20 Feb 2020 15:01:28 +0000 (UTC) Received: from jsavitz.bos.com (dhcp-17-196.bos.redhat.com [10.18.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id CE08D1001B2C; Thu, 20 Feb 2020 15:01:23 +0000 (UTC) From: Joel Savitz To: linux-kernel@vger.kernel.org Cc: Joel Savitz , Andrew Morton , Rafael Aquini , linux-mm@kvack.org Subject: [PATCH] mm/page_alloc: increase default min_free_kbytes bound Date: Thu, 20 Feb 2020 10:01:03 -0500 Message-Id: <20200220150103.5183-1-jsavitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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: 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; } 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);