Message ID | 20231121053604.60798-1-sj@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp412782vqb; Mon, 20 Nov 2023 21:36:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IE10DU31wfe4bu+KK/DCkoS0M1KFsquL9rnMypIGhfmkKRCzaLVbNvUFhgoTwWQgBXneVnJ X-Received: by 2002:a05:6a20:8422:b0:188:e223:961c with SMTP id c34-20020a056a20842200b00188e223961cmr13113181pzd.59.1700545015930; Mon, 20 Nov 2023 21:36:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700545015; cv=none; d=google.com; s=arc-20160816; b=i6ESArCUo8DOta4cIk+6a3PyRKx+sJlhpq4jxPekSw4uZ4Hg7XOso7I+OhVp708l2m 4SSX8WoHkA4lBdmjsIiUEEdfNwMH5ROl5ghmlv399+pY+P0Cd/wZ6Yw1FUcFEMcHXEon L11vsvC4Ina3g4/lbAImsJ3/kqAUI1MOLVbNmm4OiXFl+pgj9FqUB3fZrh0hwSAL5mSr azSXabiFqnUfdQGUeAcyGVGqgNH5NMycIRO+BTi7wlUMG2Bx0T6FKuF6EvjgYZCMbsdu F/bIWB21syjYT8qYcIwjVmhsdddQ8eO4h0rZQaSzgHWDtsgCoSxvRuYPkYUkPuEuckld jgWQ== 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 :message-id:date:subject:cc:from:dkim-signature; bh=7EhJsRwMoOMIYMl/nZiPuFFK/qggUG9M9CeZZ4vHDL4=; fh=vqNpWvtrgKyqgLywmXrl7l1d0QUXOIwW93A3X4awQbI=; b=K7D/CIOGMCHqyA2emhmnFQTGg8mg5j4dSrnTLq3E3JLoZBPuQNZ+vFt9l+mq9o0vO8 BqcHoKV6IzCvpTrchF2H5i/HBPeiqV6KkVAMtYEBryBSs66ZBez3pouGYxcOltH7MUq/ VPA6dD2I5ZK2sKPLfbG6/32SAJo4zfhkKjeUvsdqdeoZU4a+KFzV3UMf/lY9SSHUWRDV mdSpqtSYQlDkgxuYmLYtfwvxZmZ3m1cr/6Vev2ShzQn41x8H7v3OUbpcTtaKcesUQcn7 JocOdt54Muo9zl5cBCHq7cwP8vRCoaBgekLlbRTy8VNqiDKSfhtMreJsUkGtj/qdzvdp uTSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=D6nVWtz7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id nv7-20020a17090b1b4700b002801213210dsi12206158pjb.60.2023.11.20.21.36.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 21:36:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=D6nVWtz7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 057BD8040820; Mon, 20 Nov 2023 21:36:46 -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 S233438AbjKUFgo (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Tue, 21 Nov 2023 00:36:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233510AbjKUFg0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); 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 B1807D45 for <linux-kernel@vger.kernel.org>; Mon, 20 Nov 2023 21:36:15 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0C87C433C7; Tue, 21 Nov 2023 05:36:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700544975; bh=2hTiZxsT86X0oN/PSearw+dfIAhh29V867VL4eOG5r8=; h=From:To:Cc:Subject:Date:From; b=D6nVWtz74Snj6LQsOZed22kJrcYfOOgYEzM/3i+YkHfCZmhauAJx7p3sCWPmkqUZT +S9RB1X3HAlZGSQDqQkt+IoQZRP42JQxD+10JjolCfxKyMMlLFN+ki6Bu9mHIQpXWi McBkhAlEdsTrUaRbTH1lyXmWGsnIz55tK7TJV/xaTgoWXb4+SgZG8vweCqDFIu+Nvz tZ5dfUYZB+t+Nz/tP+1c5ttoqjr3pS0g16ro3IabH7HAEcVvhddyzfiuAuNYakoWcB 5CTdxJsyMsfdPoT/fbyZ+zd76mKOiq9+q76NjH/GbN+xZKAJswD5ufN9CVkvsPks8B OokXxU/mf8+WQ== From: SeongJae Park <sj@kernel.org> Cc: SeongJae Park <sj@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/2] mm/damon: export DAMON symbols and add sample loadable modules Date: Tue, 21 Nov 2023 05:36:01 +0000 Message-Id: <20231121053604.60798-1-sj@kernel.org> X-Mailer: git-send-email 2.34.1 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: <linux-kernel.vger.kernel.org> 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:36:46 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783150691031035478 X-GMAIL-MSGID: 1783150691031035478 |
Series |
mm/damon: export DAMON symbols and add sample loadable modules
|
|
Message
SeongJae Park
Nov. 21, 2023, 5:36 a.m. UTC
DAMON cannot be used from loadable modules since it is not exporting its symbols. This makes use of DAMON unnecessarily tedious. For example, we presented basic usge of DAMON at kernel summit 2021[1] by writing simple loadable DAMON application modules in live. Because the time was limited (10 minutes) and the coding was to be done step by step, we had to make a downstream commit that exports DAMON symbols. There were users asking why the source code is now not working. It was mainly due to the absence of the symbols export patch on their tree, but also due to the changed DAMON interfaces. There were also multiple users requesting support of loadable modules for easier deployment. There's no reason to avoid exporting DAMON symbols. However, it would be better to have concrete use cases of the symbols in the tree together, for better maintenance of the interface and the use cases. The kernels summit 2021's live-coded modules could be used for the purpose. Expose DAMON API modules for supporting the minimum modules and and add the kernel summit 2021's modules that updated for latest DAMON API under the samples directory. We will keep update of the sample modules. For exporting more symbols, requesters would be required to merge their modules using it in the tree together, or updsate the sample modules to use the newly-exporting symbols in reasonable and still simple ways. [1] https://linuxplumbersconf.org/event/11/contributions/984/ SeongJae Park (2): mm/damon/core: export symbols for supporting loadable modules samples: add DAMON sample kernel modules MAINTAINERS | 1 + mm/damon/core.c | 10 ++++ samples/Kconfig | 2 + samples/Makefile | 2 + samples/damon/Kconfig | 30 ++++++++++ samples/damon/Makefile | 3 + samples/damon/damon_sample_prcl.c | 98 +++++++++++++++++++++++++++++++ samples/damon/damon_sample_wsse.c | 80 +++++++++++++++++++++++++ 8 files changed, 226 insertions(+) create mode 100644 samples/damon/Kconfig create mode 100644 samples/damon/Makefile create mode 100644 samples/damon/damon_sample_prcl.c create mode 100644 samples/damon/damon_sample_wsse.c base-commit: 79cc930e5e3dc73c972d9e422b5e2ab3fe56dce5