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: 12792 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp695195vqg; Fri, 28 Jul 2023 14:13:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlHB47VoigwrO6rFdl6dPYEwETeqO0uzuip48NTBDZKL2nkv1DR8CA4CZUPPoD2ABVP1holM X-Received: by 2002:a05:6a20:938a:b0:133:8784:15f7 with SMTP id x10-20020a056a20938a00b00133878415f7mr3385880pzh.14.1690578829991; Fri, 28 Jul 2023 14:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690578829; cv=none; d=google.com; s=arc-20160816; b=bGCHWxg5Lsgj2Oy+KbRFi82+KhpPCYAWfUYQU/j9FfUwfnTQrp74DZxx4PUvM+P8Z0 s8De8pDLDNxltvymDlWCSfpEvQ8sWc59F/geRD3QPU5BB/9DAQSFCx3yNa2pQ0Ww+yPY WQor91r6KsDOOpS1DiIrIFUvxXbX7kIpIfJ98kGn8m8k5NXPLTex3Ylz9KzaLrT2S5ol f+cvFxu3eDTnQcKcO0sNsaaruZiXaQsB0aYdRE3adFNR1CLxcFBRb9AmxApRTBI9veEG /rKnkAB4iBh/UuKOl2hRi2/h3fUEz/Rehk9ubFK02y4lkwY0TWLhtIZ3adyHFyY1LsjM yLlg== 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=Npk3VQhevGZ8s5krVMaV+iIXqEYRr/nbe0rXy7NGIKY=; fh=TEseifI0Vt96ixG1Haep3SSacl8ksjdio4RiMuOHQk4=; b=g4v6orCdRgv1YgzY9npYj+PhvPDMuobHc7yUWMuxGlXGeEyRUVeWw7pBIns8KwRT7g 2kKcBWHuQWbcTAIrAFU+r6GT4utnUWck7kmqUA997ODjVUpKDLIII6boBY33a72l45u5 TLIrRHxV0eav4wfqb2Q7Rb7te5iGKNTroCZXvSw25EnSU4jVqUr8riSDSbnN8AhGhoDY YwEZROuYHaH+bUm+PadJbL8TRqHF4dRKGLn7z1suyXwEMetbGgGb+OBWzgFUJZKzPgrs iXMoKNRAVHXNlgxP5reXNj6/RGziUGqRa2sjVDLYKn2OGapQ1tFE41DHdstPXDAYVsf8 i8dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="aGso/o3O"; 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 o15-20020a63a80f000000b0055793097dbesi3494480pgf.469.2023.07.28.14.13.32; Fri, 28 Jul 2023 14:13:49 -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="aGso/o3O"; 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 S233399AbjG1Ue4 (ORCPT + 99 others); Fri, 28 Jul 2023 16:34:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233189AbjG1Uey (ORCPT ); Fri, 28 Jul 2023 16:34:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D75924497; Fri, 28 Jul 2023 13:34:49 -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 1BE3F62202; Fri, 28 Jul 2023 20:34:49 +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-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,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: 1772700387478281041 X-GMAIL-MSGID: 1772700387478281041 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(-)