Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4030340ioa; Tue, 26 Apr 2022 15:18:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv36uNttO/xc0QKTfkq6ZnCa/H2Pn0t/W3/X/y+rgmMCnC8auGIH0Kid4SufX0V2DKsWSN X-Received: by 2002:a05:6402:1148:b0:413:11e0:1f58 with SMTP id g8-20020a056402114800b0041311e01f58mr26487768edw.113.1651011508351; Tue, 26 Apr 2022 15:18:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651011508; cv=none; d=google.com; s=arc-20160816; b=0CdSGeDZjciU/L9o7xHhyBjt2qZPJbeGNFUtiZRntaagzjFMaeFlF3l3c/yK4SIXNn CAiTEm1wCN30V2+4Hs0TqaAPuRfqX+Qga9OzCbwTwD1kzDdA5aNKhGB/uV6fQJVn2+NR VKduJ51m9R5UrNTRlKih7oGSeE815JW8VEkDOSN2Jc4iaoGyEcz/9JQtHD6qfzXnvCfg 25mFkY72YBQxr1z0k+Tbh96TDZ8SiPfCqWkMY9+cVZFjxVEukpNfraZaphq3JtUUEipj 7JG+TFQZxcWJvTCGv5F6dC20IrqlM5EbIE/soSfcRzW7XcZFp7ywjoHnkAqRxqvmaq1X 9+dg== 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=TcTXCwigQ+Cgt5fwaQfBxdU+Fvo3+6uGmt+SdSFVCZ8=; b=QMvyRndefebK4M7HmaMRetKtBYF/TRLRH9CEsKkdcsKdo2KYXIovd0IvL9sJ+UfJpc PEZHO6TLWatO5oZdaSwJO4nvtryMZoyw69JNKaURUXYOzbgIvFg87lpCD6PuVzZh3i6M kkW1BDULaKpK9HMZnsJ1qmJqLCN3MLuwZw/HvCltMszgXr6QmYDLI9+mlq7Z089GE6rx dht1iIt4cuFRQhep1szL7LLnYNJjTqYieLSt5HiRIa4O1ZmToFbn0m0NFOR5753L9lkc Ls9SgTMDwBsAcmmmKguHiHWuJeA+pAVYRWuxuAxAWaoZ1BYsxEVBUmtxbzIVirN0zyGQ A/Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NazlHfNp; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u20-20020aa7d0d4000000b00425d5b68454si7909420edo.336.2022.04.26.15.18.04; Tue, 26 Apr 2022 15:18:28 -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=NazlHfNp; 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 S1355059AbiDZUmA (ORCPT + 99 others); Tue, 26 Apr 2022 16:42:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbiDZUl7 (ORCPT ); Tue, 26 Apr 2022 16:41:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A848B7484C for ; Tue, 26 Apr 2022 13:38:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 42C3F61159 for ; Tue, 26 Apr 2022 20:38:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 105F8C385A4; Tue, 26 Apr 2022 20:38:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651005529; bh=7FM2Cl7AYC/kifHZh+3Yf++v1gAZu2HGgYiMvm091PM=; h=From:To:Cc:Subject:Date:From; b=NazlHfNpSvgyX+SbULKpToTFyGeXYPFyIMsGsOw0k4k5foImoKxEh/1s+kyiY/TQ3 lcC0ZW7RJn6eBepwpRHydi2VOANXlAyAm0zvUWh5mngliAz+jqKcZtIee5VmRINhaf T4IK7klTBVVzp9Pl7P6TZ03Klu8iZmCmr54zGZfUTpWH9lSvMpjZqUf32Kld3oFZRL xoMnCxhm7dm8ASpLW/7QhI2cH/LT8h5h2KYQYHnR9PYsuQ0CG6LqENNBnFGZUY1xrO zkjbzHVe5O0d41z/xTqP8kGC0yhF6CRdRcBjO3Fw/Vsp2spdP/T28oVu7A0gw9ZBkH hP65n/n7Bp54g== From: sj@kernel.org To: akpm@linux-foundation.org Cc: linux-damon@amazon.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH 0/4] mm/damon: allow users know which monitoring ops are available Date: Tue, 26 Apr 2022 20:38:39 +0000 Message-Id: <20220426203843.45238-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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 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 From: SeongJae Park DAMON users can configure it for vaious address spaces including virtual address spaces and the physical address space by setting its monitoring operations set with appropriate one for their purpose. However, there is no celan and simple way to know exactly which monitoring operations sets are available on the currently running kernel. This patchset adds functions for the purpose on DAMON's kernel API ('damon_is_registered_ops()') and sysfs interface ('avail_operations' file under each context directory). SeongJae Park (4): mm/damon/core: add a function for damon_operations registration checks mm/damon/sysfs: add a file for listing available monitoring ops selftets/damon/sysfs: test existence and permission of avail_operations Docs/{ABI,admin-guide}/damon: document 'avail_operations' sysfs file .../ABI/testing/sysfs-kernel-mm-damon | 10 +++++++- Documentation/admin-guide/mm/damon/usage.rst | 18 +++++++++----- include/linux/damon.h | 1 + mm/damon/core.c | 24 ++++++++++++++++--- mm/damon/sysfs.c | 19 +++++++++++++++ tools/testing/selftests/damon/sysfs.sh | 1 + 6 files changed, 63 insertions(+), 10 deletions(-) -- 2.25.1