From patchwork Mon Feb 17 18:23:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13978434 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 3765DC021A9 for ; Mon, 17 Feb 2025 18:23:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ACB6A6B014C; Mon, 17 Feb 2025 13:23:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A7B5B6B014D; Mon, 17 Feb 2025 13:23:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9696028003F; Mon, 17 Feb 2025 13:23:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 804A76B014C for ; Mon, 17 Feb 2025 13:23:15 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 17F511C75E2 for ; Mon, 17 Feb 2025 18:23:15 +0000 (UTC) X-FDA: 83130258750.27.BF4EC6B Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf14.hostedemail.com (Postfix) with ESMTP id 883BB100012 for ; Mon, 17 Feb 2025 18:23:11 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=LLu68NYN; spf=pass (imf14.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1739816591; a=rsa-sha256; cv=none; b=z8Rfs/YAUTL63TF7o1QiqKJiywIhR+e+6WXt+850gXJ9PhLF0mfUrbY3s8eU65dcxG8L5g 6qxQaEwJIy6pX/dtfy8LzsHr9ZTT/hH03+xOHyGsFo67VRBpxHQKrmO1QHKOkQ9hgjcVK7 RyepvcGnv+mLpQTuVnSZnPKBm1ICOgk= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=LLu68NYN; spf=pass (imf14.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1739816591; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=enn6Tj6GGh1xM/AsFaeMtpn7LVu64+/b7uBqSX2y/eE=; b=Bi6NQV2/zg3zAn4c8tq9LfgWipFiQ1NxMjgY0XUxcG8SewrkabAuXwI9ELcDLdT7mKo4H5 ojK0P6BSQDb0Uk0bipsybI0i+1R97vvsHD8QnKDPqEUtUczxXNjZJgXGY/BOtoze8GZKQx gWH6zeW1gP8QDLtCgM69QWKqi/LQU4Y= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 804895C10B8; Mon, 17 Feb 2025 18:22:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6391CC4CED1; Mon, 17 Feb 2025 18:23:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739816588; bh=n7g0gJyMQcouAhbIJm6xczE9AEtKmUwr5Noo4sba+Eo=; h=From:To:Cc:Subject:Date:From; b=LLu68NYN496qBbaqRSyGErO6IEO6gRJ4Q926sHunH4ZdV3Mt5L3UM/pSsGOW62oEk ehACslGrGgnIN1+lWVzjugfZiitQXZre+zEbe6GLY4pbSz5uydItbdAasum2JcQiDf 5efrfPmdyUGzR8gMp/MysHuEVxmi11El5HTY+el8BLYPQI/f1Y2cjZzskSaM3oWgso g2Q1mCNRVh3SzmO+SXXarxxynkjblP+4o33D2CZDwVkHNWtRd3VNKpcUcjXmLwsP7u +nK/jO+Hh9Gtq6FeW1iXKTdIhegGjZTrOLCFowunMr+p6QB86RP/JuPe885gYI9DNw FP+mbNJQtbpnQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Shuah Khan , damon@lists.linux.dev, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, stable@vger.kernel.org, kernel test robot Subject: [PATCH] selftests/damon/damos_quota_goal: handle minimum quota that cannot be further reduced Date: Mon, 17 Feb 2025 10:23:04 -0800 Message-Id: <20250217182304.45215-1-sj@kernel.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-Rspamd-Queue-Id: 883BB100012 X-Stat-Signature: hwp5odz56qsxg61nqzqwxqfr5t7qz9aj X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1739816591-931642 X-HE-Meta: U2FsdGVkX1//6ENfDo03l7xhA41dGgMGCR3qrMOrjCTCSrX+1QRzOT6c8ASJ1f/eaRWnYYozAFUsbS1L0xJyxIyBtuA5+39H4uXXt122+d5fgudyh9t2DFYM3IZpj7wDsgpQ5jjfyGsjylnivnchEUwlfM1HHPPodg42CqHWvnbDyUT4Q0czNyrBwer+n2T12a17E5/roG4C+TZ+SLOJa2zOybNRlcjLRz/Hx8kdKG9Pmwvb9mL6S6H6oo7OQByb1YeQhJ/b9uwTOSXyO+g/wBwuhnSo8BxvR55WNantHBxb8ix4etDmcurG2J3/cMFctEjXcQpVJLYPEL0XGsbahwtsFgHLsH5km1whMPYPz2zbWxB0uN4vz5UDyQye7RAWFbB13V0L6Xez8pwCtLQs9UgTG6kHWRqWCf+EJXIhZJNEYNSD+KJ2xx8Z92paTyVzW93jv47jQ5Sj0DLE1iIOshTesMB2UaDWDzuzRYNuBQEg15umwwb0TpIg+f8B6i/lISeZ+F7hVm9pmdtCl54v1VptfqrQEFDmmfBVtfmCFugXGUTV4BxyP5MnlCAJskB+bV0c/XYBF1y3bEdk37DsfIDGg0ldFmFmMei28lmj3NnDDGhzku0rd13b3SRFcZC+3sQpGruWUurHTE3cPrXneldZ9LF+8NYT2WOhkg0jdO735S3DRiR1qjk282yv4tg94fHpeaxTISiJnccOts+IeoYatBsdKJNiAWMURN6I1cPkqbYN4/PI9sBvcdbvuVo9TpeiiTAnty41pFS7imNckYnY//1znwNeFVP+KQkENUkm3LmbDjwfv8LqJTfVHUpZcALx6HTs3faCv7Y8MPAadri1MdBe1i/ee1uPDaLaKKuSwtziaqucZ12/XaN65fSnD0RnNAhCOTYWcUyw/WE+v4yZmmSMzlhR0t2bHHvoPJYhs2Qhhd0NXoZKzGPLvjltV6DXscls+UKA9yStpsR xGeCEZK2 XwbyuTEgFB7HzG3jTcITuTkS7seqOOa8jaYsp/+4GYt4yL9f1GZxI+QwKTTarLc6tu9Fzf5c96eFZgtTpo78a0Yupzw2je/2JDNvTPtD8e1z9hURH9yV7Zsk72i81VxZQc6Cjub6KHg7S9Q8Meqy5IOiwmrXb3rrFZHUsYQHFr92yAlGAX6kh5s2gx858JTsQiojZ8UNutSdxHQtC6ggsjhLOHRHpur57ysnagnLUClFb6e90smj1UDBpTq761B0AflYWpTN+r7KCxOqDn14sWvobj5RHa9Jaf1ZdbMm0f1nOBe0XMBLb8soShw== 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: damos_quota_goal.py selftest see if DAMOS quota goals tuning feature increases or reduces the effective size quota for given score as expected. The tuning feature sets the minimum quota size as one byte, so if the effective size quota is already one, we cannot expect it further be reduced. However the test is not aware of the edge case, and fails since it shown no expected change of the effective quota. Handle the case by updating the failure logic for no change to see if it was the case, and simply skips to next test input. Fixes: f1c07c0a1662b ("selftests/damon: add a test for DAMOS quota goal") Cc: # 6.10.x Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202502171423.b28a918d-lkp@intel.com Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/damos_quota_goal.py | 3 +++ 1 file changed, 3 insertions(+) base-commit: 20017459916819f8ae15ca3840e71fbf0ea8354e diff --git a/tools/testing/selftests/damon/damos_quota_goal.py b/tools/testing/selftests/damon/damos_quota_goal.py index 18246f3b62f7..f76e0412b564 100755 --- a/tools/testing/selftests/damon/damos_quota_goal.py +++ b/tools/testing/selftests/damon/damos_quota_goal.py @@ -63,6 +63,9 @@ def main(): if last_effective_bytes != 0 else -1.0)) if last_effective_bytes == goal.effective_bytes: + # effective quota was already minimum that cannot be more reduced + if expect_increase is False and last_effective_bytes == 1: + continue print('efective bytes not changed: %d' % goal.effective_bytes) exit(1)