Message ID | 20250404111103.1994507-2-mclapinski@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38A99C36010 for <linux-mm@archiver.kernel.org>; Fri, 4 Apr 2025 11:11:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 33F686B0011; Fri, 4 Apr 2025 07:11:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2C6AE6B0012; Fri, 4 Apr 2025 07:11:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 168206B0022; Fri, 4 Apr 2025 07:11:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E59E76B0011 for <linux-mm@kvack.org>; Fri, 4 Apr 2025 07:11:33 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 0AC8E8264D for <linux-mm@kvack.org>; Fri, 4 Apr 2025 11:11:33 +0000 (UTC) X-FDA: 83296095666.14.A3D1968 Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.73]) by imf06.hostedemail.com (Postfix) with ESMTP id 587C118000C for <linux-mm@kvack.org>; Fri, 4 Apr 2025 11:11:31 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=P0YBHT7+; spf=pass (imf06.hostedemail.com: domain of 3Yb7vZwoKCOIQGPETMRWOMKSSKPI.GSQPMRYb-QQOZEGO.SVK@flex--mclapinski.bounces.google.com designates 209.85.208.73 as permitted sender) smtp.mailfrom=3Yb7vZwoKCOIQGPETMRWOMKSSKPI.GSQPMRYb-QQOZEGO.SVK@flex--mclapinski.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743765091; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=0TuGPcYbkpHDWRddmkuJsnZqAYnjFVPblguEP3A9V20=; b=Iquzigacs6gBNVn6qwKp70lX2J8gljEGMQrdS1hXXWmJbW4K0wb5/gTdAzTMgnVHlaoJgh HaCIw38VBH2BP3TzDjddD82OCuqqkLKc+Mgkf2Xoba5vRmOCGzT8fyu5VuMtAux7jCNzal Ua98I2raz1U6qwzAT7HO3abjerv/6sg= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=P0YBHT7+; spf=pass (imf06.hostedemail.com: domain of 3Yb7vZwoKCOIQGPETMRWOMKSSKPI.GSQPMRYb-QQOZEGO.SVK@flex--mclapinski.bounces.google.com designates 209.85.208.73 as permitted sender) smtp.mailfrom=3Yb7vZwoKCOIQGPETMRWOMKSSKPI.GSQPMRYb-QQOZEGO.SVK@flex--mclapinski.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743765091; a=rsa-sha256; cv=none; b=WkwUGMEYObTY95vJPrTeeTfOxfvMEL1dediQuL3paxaBViJVB417bOg9CIRmvmE3IWtw5/ 1np40tn2JFKYft2Bdxb+rbH+8ysBLU4qamAkA7OFMx4lGDo2p/9H34xzpCT6VSN1bWuEOv XcIeCrMLaFXKnZW+DJCHLZFzvhzEl9w= Received: by mail-ed1-f73.google.com with SMTP id 4fb4d7f45d1cf-5e636b06d34so1822473a12.1 for <linux-mm@kvack.org>; Fri, 04 Apr 2025 04:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1743765090; x=1744369890; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=0TuGPcYbkpHDWRddmkuJsnZqAYnjFVPblguEP3A9V20=; b=P0YBHT7+gSjeErXDyLhkAfBMZY+OO6omNTjnKQrXe1Wk1CKZiTwsFSDYU5ByflS+l6 YGdbxavJECmReYPsNgOKpfdYbWn3qnMcax/wcTVAbL6/c6ycvZOdpOwoCskDM2Dw0O5F Z2SGQ1e8sX7jqXoC1+ucCnjZkjTec0MRR6KNYsrTUp5bCdyBceyTaHjcoFnubQlw3wNS XQyHWxnrmBo6z9nsOMIvEsD9iy2CBiSpKYun4+nURZzkAbx7z4sRVYJEkD55jMVYoF9X RFpoP6eIMpaos8swDP0tL2GSQ03lftkf+uR7CfLqZhFxW314H7TMZ8guvIBYbTga5SIc d4kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743765090; x=1744369890; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0TuGPcYbkpHDWRddmkuJsnZqAYnjFVPblguEP3A9V20=; b=lhtGEXu76bbnjJrlwFBeD7AMz+LU/yZn/MgLLI0Si+YC3evCnxmxuzpUMRy6uTnggx 6KK92eNggit+XsE3W17bht7sisEQvVgcFm0Gx/1Kp7/YcMxqeejIwRxxjkIGS+YaviXG RVLIfR/6fy3R/gOEjsQDBeaVgVpf7uRD7GJ8kJvCieVPOZ8Mjj8EubX93MaLqfOCAohL M1tUcw1f4ElGxLebSyR6pmmOUXXLPSqCW9toGp13xBMGTecL2KyFbtPy69ACAdojex46 71ENtn7KIOJLJX14EDw8OAfsFAbDRvuZFhy3/VApsLfBCqrihR82wxLBtCTTmc7x7X7A BXhQ== X-Gm-Message-State: AOJu0YxwQ23wSW8Pnj0sW7aygH0C7UKD0Gr0A/g82+X5Yrz5jGjb972E BrRL+XJlRCjuy1/ufX7+hGFlyqAIpZ2bHEtC6DS51CdvAFWeeJ/wCo7BJjEuIb4A0dGpPpezSs8 xA2yuqfKIkiQGdkRmkw== X-Google-Smtp-Source: AGHT+IHdrgU8lDZx+TtRTe2b+4ez31o9X0k6eoK4oFPd7Qu1V3csMbGMUR0TqPmktPO8jbNXGxNwODfQ+f18L62M X-Received: from edbbm23.prod.google.com ([2002:a05:6402:b17:b0:5ec:d8d1:ed36]) (user=mclapinski job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:51ce:b0:5ec:cd52:27c9 with SMTP id 4fb4d7f45d1cf-5f0b66272camr1633832a12.31.1743765089689; Fri, 04 Apr 2025 04:11:29 -0700 (PDT) Date: Fri, 4 Apr 2025 13:11:02 +0200 In-Reply-To: <20250404111103.1994507-1-mclapinski@google.com> Mime-Version: 1.0 References: <20250404111103.1994507-1-mclapinski@google.com> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog Message-ID: <20250404111103.1994507-2-mclapinski@google.com> Subject: [PATCH v4 1/2] mm/compaction: remove low watermark cap for proactive compaction From: Michal Clapinski <mclapinski@google.com> To: Andrew Morton <akpm@linux-foundation.org>, Vlastimil Babka <vbabka@suse.cz>, Pasha Tatashin <tatashin@google.com> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Michal Clapinski <mclapinski@google.com> Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 587C118000C X-Stat-Signature: 4aqfpy9fu3o58p51nde5sktaud1ehtzd X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1743765091-588874 X-HE-Meta: U2FsdGVkX1+mKUrf+6jbq/Zxw9GTMatp4h1BVE7JcoIx3Wfxe8BecokPkH5i1p7S1rLJF/+mWDQnxjzERb3V9NLsGr5bRlBpghJPNiFPfRYEu4hYsRJ3JBZB1WKl/JUKr1vLWrt48U5zMqblatmmtAj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k0ej4eC6hHlxaa8rOFQP2POrBaYjF8w/ZYF9waFIhnQ39jKUV8P9TWxOw7EELLf7 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm/compaction: allow more aggressive proactive compaction
|
expand
|
diff --git a/mm/compaction.c b/mm/compaction.c index a3203d97123ea..4ff6b6e1db2da 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -2251,12 +2251,7 @@ static unsigned int fragmentation_score_wmark(bool low) { unsigned int wmark_low; - /* - * Cap the low watermark to avoid excessive compaction - * activity in case a user sets the proactiveness tunable - * close to 100 (maximum). - */ - wmark_low = max(100U - sysctl_compaction_proactiveness, 5U); + wmark_low = 100U - sysctl_compaction_proactiveness; return low ? wmark_low : min(wmark_low + 10, 100U); }
Previously a min cap of 5 has been set in the commit introducing proactive compaction. This was to make sure users don't hurt themselves by setting the proactiveness to 100 and making their system unresponsive. But the compaction mechanism has a backoff mechanism that will sleep for 30s if no progress is made, so I don't see a significant risk here. My system (19GB of memory) has been perfectly fine with both watermarks hardcoded to 0. Signed-off-by: Michal Clapinski <mclapinski@google.com> --- mm/compaction.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)