From patchwork Fri Jul 28 20:34:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13332647 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 06B12EB64DD for ; Fri, 28 Jul 2023 20:34:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9165B8D0002; Fri, 28 Jul 2023 16:34:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 89C906B0075; Fri, 28 Jul 2023 16:34:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 70D3C8D0002; Fri, 28 Jul 2023 16:34:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 62EB66B0071 for ; Fri, 28 Jul 2023 16:34:52 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 35ED316012F for ; Fri, 28 Jul 2023 20:34:52 +0000 (UTC) X-FDA: 81062174424.15.1ACEB52 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf29.hostedemail.com (Postfix) with ESMTP id 9615E12000C for ; Fri, 28 Jul 2023 20:34:49 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="aGso/o3O"; spf=pass (imf29.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=1690576489; 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=Npk3VQhevGZ8s5krVMaV+iIXqEYRr/nbe0rXy7NGIKY=; b=Ouih9Z7tXhJ5ucutU7/B8EksSM/j1H0zWQpa5YGB9B+aijb3LzOKfAh02aR5JX2EFBstsm cQh0ZEuZbP9Uvg/BMHqd3eNk4EnYCpxc31aEa2VOZRkwolpcDf+mbjAKsWl53UIaLepkpV lIVBhsyDUuB29noHOEXmjXQu7/lLEwA= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="aGso/o3O"; spf=pass (imf29.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690576489; a=rsa-sha256; cv=none; b=qHwRuZuqBIN1V35H0gc/FQckQDRS6aD4SdR3VY5gPuYeIi/ccsO7j12CSwuPYQWnQyB+BI fPtqcH78KHjruq4g4dzD5X9bZebDTGH7b17auX8paM5ySxVMmoqV5mYHw/gg9Ktd8c52J9 vR4w1FIc+zyAXfBPpMNX4Qn0QQx09AQ= 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 AF2B662208; Fri, 28 Jul 2023 20:34:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A96AEC433C8; Fri, 28 Jul 2023 20:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690576488; bh=tjC+t1JVwwxq1scLPA5k2+mNVlIe2UmfsNt2gxgEsnM=; h=From:To:Cc:Subject:Date:From; b=aGso/o3OKHGpXF3mWTBc9SGewTCa94We1PMmqibntTGcbh/vbZ01JHpu50/O5ZXca cFpSVC/oKArONAo8Oa0b1bO79wK/fskqVInSV1cT/Uo/oUdnDagJ4Xsa8O4aa4TEax viFYwF+YGG6eXxvu9/AtIcVGiAl3u3poFYAvT/S0eO3ocVGkIEWddv+o1iuYJuVFAg R1uoOcVfgn0ODALY+sQzrJmsB1IkZwRf6RdbXzwHZpKJ++nrofK/AY1fC+XV3kq44w a3W/13TitbiQG8m65JEx8oz0gTzQz5QTRJ2TDql8XLEnmt8aPse6xTWFjusstCugie +TDfZ8+i/p6ZA== 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: [RFC PATCH 00/13] Extedn DAMOS filters for address ranges and Date: Fri, 28 Jul 2023 20:34:31 +0000 Message-Id: <20230728203444.70703-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 9615E12000C X-Rspam-User: X-Stat-Signature: gk7zbaeutj9zmadeknap1h5h7afsmp5d X-Rspamd-Server: rspam01 X-HE-Tag: 1690576489-974865 X-HE-Meta: U2FsdGVkX1+NUJrqybhA9damBcMbgN1AGRDFHq7e0nn4BzTAXztuWa1iizTt/FkfpwKpzfCRGaO5bxGa1fNvrDCeyIwUdDWrIB2Y7mG2sZ5H8k4xUPE8t2O7NhaU7IylO8cTLq2EjKTECShx4UrKDPwEmzCbcoN5v1CTiEid3EZPZSuusHI/AdNiafdF+SbVaVGDSv4T56ZUcie3ZXCg3k8M2OdPsY4x1y89mZRPUlXpgGtwI+ypkJc6ihC2pukzy88srRqIuhoQkyEIkrdh701/T0oZuavcKq+YNacA7VvhLYbJ1taGBZlMTZ1xmcqN45sb3+bQ50iAWB/KND2f03v44+D73mgHfksg5KusNCeCD84F59LCa5sIy7bb93Zpo+cq+um2d60YGtY/V4slxOwqRWLbVtjGzxyx1k+N09Q82dwMFd8Nn3ZFFynoFnJx1t191yfS7FvGme3uzQKfsKQFR8oluG8HLad6DDy/hOW6aThBYA4NteLvF+Sm3wLQRJINUjKTymlcbtSU2SQUAzt1bS8nosDzH66wt3Zd+NMxGqiXJq7tEJsXeL2WorFNlH2FwegiQ5wZOJM9AMwjNCpuwWF+711VVGMOChqb+QwVVnDtIgpU2GGWRMdIxCuX+TRyveZ+bdJOB4+E//pVNZjkb68iepGGXbz81j4KloTeZWEsTcAybZuU7eQlPaG82rnt8jSE0JQ7bGx3QAT2hAX2dGrQN02kvSwUdIb5bK7JfgeB7gNPvItKAYcC5eMIGLlMeeJJaJs2iB7ZpTiqkqm9Vt/SHcvAfBoNyMiBLa16o6AlPcgTS0iyKUld/pCkJsZSG3OVrPssYVCYgt6XkBcKrtQtcSjZcR2arhhD/A4FzJy1SQv30MzObPZN5+fVby5q3kosNLgjYJxRDRF4dZo9gsXBaWnMfq8KmUTX0qjt/qAjKmQRUcKTq2DMz/EjeScvfoB/trDbQmrGzm4 hL3vFxxA nRutcWAivsEhwQWcLRQVk8i+T7T2RUtyuNbve4sScn6gK+hLi2B9N1acgddJ8SRPfETDMHJODOE7BjanI1T6L2POZuKb5NiDEdayXn7nJdU+VnGxvMygLjRUdszz3ZRbFEEe8SgIPGYpaWCd+7Kb8p+wTIMeWM4QuIxLF6u5iLcJ1ABoK0NEht7U1hmqbrOKX/6x5UMW5DcKAsgc1WNX9wCR3vOJjSVoBQ4JUmj9/1ieX3B1FOiguPj1eBb4H85Jrcv6UEISSzB7zO2R5mWINybYJ9A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.004922, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. 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(-)