Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp167235rdf; Mon, 20 Nov 2023 21:37:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9LFYT/weVAYNlDPlNuhH7cZIf+3Gq6LhaasRuz8OTILGwirQNs0FuwCiJnsOqYpBxpcca X-Received: by 2002:a9d:6297:0:b0:6d6:446b:ee69 with SMTP id x23-20020a9d6297000000b006d6446bee69mr9871558otk.6.1700545035347; Mon, 20 Nov 2023 21:37:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700545035; cv=none; d=google.com; s=arc-20160816; b=J8gDjMhJ7s9qz0OcMzF8YUpLEeXCf0ox6x4mknAuv1NQE/DfgaWXRhhMeDoNr4DVOZ koicwsFKOwqRQlBuh7VszsppXG6IzPrqdmFPihlyNwE+KCX3gq2rjluGxp5DU6XY7b63 PJyxrCoYvTF0JK+qephYxYS9fh+LVtCWvhzEAxIbyy+oNNB3VhzCL1uM+HVvIe8GVmCm 63Zb89d70Hn1ei4P9ekTtPfq99idc4RJF/1KmquT07fTx2Z1sO53sC4UuzPNSJuxZsdW aOdAnyjV+mWu75DF2Dk5nZ78vSESwwhwGKjFILVUpWr6dkCQqgx1Fa+hZChcYQSxcp15 n/YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=zHc+VPOxJyhOPtgpDz53Zq9ECmvdOs0WU0qM61Fu+EY=; fh=vqNpWvtrgKyqgLywmXrl7l1d0QUXOIwW93A3X4awQbI=; b=yGwmVFZ6ehvnItSk7iRBLYCyqQkUYCcRlS2IsXR/ERLkSJncFEJeGaRVdUDkQfA3Ve f808IrhIuRZCxsTzZCf6GxFnPVEkrh3A8ZwmQZDgOgX8nqfyYiQ0nR5TqE22XyLsYEuU qXmkhqueyTkYAh6ZW4Q6qRHN9FQOyoaQJIrH+M+Kzdi2kvTqJMYehi7LhxBOcGt5NIzu ZSZGwOwrSbmk4W7LD5VsVNW7VAOUf/qGbr7LpntsFioEGdRcD+m/tfct/D7NuATp1FZ2 lMVJnqmv12AuFM23nEKxfemBUrnflojwnI1Ag8fJQwRkeKiT22WLAicxelhokIRWkVX7 rUPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=RuE6wR8s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id x3-20020a636303000000b005be0028c5easi9648450pgb.401.2023.11.20.21.37.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 21:37:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=RuE6wR8s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id A008E804080D; Mon, 20 Nov 2023 21:37:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233463AbjKUFgs (ORCPT + 99 others); Tue, 21 Nov 2023 00:36:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233397AbjKUFg0 (ORCPT ); Tue, 21 Nov 2023 00:36:26 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67EF9D79 for ; Mon, 20 Nov 2023 21:36:16 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B6E5C433CA; Tue, 21 Nov 2023 05:36:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700544976; bh=NQFkESlGtOo/Z9kTwMOTiB8dRtXYj2d4RmPD6fS+g6Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RuE6wR8s0cxItHT3S4v7846HvTe8lzcB2GDG2usS3By8VthmMpudVeqd8U8fNOrH6 om/JguB2ZLBLI0bLl3U0NAX7CceryPzzMnPfR9xGRaLfqRcFNiwfDwT6pIaxcK9SV2 /gtAtDGnJLSTZWk4xkjlCYg3LX7ai4cL0RyKBkq+yp0G0UxgmQX4v/PETr61S7jvDV 4nMxnm3stGHrnb5XnaXTX5vUlk6CkAFUrSa3qGPDhGNIbTnPrtfGYVcfJaIZJWZOYF cME8q3NrmRl3KKcqTti1PJTJ0zNtx7K3SPeH9JonPLtlYq4UYPPx/AVKO6uoc1hiFc X13VXI4G9j19Q== From: SeongJae Park Cc: SeongJae Park , Andrew Morton , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 1/2] mm/damon/core: export symbols for supporting loadable modules Date: Tue, 21 Nov 2023 05:36:02 +0000 Message-Id: <20231121053604.60798-2-sj@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231121053604.60798-1-sj@kernel.org> References: <20231121053604.60798-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 20 Nov 2023 21:37:11 -0800 (PST) Expose DAMON core symbols for supporting minimum functionality from loadable modules. Signed-off-by: SeongJae Park --- mm/damon/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mm/damon/core.c b/mm/damon/core.c index c080a16f6bdd..8ab8c902b9e2 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -111,6 +111,7 @@ int damon_select_ops(struct damon_ctx *ctx, enum damon_ops_id id) mutex_unlock(&damon_ops_lock); return err; } +EXPORT_SYMBOL(damon_select_ops); /* * Construct a damon_region struct @@ -353,6 +354,7 @@ struct damos *damon_new_scheme(struct damos_access_pattern *pattern, return scheme; } +EXPORT_SYMBOL(damon_new_scheme); static void damos_set_next_apply_sis(struct damos *s, struct damon_ctx *ctx) { @@ -390,6 +392,7 @@ void damon_destroy_scheme(struct damos *s) damon_del_scheme(s); damon_free_scheme(s); } +EXPORT_SYMBOL(damon_destroy_scheme); /* * Construct a damon_target struct @@ -411,11 +414,13 @@ struct damon_target *damon_new_target(void) return t; } +EXPORT_SYMBOL(damon_new_target); void damon_add_target(struct damon_ctx *ctx, struct damon_target *t) { list_add_tail(&t->list, &ctx->adaptive_targets); } +EXPORT_SYMBOL(damon_add_target); bool damon_targets_empty(struct damon_ctx *ctx) { @@ -493,6 +498,7 @@ struct damon_ctx *damon_new_ctx(void) return ctx; } +EXPORT_SYMBOL(damon_new_ctx); static void damon_destroy_targets(struct damon_ctx *ctx) { @@ -518,6 +524,7 @@ void damon_destroy_ctx(struct damon_ctx *ctx) kfree(ctx); } +EXPORT_SYMBOL(damon_destroy_ctx); static unsigned int damon_age_for_new_attrs(unsigned int age, struct damon_attrs *old_attrs, struct damon_attrs *new_attrs) @@ -645,6 +652,7 @@ void damon_set_schemes(struct damon_ctx *ctx, struct damos **schemes, for (i = 0; i < nr_schemes; i++) damon_add_scheme(ctx, schemes[i]); } +EXPORT_SYMBOL(damon_set_schemes); /** * damon_nr_running_ctxs() - Return number of currently running contexts. @@ -748,6 +756,7 @@ int damon_start(struct damon_ctx **ctxs, int nr_ctxs, bool exclusive) return err; } +EXPORT_SYMBOL(damon_start); /* * __damon_stop() - Stops monitoring of a given context. @@ -791,6 +800,7 @@ int damon_stop(struct damon_ctx **ctxs, int nr_ctxs) } return err; } +EXPORT_SYMBOL(damon_stop); /* * Reset the aggregated monitoring results ('nr_accesses' of each region). -- 2.34.1