From patchwork Wed Aug 2 21:42:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13338861 Return-Path: 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 472D2C04A94 for ; Wed, 2 Aug 2023 21:43:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 845D02801EE; Wed, 2 Aug 2023 17:43:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7CF062801EB; Wed, 2 Aug 2023 17:43:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 66F9A2801EE; Wed, 2 Aug 2023 17:43:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 528422801EB for ; Wed, 2 Aug 2023 17:43:19 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 2094D140F98 for ; Wed, 2 Aug 2023 21:43:19 +0000 (UTC) X-FDA: 81080490918.15.45C07D2 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf23.hostedemail.com (Postfix) with ESMTP id 84208140012 for ; Wed, 2 Aug 2023 21:43:17 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=FKYuhgFD; spf=pass (imf23.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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691012597; 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:references:dkim-signature; bh=Jo43/M9HNw/9DZRHBodklXI4IDABNgMj6Ikl5m+yN1I=; b=lHUwEpKbSVTNzFfkzVJN7VKOR9yritQPZ7rQ3Vg77CSYh9hPSBUr4wJX7ExAlT3tOKTqCV AI2yPnC7+7n3otxPZ3siEYVuMZWn7Q5UivbbfHdeLTaAd6KUTeEfmvZPIoIBa7iKUxnczf zps8EzIkkII19NJgHn4tuF9y2hUr4mI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691012597; a=rsa-sha256; cv=none; b=EFH4IXMDTteoBRwRNc5qwYT+FopfG4kgTqQuS40PrNKFd4dzMl1DeR6zvPdJEXnuYTW+JI iyT2lNFHTeaqgFpFcWqUAaMxG+7XF9MGu1wu2dtZ0LRPFwdC1bKQ3S2EhZNzcl866rILpU JGFjz661mdpfowBdIQiWg0gEnRYdeso= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=FKYuhgFD; spf=pass (imf23.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 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9CDF061B30; Wed, 2 Aug 2023 21:43:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 400B5C433C8; Wed, 2 Aug 2023 21:43:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691012596; bh=QBEuiRTbe28FwTJFyn0gDDELntZEEA9zFJZItYOJvcw=; h=From:To:Cc:Subject:Date:From; b=FKYuhgFDuS/e5nbYCnIMw34QvAdrdGGRcfjrAK/XBtebMhBW+RzUXodidWe9sRR4h zEGiRMPUAvCDINdU91+Xh5lbQ5JV5Nn4L6dFQc460WmEuf5yJjTKvoJz4lXNWVj1Vq Fr6XytvI/Yjrtp11SCUK7KLB89U8l0Vo2ZTbGjKokFLlS/5HQVVc1v7EkROSLjD0kv RNlcZEJRPbHAR6qOe08UpWBBEex44zs8y/tx4yxtuSTHHZGIFoKVDHy+cIiJA6wNv3 B0QbSi4mbg9jgbX0nV0v4WW2BCA6aHWBiZiEEnlLzkdLZ82+RAG9SQrb7l42AsU71c fyWpzYI7uwBnA== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Jonathan Corbet , Shuah Khan , Brendan Higgins , damon@lists.linux.dev, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-mm@kvack.org Subject: [PATCH 00/13] Extedn DAMOS filters for address ranges and DAMON monitoring targets Date: Wed, 2 Aug 2023 21:42:59 +0000 Message-Id: <20230802214312.110532-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 84208140012 X-Rspam-User: X-Stat-Signature: r8e5dg3eqfa91d3b95dkh8zztsusyb1c X-Rspamd-Server: rspam03 X-HE-Tag: 1691012597-561688 X-HE-Meta: U2FsdGVkX18EWk2FyrmwfuqoqZPLyL3qowatHmzE0wyIawTmKNeSYxxAAPy1l2MPEP9hih9aHxShY0LWRK+H+XHy1TG+mf8NUatuSccg4XmiAJyi/EAHO9BOzjrkZGh0RZbRf8wjm8/pnsrEmC9ar58YN0gnRyBKjzuFy9Ad/MA5D5T/LTNHP8lHfpqcoFcCz9belfvqP8vPOP0HkARhtMcAi5sUE5Wd8rgw11ve8M8FWHvsEtPiWmc7x2TundjzC+/NjSkekhZw6IkklW9fvk9GDGao3DVoOVafzrVgO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sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Changes from RFC[1] - Rebase on latest mm-unstable - Add base-commit ---- There are use cases that need to apply DAMOS schemes to specific address ranges or DAMON monitoring targets. NUMA nodes in the physical address space, special memory objects in the virtual address space, and monitoring target specific efficient monitoring results snapshot retrieval could be examples of such use cases. This patchset extends DAMOS filters feature for such cases, by implementing two more filter types, namely address ranges and DAMON monitoring types. Patches sequence ---------------- The first seven patches are for the address ranges based DAMOS filter. The first patch implements the filter feature and expose it via DAMON kernel API. The second patch further expose the feature to users via DAMON sysfs interface. The third and fourth patches implement unit tests and selftests for the feature. Three patches (fifth to seventh) updating the documents follow. The following six patches are for the DAMON monitoring target based DAMOS filter. The eighth patch implements the feature in the core layer and expose it via DAMON's kernel API. The ninth patch further expose it to users via DAMON sysfs interface. Tenth patch add a selftest, and two patches (eleventh and twelfth) update documents. [1] https://lore.kernel.org/damon/20230728203444.70703-1-sj@kernel.org/ SeongJae Park (13): mm/damon/core: introduce address range type damos filter mm/damon/sysfs-schemes: support address range type DAMOS filter mm/damon/core-test: add a unit test for __damos_filter_out() selftests/damon/sysfs: test address range damos filter Docs/mm/damon/design: update for address range filters Docs/ABI/damon: update for address range DAMOS filter Docs/admin-guide/mm/damon/usage: update for address range type DAMOS filter mm/damon/core: implement target type damos filter mm/damon/sysfs-schemes: support target damos filter selftests/damon/sysfs: test damon_target filter Docs/mm/damon/design: update for DAMON monitoring target type DAMOS filter Docs/ABI/damon: update for DAMON monitoring target type DAMOS filter Docs/admin-guide/mm/damon/usage: update for DAMON monitoring target type DAMOS filter .../ABI/testing/sysfs-kernel-mm-damon | 27 +++++- Documentation/admin-guide/mm/damon/usage.rst | 34 +++++--- Documentation/mm/damon/design.rst | 24 ++++-- include/linux/damon.h | 28 +++++-- mm/damon/core-test.h | 61 ++++++++++++++ mm/damon/core.c | 62 ++++++++++++++ mm/damon/sysfs-schemes.c | 83 +++++++++++++++++++ tools/testing/selftests/damon/sysfs.sh | 5 ++ 8 files changed, 299 insertions(+), 25 deletions(-) base-commit: 32f9db36a0031f99629b5910d795b3f13f284472