From patchwork Mon Jan 27 21:50:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBDxYJhcGnFhHNraQ==?= X-Patchwork-Id: 13951752 Return-Path: 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 CC5B8C02188 for ; Mon, 27 Jan 2025 21:50:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3F5ED2801B4; Mon, 27 Jan 2025 16:50:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3A634280163; Mon, 27 Jan 2025 16:50:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1F76A2801B4; Mon, 27 Jan 2025 16:50:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id F377F280163 for ; Mon, 27 Jan 2025 16:50:32 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id A69CE1C7674 for ; Mon, 27 Jan 2025 21:50:32 +0000 (UTC) X-FDA: 83054576304.10.2FAC895 Received: from mail-ej1-f73.google.com (mail-ej1-f73.google.com [209.85.218.73]) by imf20.hostedemail.com (Postfix) with ESMTP id DA7A51C0013 for ; Mon, 27 Jan 2025 21:50:30 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=dphPqxGX; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf20.hostedemail.com: domain of 3pf-XZwoKCEgwmvkzsx2usqyyqvo.mywvsx47-wwu5kmu.y1q@flex--mclapinski.bounces.google.com designates 209.85.218.73 as permitted sender) smtp.mailfrom=3pf-XZwoKCEgwmvkzsx2usqyyqvo.mywvsx47-wwu5kmu.y1q@flex--mclapinski.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738014631; a=rsa-sha256; cv=none; b=2C8CLizXZY7ITuB9tXjbO1CmyhlY5Iw6Ze6zpnyd6e52ZWdHHGdnAujoquWMmJsborzrLC bvfillDUF1h17QxqKu7ygG5dQDKvkAj9/hG4pYsweEzn4cc7Ox5TviQl6V+mbU7+7qnWjd Mypyu4M7cEwlR5KQwN6k4Q/bOcH4YnU= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=dphPqxGX; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf20.hostedemail.com: domain of 3pf-XZwoKCEgwmvkzsx2usqyyqvo.mywvsx47-wwu5kmu.y1q@flex--mclapinski.bounces.google.com designates 209.85.218.73 as permitted sender) smtp.mailfrom=3pf-XZwoKCEgwmvkzsx2usqyyqvo.mywvsx47-wwu5kmu.y1q@flex--mclapinski.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738014631; 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=MTdaJMw+GE/ToWZXQwf98N8OcNSfcH4MlIjaDI1DCcU=; b=2JpcQAvpMS7n4YgOthPwrSHjz3N/y3Svm+FD0AOjCk+o6qb5xc1wlrA5FMj44f3H0+ldlD 6aqb6mw11wRxzOSNHaD6VefP21GmMiJuyOf8tu/7VqkaGnDA4bLeXq8Yaj4HsPD1dHYvIh gi4MGWx1sIDDtAVhuN6o1I2fgnSSfl0= Received: by mail-ej1-f73.google.com with SMTP id a640c23a62f3a-aa63b02c69cso516517866b.0 for ; Mon, 27 Jan 2025 13:50:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1738014629; x=1738619429; 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=MTdaJMw+GE/ToWZXQwf98N8OcNSfcH4MlIjaDI1DCcU=; b=dphPqxGXq0is69aznkVk1c2vyn+VsfALZ9adX3hOEvaKNyUk/sattw3MBR2fl3skZh XwWUj3fa5pXUlxDJmkjtCyfPO8oe2Wz3kPXtXs2N0XoMS4c84Mx002Dws9HG0a8tqKBl qfpKMYIqsAiBMK24lVhXSwk2kZMWt9Fi3dxePNpoMKWNLFLeV4iRJi0eAQ/i6SZE3x9s K0YQvAbtlC6NPz24gWIzAastQU0vMxXPzRA1V+oTlAlYIoEJaZNbCmcmZqrxOV4AZs7p fs+YBybp6NjIBtds2GLZpBz/d/4sFE4A4K36+eP9D1pWfETtAVl0dDyAalnxYYoQvlXY iH5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738014629; x=1738619429; 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=MTdaJMw+GE/ToWZXQwf98N8OcNSfcH4MlIjaDI1DCcU=; b=GOe2Nx4XpSlY8tjYgjH+demlV5QRX2x9aGJnuFMgbJOe9wCB5/7XWe1l2c+1OF1YHF GwlYzgISyZBQuccczIQ3d3Rjrfin8b0axnDx6HiUzERqbeHpXExMOeyCcp2lfYI4YVlW p94hx8LNspTPw/vlShGv3tJ36qOxd9qJcUTmnXpXT1Foa+ss1cjv80qamDc6xQxrC12M wzmSNU7m7QlvNpwuengQ8QvoGnxeKoo8FdPlMfLfevXn+mn4/tAnwV4mU2C7F4lE4mRi amJxNfik3+C5JGrJm11jDCBm8mn83tSkPVHsAHWa37mPHb2CgOTqZkvJs51IUjXF0zF1 mCGg== X-Gm-Message-State: AOJu0YyzPY3k/zkgoLDCU076Cwu9TzrqrHXiJ5FWLyAfSYZ27OhvWz/l D3pC0Padu3idwaBVRj1kvU3lhkUx2ZWm+4kY0cWtV9XXJVWkbw+NGHpQVLI9YkQjrL+3giDgI/4 t8chxCaoDpNlwaFuIYA== X-Google-Smtp-Source: AGHT+IEZ97Jrd+XbhDMk2Rlpya1DB4YXBpa+0gMNH2ryXyYrsEg4Wyx9e7mEhh9FRPyIxeIP94pTyP8woXLmR7rg X-Received: from ejrv14.prod.google.com ([2002:a17:906:564e:b0:aa6:7b6b:b0c8]) (user=mclapinski job=prod-delivery.src-stubby-dispatcher) by 2002:a17:906:1e57:b0:ab3:a352:eb0f with SMTP id a640c23a62f3a-ab6bbb6be69mr81943166b.30.1738014629505; Mon, 27 Jan 2025 13:50:29 -0800 (PST) Date: Mon, 27 Jan 2025 22:50:19 +0100 In-Reply-To: <20250127215020.4023545-1-mclapinski@google.com> Mime-Version: 1.0 References: <20250127215020.4023545-1-mclapinski@google.com> X-Mailer: git-send-email 2.48.1.262.g85cc9f2d1e-goog Message-ID: <20250127215020.4023545-2-mclapinski@google.com> Subject: [PATCH v3 1/2] mm/compaction: remove low watermark cap for proactive compaction From: Michal Clapinski To: Andrew Morton , Vlastimil Babka , Pasha Tatashin Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Michal Clapinski X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: DA7A51C0013 X-Stat-Signature: h55o619z67it9wqkp4a8tbrzhqbd3yz3 X-Rspam-User: X-HE-Tag: 1738014630-784988 X-HE-Meta: U2FsdGVkX19WAx4UTh8MTLqTEGPkGbs1fDwnBRU1aT6eaee1fpC9v0qjgh/eRuLNHLcmDIY1VjVs8i6N5EO+7OWVfQACcs+oOoY8Q+bhkhChqS/Ki4NLwmqq0m4JR/CcmMLeXjwEuSoiG8RRgZL7alaJe1ILQ5AMUjVycPussvVRl9W5FjN9bNNvySKwfCaRDHi/uDhyKGQgJ7yaF8tFm1+SV4AEzQ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xnZ6N2Gy9qFipfemR5u4NcJaTKX0ChtBDbCFDbGCiB0Gm4I85vHvLZuWLySus/Wzw7NSW9tN7iDXya1XzXfSV+/PAEQJUvjuc9859kp/aepOi+va0sSn1JDQichrJO0JE8ZFisTQsjEMVJf5YdSbEYWSTNFtEaVD0H0ORsCUQ7jUD3sAq0hgUbe7/DGEJJKrF2f7PR3u0GKKrj2E/IacEylW/q+vte49io22TnzIJMT4mh3sWTfPHW31Mo1hr54y1ywQDOAkcn6lj5IOrKVrgb 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: List-Subscribe: List-Unsubscribe: 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 (20GB of memory) has been perfectly fine with proactiveness set to 100 and leeway set to 0. Signed-off-by: Michal Clapinski --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/compaction.c b/mm/compaction.c index a2b16b08cbbff..29524242a16ef 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -2253,7 +2253,7 @@ static unsigned int fragmentation_score_wmark(bool low) * 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); }