From patchwork Tue Sep 13 17:44:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12975093 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 C37FCC6FA82 for ; Tue, 13 Sep 2022 17:45:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ED5778001A; Tue, 13 Sep 2022 13:45:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E5E7380014; Tue, 13 Sep 2022 13:45:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C13D58001A; Tue, 13 Sep 2022 13:45:11 -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 A484C80014 for ; Tue, 13 Sep 2022 13:45:11 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 81BD81C64B5 for ; Tue, 13 Sep 2022 17:45:11 +0000 (UTC) X-FDA: 79907788422.29.8720C26 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf11.hostedemail.com (Postfix) with ESMTP id 6FE444009C for ; Tue, 13 Sep 2022 17:45:09 +0000 (UTC) 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 ams.source.kernel.org (Postfix) with ESMTPS id 372A7B81097; Tue, 13 Sep 2022 17:45:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90BE6C433D6; Tue, 13 Sep 2022 17:45:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663091106; bh=TpMHecuKvtdBhnIMulCBOg8dzHSBCxkP4seXXVnf3o4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jdCE6iWv9HhVPN7MDQ52uUfmE9OXzgOLz0P+fJP2LIXptahcOXvoBkHEsLBhTSNwj xrLhrofoeYdhxmr0yF7a9NMGGDXsSOljaMebIelpbFB5SJEFGCEXreNc8EtkI7kSdn r33Ic3xkizh+xPUXJkZ/yCPD+mWOBL4ziEy43+5GPf9xdeZC+m7ehB8eMXmCyQdqPl AWMHQKAJUvl3RTuI9Qf8lDnEWxDh20IBq6s3CQddOaQefJP/7BVsq3f5l0pR4NKxK8 bqS/45DdTR5fiyGxW4N3AFYecqAu2+uW3DvrNqhWmbaZOUBIpyE940+uN56FuVnODK ezKyQ6CsrnXmA== From: SeongJae Park To: SeongJae Park , Andrew Morton Cc: damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 19/22] mm/damon/modules-common: implement damos time quota params generator Date: Tue, 13 Sep 2022 17:44:46 +0000 Message-Id: <20220913174449.50645-20-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220913174449.50645-1-sj@kernel.org> References: <20220913174449.50645-1-sj@kernel.org> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663091110; 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:in-reply-to:references:references:dkim-signature; bh=Ba62alDoAmMN/cetBSTDJAbYMyi+78OFYG9mivpHoZM=; b=tHlXuRxHcvp0JhXZ5ciQC2txAgO647oaev28uUeJB/oJ073Om98TKkWbMm76cNflUtOJ2d aKc3saiDOuRlJ2yr7npDQxqY9NX+IdxeFffHAxiwUZ6xh4i8KDZdFUj2Jp2wsmg5/Q965s Va+DMsMvyjaX37A+1vq0kG+EzCFmuaw= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=jdCE6iWv; spf=pass (imf11.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663091110; a=rsa-sha256; cv=none; b=CRmgymaLWLAdw873JBoeT2pikhsuK9zSc05Etn+4nBfmvI11AM58MDiQMDs5SguQGsRiuM 5C18lXGlqSWaXQbjJcskczJ+MVaOpr4qDrZoU+J213J0NTinEIAtHyBmOW7Ah7xy/jEsK3 497vSu4SCvv6Ntgt0h6kGhonOroSrCo= X-Stat-Signature: dnzqx8z6oe9e5hemh6x64pqdhpi3iifx X-Rspamd-Queue-Id: 6FE444009C Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=jdCE6iWv; spf=pass (imf11.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1663091109-287082 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: DAMON_LRU_SORT have module parameters for DAMOS time quota only but size quota. This commit implements a macro for generating the module parameters so that we can reuse later. Signed-off-by: SeongJae Park --- mm/damon/modules-common.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mm/damon/modules-common.h b/mm/damon/modules-common.h index 3e99810b4689..5a4921851d32 100644 --- a/mm/damon/modules-common.h +++ b/mm/damon/modules-common.h @@ -17,12 +17,15 @@ module_param_named(max_nr_regions, attrs.max_nr_regions, ulong, \ 0600); -#define DEFINE_DAMON_MODULES_DAMOS_QUOTAS(quota) \ +#define DEFINE_DAMON_MODULES_DAMOS_TIME_QUOTA(quota) \ module_param_named(quota_ms, quota.ms, ulong, 0600); \ - module_param_named(quota_sz, quota.sz, ulong, 0600); \ module_param_named(quota_reset_interval_ms, \ quota.reset_interval, ulong, 0600); +#define DEFINE_DAMON_MODULES_DAMOS_QUOTAS(quota) \ + DEFINE_DAMON_MODULES_DAMOS_TIME_QUOTA(quota) \ + module_param_named(quota_sz, quota.sz, ulong, 0600); + #define DEFINE_DAMON_MODULES_WMARKS_PARAMS(wmarks) \ module_param_named(wmarks_interval, wmarks.interval, ulong, \ 0600); \