Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp18219rdb; Mon, 4 Dec 2023 18:30:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IG31ebJeGYLCKulMUe71OwylpWjdOACAdReTzCX7BIOgoWiVN6RfmlL+DTgqVGELfcId3sR X-Received: by 2002:a05:6a00:a8e:b0:6ce:2732:588 with SMTP id b14-20020a056a000a8e00b006ce27320588mr778065pfl.57.1701743410593; Mon, 04 Dec 2023 18:30:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701743410; cv=none; d=google.com; s=arc-20160816; b=pGDuMdi0Vb9QWlldtJsRrdRmoueaGcQV2r2CR4EVP1QZmKWqSklur+f+pHYlyX8xxy PeGMLLHm+6EWbkZPQoUvqVmm0yRklRkvBvqxlg7dKI3Pqq5fT1ZKwe7rfOevfm36QvTM 323xg6OXePAQwOElF9W1QGSv9blamJY7kybqnXdGyHktLmIuja6BjFurv46tpZwBBtMm RLJV3MNEvvZPbBvD04FA0VHzqxnPeGnqLOgXtNdGFlSnqkCMxeklHLUIqXHXq/4D6TVF 5PVWNYIbaocJPlPmlprSHevk8EY/Lu3wa/103U8IW+tTG0H7ZVi4JfCsIcDvvKGtPMB2 EmpA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=PrQZKAOIrUCwkEWGi/daGN8QmbcyYwfvjJm7NHr6iDY=; fh=BzdeVYqZhG5iuwuKJRNLP969rvCput73lx0iwx2zu7A=; b=X+4nFxBMRluEWwIOiFP+xHJNPVTxCVoJMic8+B6UnZyF2sptmBCc1NfX5nC1Mj7D8/ 1vIMvOgJJijcLVSWK9OAHYddzX6jUI6XvJ34fGA+6XDICkJjfiQmajB2AhmvQeZo+By8 05D/tKdqE4Rg1M3BPY+UDtDXo0tbPfPsB0RfyUm0dE7nA+TjNTiptr9rva8PWD5desfZ a83QUVwHu7VKEEUXRjC2GUu+OeT7+e9jrIAL1acGVFShfPaSXjlLP/dmO37UT2AgaToo RardrRcF/JrdL7xZpFI/61tibZXxuJE11jR2Iksa+cdA5rzZX4bAP/Ky7Pczm/MNu3c4 Ihmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=czDr4W1j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id j4-20020a056a00130400b006cdcd785487si8848351pfu.304.2023.12.04.18.30.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 18:30:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=czDr4W1j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 7F12780B232B; Mon, 4 Dec 2023 18:30:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346468AbjLEC34 (ORCPT + 99 others); Mon, 4 Dec 2023 21:29:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346415AbjLEC3l (ORCPT ); Mon, 4 Dec 2023 21:29:41 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44D5D119 for ; Mon, 4 Dec 2023 18:29:03 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E64EC433C8; Tue, 5 Dec 2023 02:29:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701743342; bh=WXN01WmS/1XYD2UM5/KTAA43TQV3rGLcmc9JJYlY+Zs=; h=From:To:Cc:Subject:Date:From; b=czDr4W1jJnUWy8kd3v9RRDgKXCXocS82Li0EGVZit+a+g8qXwzJK/05JuPU5p59uI mNL2MrdBevaxzcFe9SUk0wJieUBy2sg1eSkmpmOIA0Qc2ZRfkWt35h1cPGlJ69yRzW Sx9+/Cj13S5asDVBKZxroJPRmcx9LxxB2cUxHQvTPTgS3xFmZYnoGexnc7epPeac1S iThTWc/g1gGXleTQnCfBmYbFlU8i2+W1zghE1o3i30AaHfFXLgAEqusK8USGTudlis 8/qlW4IkjWwilJQPhgrS73lm7aOE5DVGzPtJDrSMrCKjSD/X5JpHTufF3EgT47HfKN V0zZDLnwstUVw== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] mm/damon: export DAMON symbols and add sample loadable modules Date: Tue, 5 Dec 2023 02:28:55 +0000 Message-Id: <20231205022858.1540-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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 18:30:09 -0800 (PST) Changes from RFC (https://lore.kernel.org/damon/20231121053604.60798-1-sj@kernel.org/) - Wordsmith commit message - Use GPL v2 for Makefile - Separate patch for each sample module DAMON cannot be used from loadable modules since it is not exporting its symbols. This makes use of DAMON unnecessarily tedious. For example, basic usage of DAMON was presented 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, it 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 updated DAMON programming 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 add the kernel summit 2021's modules that updated for latest DAMON API under the samples directory. The sample modules will be keep updated. For exporting more symbols, requesters would be required to merge their modules using the symbols in the tree together, or updsate the sample modules to use the newly-exporting symbols in still simple but reasonable ways. [1] https://linuxplumbersconf.org/event/11/contributions/984/ Signed-off-by: SeongJae Park SeongJae Park (3): mm/damon/core: export symbols for supporting loadable modules samples: add working set size estimation DAMON sample module samples: add proactive reclamation DAMON sample module 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 | 102 ++++++++++++++++++++++++++++++ samples/damon/damon_sample_wsse.c | 85 +++++++++++++++++++++++++ 8 files changed, 235 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: 7fcebba4a540e4508b923f00a3e9c5e4710f147f -- 2.34.1