Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6995594rwn; Tue, 13 Sep 2022 12:05:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR7GJv9uIfOTki3nUKFq7FmIRuLuwnGy/YsdA8HFMKUC3r/jOZINBhnjkZc5Z/kUHztwYK3a X-Received: by 2002:a17:907:9814:b0:77e:f3df:747d with SMTP id ji20-20020a170907981400b0077ef3df747dmr6080617ejc.350.1663095904551; Tue, 13 Sep 2022 12:05:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663095904; cv=none; d=google.com; s=arc-20160816; b=RZIH1yDrE+EyRzYum5VXtOlIR3iMnVq0aR2tuDX8h+bfr+kGZMt73NMPaAU0J6UeJg 5KdepcaZP5aDqrQHTdgoQVZRPb/K8Ie9n4MngtYwc2I0ow80RCmJbBLTeiOCE6Y42Kgl XjAa/3IC2Iljx6QPSSO4tLBUQ2N2yELd5eUS9NIVk5KEcBiTGw/NmZm9eo9N53eukEk/ YzbLGTGrYPw47jiGHnGPKJLzfMIOa+8e9rQ4ZAWcN1jr0K0HcwOFtvZMHp8oVLo6cr5Z StHCnZkyOd0HBQroy9Z2a18eR74g9WkYPgtebrRav6PBPcXT7aLdwVJQSxSz3uM6r8Hg xB4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QJNDu6O+KtENilgUbuvS1EiS1pGcLaxeqI+u0rIy/pE=; b=asETX8px3kef1zQ7lapmirgniEl8gaTEluVeKYfYCqwKITeTQmJEeyByM49YFPav5a 3qGgRi1hUwDr+uglmZQCE5K9hYZet11fuKECDjwzPZZRE8gXAYJNosJjIdozQtrLZWvC SmEaeImoFJ1KgSD72T9+0GZrINoq97PV6zo+wWdgEG0+HzU+xtg/H+Pc1wXulUq4RP1E 8Gat5LPaifaW7ShlcABQBSYb9EoBlgpTyjcqCstjVlRc2WKPI5WolMFHfCcvvEmh3utr 5/gCxWfE9u857S35toRe7GWQ1nJYgpIaFkVwJgZc1qlWK1m2ocOhGhgYzm8dTW7+ysCZ itWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d+gTc8Q3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go12-20020a1709070d8c00b0073d9d374e81si11186885ejc.681.2022.09.13.12.04.39; Tue, 13 Sep 2022 12:05:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d+gTc8Q3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232799AbiIMS2K (ORCPT + 99 others); Tue, 13 Sep 2022 14:28:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232538AbiIMS07 (ORCPT ); Tue, 13 Sep 2022 14:26:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A0496B15E for ; Tue, 13 Sep 2022 10:45:06 -0700 (PDT) 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 0A7EDB81095 for ; Tue, 13 Sep 2022 17:45:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7202BC43150; Tue, 13 Sep 2022 17:45:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663091102; bh=w3PmzI3eXAtMjTvuW+AZdIXWuI7edjAfsNckFtn3Io4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d+gTc8Q3zvNURan9GfDYXpMFt0z7EM7ZU4Rk7rB6CF4TVUZ9u0lOC9R/mnSsqr1rU R09efwl3daVaFAsKHd+OnmT6ETvV0PMjyb4ottR6blkea3JwhH7siUgh+ef1mPMkU4 EKaFrbCBRaCJZXOHM29xOnmuI+YeeF34swnPisfOy1yL6mT6wVb1wKUEh4oXq34IwI eLdb6WfOc5+5tc+sbCgWEYV4dgsETv9WG00qb3xBPewMoB8T/VL0hZF3QnKA2oMvFA 6vRLl+ewWOzfgDKb1A4WAfcd+sFizn3ILxbC4f+DqYoawhNS02fcOoxPe0EIvzMD4/ jGRysRwAE1RFg== From: SeongJae Park To: SeongJae Park , Andrew Morton Cc: damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/22] mm/damon/modules-common: implement a watermarks module parameters generator macro Date: Tue, 13 Sep 2022 17:44:39 +0000 Message-Id: <20220913174449.50645-13-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 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DAMON_RECLAIM and DAMON_LRU_SORT have module parameters for watermarks that having same names. This commit implements a macro for generating such module parameters so that we can reuse later. Signed-off-by: SeongJae Park --- mm/damon/modules-common.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mm/damon/modules-common.h b/mm/damon/modules-common.h index 0abd0636bc64..1370590a37d1 100644 --- a/mm/damon/modules-common.h +++ b/mm/damon/modules-common.h @@ -16,3 +16,10 @@ 0600); \ module_param_named(max_nr_regions, attrs.max_nr_regions, ulong, \ 0600); + +#define DEFINE_DAMON_MODULES_WMARKS_PARAMS(wmarks) \ + module_param_named(wmarks_interval, wmarks->interval, ulong, \ + 0600); \ + module_param_named(wmarks_high, wmarks.high, ulong, 0600); \ + module_param_named(wmarks_mid, wmarks.mid, ulong, 0600); \ + module_param_named(wmarks_low, wmarks.lowulong, 0600); -- 2.25.1