Message ID | 20220913174449.50645-10-sj@kernel.org (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 18ED9C6FA82 for <linux-mm@archiver.kernel.org>; Tue, 13 Sep 2022 17:45:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6E8DB80007; Tue, 13 Sep 2022 13:45:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 694C58000A; Tue, 13 Sep 2022 13:45:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 50FAC80007; Tue, 13 Sep 2022 13:45:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 412968000A for <linux-mm@kvack.org>; Tue, 13 Sep 2022 13:45:02 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1E2AE1202DC for <linux-mm@kvack.org>; Tue, 13 Sep 2022 17:45:02 +0000 (UTC) X-FDA: 79907788044.14.E232DCB Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf21.hostedemail.com (Postfix) with ESMTP id B89CE1C00B2 for <linux-mm@kvack.org>; Tue, 13 Sep 2022 17:45:01 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 394C86154A; Tue, 13 Sep 2022 17:45:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A92E0C43142; Tue, 13 Sep 2022 17:45:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663091101; bh=kK1sxLOXEkaoDNnV++Rope2Ec8RZDVijxu5erLk09sQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bdVSywTxsq0Xeh3ZASYyycbEgiYJiKaQ5ta5McLxvRu2AiXwWQowXtIqqKC41LuQw hNgbHrDkc2xHScq2yRGwn6raCF4mMNpeuEtyZd4GNyM1cuxyYgOG5mgrURSS4LNa8D IK+Ip4ztkqRC7f8WiHYYRDMxavuASn6po6rLCFsQuPVfL7U/D40W7VsMfLMcCT6rjp Pie2gHvvQwJBFQq4xoJaJ6J5hEuuMj7Nn3eTT1yiN1/HuRhLEdLX5ZLyQPMDwAXDcO PHWGYlKXvIW2ZUztbr9nMwaqDBkUGZuq57AAB7uZrwRhk/K5KawdsTv8P/lpsXOSZm Sez7g0v2A+9Mg== From: SeongJae Park <sj@kernel.org> To: SeongJae Park <sj@kernel.org>, Andrew Morton <akpm@linux-foundation.org> Cc: linux-kernel@vger.kernel.org, damon@lists.linux.dev, linux-mm@kvack.org Subject: [PATCH 09/22] mm/damon: implement a monitoring attributes module parameters generator macro Date: Tue, 13 Sep 2022 17:44:36 +0000 Message-Id: <20220913174449.50645-10-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 Content-Transfer-Encoding: 8bit ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=bdVSywTx; spf=pass (imf21.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1663091101; a=rsa-sha256; cv=none; b=Mg8bkS6WKzyorXam+mHemxwgHDALUadBEcQOlglINNwZJiK5cn/UODwXeRDfC5EEmP2W0a lEFAQghh0I9kbSmms+JYZShDzXfY/Kf3B9wczkVoLPpTnKg9s13x8cHxZB61xcQJWtY4EU n1Xou4wcuU2EF2hrzBCbIOoKYA/SccQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663091101; 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=IrNdJ6e5rac9vrzBwGFH+RDk5Ik2+Gbgj0zA2j+pT/M=; b=G+8NxQqV6wz7XJ979jVylNZjscJoW+4ge8dj7JjJ7XaVVphgdh9Zg7/hQwq6OlKdlc3s7K IlND7yIDZv12+P5dRVpYo67wM07AC2PeuvVduOv+G0TwBicjjFwWfsVbFez/r2L05KUZnv DOoDMvOAEYxgDDhtL9eYtPlugmPanKs= X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: B89CE1C00B2 X-Rspam-User: Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=bdVSywTx; spf=pass (imf21.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Stat-Signature: efnwmc8ecp7akkjrhfpaq7cfr937xqqn X-HE-Tag: 1663091101-270576 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> |
Series |
mm/damon: cleanup code
|
expand
|
diff --git a/mm/damon/modules-common.h b/mm/damon/modules-common.h new file mode 100644 index 000000000000..0abd0636bc64 --- /dev/null +++ b/mm/damon/modules-common.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Common Primitives for DAMON Modules + * + * Author: SeongJae Park <sj@kernel.org> + */ + +#include <linux/moduleparam.h> + +#define DEFINE_DAMON_MODULES_MON_ATTRS_PARAMS(attrs) \ + module_param_named(sample_interval, attrs.sample_interval, \ + ulong, 0600); \ + module_param_named(aggr_interval, attrs.aggr_interval, ulong, \ + 0600); \ + module_param_named(min_nr_regions, attrs.min_nr_regions, ulong, \ + 0600); \ + module_param_named(max_nr_regions, attrs.max_nr_regions, ulong, \ + 0600);
DAMON_RECLAIM and DAMON_LRU_SORT have module parameters for monitoring attributes that having same names. This commot implements a macro for generating such module parameters so that we can reuse later. Signed-off-by: SeongJae Park <sj@kernel.org> --- mm/damon/modules-common.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 mm/damon/modules-common.h