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: 13030 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp749722vqx; Wed, 2 Aug 2023 14:58:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFjzBI3HxqEzAIjCwOAn0L7ZAP9Q1D7WsBMtywsULKq0WPYy7vgtTOnIg+6V9t/BiDux3k7 X-Received: by 2002:a05:6402:2696:b0:523:963:dc0a with SMTP id w22-20020a056402269600b005230963dc0amr728724edd.2.1691013501356; Wed, 02 Aug 2023 14:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691013501; cv=none; d=google.com; s=arc-20160816; b=GlQIQ8YW/LybqgoOQszVIyVAslR2N1c5WLHGLATlPCuOA3cTMXcRv6RvLOpeUrDDpg 6lwEeW+DIjBIC2o9qCa/awBOafNXayVbcBPerNsbATyAhVFG1ySEONzMtFWAqPYIKkuZ ti4eo9DyZNKoX89ohL0AK3x2U0XkrGiVf+iZGFBMts+1cm2MAqZ9gXMlaZrKUalmP2vu GkIs/rq+OlRbk4My7KCHupTifZHxhxZcfuaexZFDfHNSpgH/Kt22Tq+tcn74zzrlU1HU O52cs12VbxZFjHZLwruOdKRnoG76PmaWc9j5XsFH5rOadYKXl8jydmmn5OV/utMV9uHL 0kcQ== 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=Jo43/M9HNw/9DZRHBodklXI4IDABNgMj6Ikl5m+yN1I=; fh=TEseifI0Vt96ixG1Haep3SSacl8ksjdio4RiMuOHQk4=; b=yDuYQXV3BtsEGqiky8TAjBY0pSjEMcUWmBiRLRpB6aNiOAiDQM7RJuJBVhTDXCJBSo 8bTteCDyXb5IfxoFYJv1Pt+eG/jSsjC7wQ9GKqOZqv0dOwJLKUGXgJx8WtEPyM23dxPn hEIcqgvCYCjjt6okrxCMDV1B4NCeszMXQ2S0zsCoXyiCaSrCtnicwHBjYkwHAt8knv7M 06zemm9Tlg1pfzT1NkmCn/cbZ/aCZ+JswvCEo+05rpIw2mlps73eRX/AD8oGCXI1QMt4 YGSCf8A8Iz2DM3ByqJ+ro+BLzOCybwDwOqtvBZPj7DOXLEccMq1Wa9xDoizrrJ5Ds4WL ObRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FKYuhgFD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w3-20020aa7dcc3000000b0051df3a080besi995923edu.72.2023.08.02.14.57.57; Wed, 02 Aug 2023 14:58:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FKYuhgFD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232258AbjHBVnT (ORCPT + 99 others); Wed, 2 Aug 2023 17:43:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231209AbjHBVnR (ORCPT ); Wed, 2 Aug 2023 17:43:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 167E6173A; Wed, 2 Aug 2023 14:43:17 -0700 (PDT) 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 A84D361AF0; 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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773156173271275749 X-GMAIL-MSGID: 1773156173271275749 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