Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp498151imn; Wed, 27 Jul 2022 11:54:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tFl2fZe9qgYg83dX1reTfI5h4wnanfDb5HiAcfVj0oLCXcQ8OEpawF67wc8fHqvMsKYm7d X-Received: by 2002:a05:6402:2d5:b0:43b:d73d:39b0 with SMTP id b21-20020a05640202d500b0043bd73d39b0mr24496125edx.208.1658948066658; Wed, 27 Jul 2022 11:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658948066; cv=none; d=google.com; s=arc-20160816; b=JYmnmzm5rD+rNhzWxoc+mrkbL4F3PS7fsqzyt+9v4aLCisEcqtvOEmRqKXdHHGF5LK +CHY8sRjt+XeQnu3oNXCiFWZdxOGJwH427jnmMg3pTgh7/YGpOV+sFxCR/mXCGjU/qMO KQMx+M+73Adz0NAJWt+v07jSEdmPtUCB5IXGLPI9OhCpWNPHEs9TnEQ3QJ9PkJ67+7bX bM6fKHt1Aba4RGSwmzqcNrA5twuXpIsNqiozF0xiWRoe9P0fF9/YJTstI4Ez+wTAkhg4 /5Y6OLitBIfJFZqycDf7iCZ/r/VbGLH6+FLJjzI+WbIN2INMVoJm1ejrDpVXXR5BCOBh RKAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KV4pTtR2n1CBnhPbzAjbGQVe/3XOIXmoaN4bkURCqMM=; b=QrVfXik56qhfIDBodyfMAjusY4+Ns1Xew5rNTKhrt775HUk+vqtWdiXDVJXQ6q5xPB 1dfGt2yhWrrJiVtBcfXWBp49H84E/eq4q/eultTefFvpr2xHJPKvB2UwhCHvzvDY88HR CiAin1oruOXCal+RbE6pP5PXsqJHweJu/wSn2TsMdph+UDCZ9Mn7Z3Ddw82ksdOcKZkr Jl6oNyaUbm9iqbipokdE/EmyyyhaWTRF+KNOV87N6ykwkBYV48nmrJeBN+OghiEZvgsv +18499/crgiJ7rTyZRv1GG/U/pSnXj1gdlW9Cqxa7WBKiSNoWaf8Om7DvanK6gUwsxy1 KlDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uJ76krb9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc40-20020a1709078a2800b0072efd2ebeecsi22826916ejc.785.2022.07.27.11.54.01; Wed, 27 Jul 2022 11:54:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uJ76krb9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241480AbiG0RHb (ORCPT + 99 others); Wed, 27 Jul 2022 13:07:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241466AbiG0RHA (ORCPT ); Wed, 27 Jul 2022 13:07:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D86171712; Wed, 27 Jul 2022 09:39:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 24E7160D3F; Wed, 27 Jul 2022 16:39:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0317AC433D6; Wed, 27 Jul 2022 16:39:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658939998; bh=ogRQLmRcUxAnHMtNQRsc6RmOSVJ3DdWt26BXgbblRnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uJ76krb92Bhy8aVulxkHE5v+am4CyGXleRLVjOacak/LrnPRr6u73g25hofO1l4XD KO7XoKpw9MvdBdHT2KMxWKJLGvdZkTD9n3mhi65ZTNduTQdONTDESlBVFd4JxA6lCa JWB8whm4KBHUW/czlL1Q83naPDrlcR8SRiEhaJlY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Suren Baghdasaryan , Johannes Weiner , Michal Hocko , Lukas Middendorf , Antti Palosaari , Luis Chamberlain , Kees Cook , Iurii Zaikin , Dave Hansen , Vlastimil Babka , Mel Gorman , Jonathan Corbet , Zhang Yi , Fengfei Xi , Mike Rapoport , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 5.15 039/201] mm/pagealloc: sysctl: change watermark_scale_factor max limit to 30% Date: Wed, 27 Jul 2022 18:09:03 +0200 Message-Id: <20220727161028.485121602@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220727161026.977588183@linuxfoundation.org> References: <20220727161026.977588183@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suren Baghdasaryan [ Upstream commit 39c65a94cd9661532be150e88f8b02f4a6844a35 ] For embedded systems with low total memory, having to run applications with relatively large memory requirements, 10% max limitation for watermark_scale_factor poses an issue of triggering direct reclaim every time such application is started. This results in slow application startup times and bad end-user experience. By increasing watermark_scale_factor max limit we allow vendors more flexibility to choose the right level of kswapd aggressiveness for their device and workload requirements. Link: https://lkml.kernel.org/r/20211124193604.2758863-1-surenb@google.com Signed-off-by: Suren Baghdasaryan Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Lukas Middendorf Cc: Antti Palosaari Cc: Luis Chamberlain Cc: Kees Cook Cc: Iurii Zaikin Cc: Dave Hansen Cc: Vlastimil Babka Cc: Mel Gorman Cc: Jonathan Corbet Cc: Zhang Yi Cc: Fengfei Xi Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- Documentation/admin-guide/sysctl/vm.rst | 2 +- kernel/sysctl.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/sysctl/vm.rst b/Documentation/admin-guide/sysctl/vm.rst index 5e795202111f..f4804ce37c58 100644 --- a/Documentation/admin-guide/sysctl/vm.rst +++ b/Documentation/admin-guide/sysctl/vm.rst @@ -948,7 +948,7 @@ how much memory needs to be free before kswapd goes back to sleep. The unit is in fractions of 10,000. The default value of 10 means the distances between watermarks are 0.1% of the available memory in the -node/system. The maximum value is 1000, or 10% of memory. +node/system. The maximum value is 3000, or 30% of memory. A high rate of threads entering direct reclaim (allocstall) or kswapd going to sleep prematurely (kswapd_low_wmark_hit_quickly) can indicate diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 25c18b2df684..347a90a878b3 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -122,6 +122,7 @@ static unsigned long long_max = LONG_MAX; static int one_hundred = 100; static int two_hundred = 200; static int one_thousand = 1000; +static int three_thousand = 3000; #ifdef CONFIG_PRINTK static int ten_thousand = 10000; #endif @@ -2971,7 +2972,7 @@ static struct ctl_table vm_table[] = { .mode = 0644, .proc_handler = watermark_scale_factor_sysctl_handler, .extra1 = SYSCTL_ONE, - .extra2 = &one_thousand, + .extra2 = &three_thousand, }, { .procname = "percpu_pagelist_high_fraction", -- 2.35.1