Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1045777rdb; Fri, 2 Feb 2024 11:43:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGCbPENBczd7Ex+8dWluxN9UBVhendPAuDaGrsE19Q6AKfTDS7ohA7YYwAd6XmQUzb5gWW4 X-Received: by 2002:a17:902:d50a:b0:1d8:e2af:f7a3 with SMTP id b10-20020a170902d50a00b001d8e2aff7a3mr10689522plg.60.1706902988395; Fri, 02 Feb 2024 11:43:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706902988; cv=pass; d=google.com; s=arc-20160816; b=hZt/u8e6WirjqrguCvYQChPW7PZK7iJguIKywHWfVIKBKIc5YRGbVqQpw3f20cCPKL XZqZ9hu5eLPEnsn5DJ8tFNeK3gx/ebe1ysMDs9A0wJghgPIHxzDiGEf8cq/sa0gzaiR4 2tPuqCvEsnXZ2C5xAiikiYPwJ5858fT/RPj5j6A7BYm4l6Y8MpQFvUeKNT6Qt9KytTvz STAIKFnb46sZmLv3uhpyJ3gqYynAM9w97rYijtaSCVWY9ZS1CNQaPirfwFdUXjedUVU8 Wz9Hpf0ENLN8ez70xRZNq2lpekKI9aX0DvMfviohtYyZynv+2XxpRy+q9/z8OErordDh AfMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=1uACqC+cFdcEnN5VRNHcoyIRX2QzIDbWYdV37Z6AbDQ=; fh=gofFGMWEb/xACFIYE/xkOB3v75uk6FB8oQL7em/zCzc=; b=U5bvmYB+A17inpip16knUY2FUZcXlYfIZhOLZTVKNtUwo+U6LLMAiChDMKwajC/JR8 Fq8tv74FtirynYONye+L7ArGwDf9bpVuj23iaTPOGw224tzURyw0an/sz7jbX1gGE4mK nhGPmaUJftQPSua6Y0K0xg/m8HCQ1BuqNkMsTrQVLL6hYogJA8EXUXHqT5tvdku62qxl 9GlR00uKcnAb6bOWhQkvFGRVbIMqmt0Vudmcm/Q5Kb+d0jZQUG2Cf0eqExnVFVRfyP28 rwiYf8wfo9BlCJaYKcGOlQ6lFEDlEK1CC/Sr159PPiy9A36gyQ2mMs7oBnhSKrkG1/sO RYkg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fWWnRyOf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50473-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50473-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVWh1vfRC9g6HJ0thP7s4mMhgrS220XCuS2AUM4Q2AUrLyK0eAvINW6oTTqCXciMagzhs9PIgPD9sgzqG1GFK2uaYPyTFlQMeTy1Zj+5A== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id g6-20020a170902740600b001d97727daa2si1169890pll.548.2024.02.02.11.43.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 11:43:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50473-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fWWnRyOf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50473-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50473-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 6C0BAB2207D for ; Fri, 2 Feb 2024 19:20:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE70515E5BB; Fri, 2 Feb 2024 19:20:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fWWnRyOf" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB85A15E5A0; Fri, 2 Feb 2024 19:20:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706901601; cv=none; b=ipf2KbB9XuNA1d0d7qefM/AGjwwJv16/UAL5rpwE9IxYWfxlqAm1MNn5FcA7x7Y6LwPTIy3eTowqFGXFHLE+TYhRJtu6WFdTnH5BVcyS2iO24t4FBvbYCy1dFtwjRiYmDz2WicbvVHUeB8vaa2AOIXG0BUjfPaouU0igiY1Y0Q8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706901601; c=relaxed/simple; bh=CbXReCX3ZlwbbZZ2LtMRe+PpRclG31Ljw0m0O0lK4fo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Oe0HPkht0TCMdpkHMpWI27bQfSalwAd2CB6cmjKOksRTAW/K1iNnXmNsrMWhXHWS61S0x/dGR3EKlSh6+Xqdd+l0Qh6j+gMy8ftG6nKKpctPlK/aCNFK/EbOYPCYVASrkc4zp0nkrnx0FIq66M4zlLEXPK/51YDwhkv7HLeBJjk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fWWnRyOf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12E5EC433F1; Fri, 2 Feb 2024 19:20:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706901600; bh=CbXReCX3ZlwbbZZ2LtMRe+PpRclG31Ljw0m0O0lK4fo=; h=From:To:Cc:Subject:Date:From; b=fWWnRyOfm4mJOX4/eZm+IhaEuLd1JuKdV+JW9Cqe8Z9GKZLpYjLR+5gi8kaWErJYW 3K2uTX+OuwDimwPLsJKDLMCcYTyK/9WaPRneECK2oHFpiWGS/psfiQHarTduW11vtq NJcFDB8Uird8U3HpiEpeO5H6m/aTS3hYKe5RoB4a9jLR2IBN27hS+e7QbL6zt8twBD Sxh2/kDFpF9026EJNrEwzxCygItSwYJ46LVz+a3FXjBJeloGejiKvT3ELuY3LSEfoZ VRqeGWicI+QLrMmr76xm0QYXyNbPgmJP8NmrhBMeJkFpZnhdPdnkahKMIR3hcQOn+b vAsjtwJfaQG3A== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH ] mm/damon/sysfs-schemes: fix wrong DAMOS tried regions update timeout setup Date: Fri, 2 Feb 2024 11:19:56 -0800 Message-Id: <20240202191956.88791-1-sj@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DAMON sysfs interface's update_schemes_tried_regions command has a timeout of two apply intervals of the DAMOS scheme. Having zero value DAMOS scheme apply interval means it will use the aggregation interval as the value. However, the timeout setup logic is mistakenly using the sampling interval insted of the aggregartion interval for the case. This could cause earlier-than-expected timeout of the command. Fix it. Fixes: 7d6fa31a2fd7 ("mm/damon/sysfs-schemes: add timeout for update_schemes_tried_regions") Cc: # 6.7.x Signed-off-by: SeongJae Park --- mm/damon/sysfs-schemes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index 8dbaac6e5c2d..dd2fb5127009 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -2194,7 +2194,7 @@ static void damos_tried_regions_init_upd_status( sysfs_regions->upd_timeout_jiffies = jiffies + 2 * usecs_to_jiffies(scheme->apply_interval_us ? scheme->apply_interval_us : - ctx->attrs.sample_interval); + ctx->attrs.aggr_interval); } } -- 2.39.2