From patchwork Sun Sep 10 03:40:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13378440 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 A4006EEB58F for ; Sun, 10 Sep 2023 03:40:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 752216B0126; Sat, 9 Sep 2023 23:40:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 743136B0125; Sat, 9 Sep 2023 23:40:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 573586B0128; Sat, 9 Sep 2023 23:40:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 423486B0125 for ; Sat, 9 Sep 2023 23:40:57 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 1993AB42BC for ; Sun, 10 Sep 2023 03:40:57 +0000 (UTC) X-FDA: 81219286554.17.B683DA2 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf25.hostedemail.com (Postfix) with ESMTP id 69FBDA0016 for ; Sun, 10 Sep 2023 03:40:54 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ukwU7Cls; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf25.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694317254; 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:in-reply-to:references:references:dkim-signature; bh=6bi+dUECYcw1m5SL+sjA9nBrRZIb2ck3AZnojBSm9xI=; b=tAwhC1L2GTqVMxpFeG6zOFswKo5GNYGgqsnnZteGvAITSQHBjBNWZC5OzQnTbETf52zPZk 57s5ztcvra/8hKf4oFrA8KULdZBi935mAws03omF1LhK6UHQRGhI3ckDC5TKCCensCOHdI ZaL+DnXfxjOVWBCZ7FeZT6NM7tZZFVI= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ukwU7Cls; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf25.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694317254; a=rsa-sha256; cv=none; b=NQgTKJ+te5QyNljzdyaDg8oo6sd8tnRNxnTHN/slzkRGfuB7bpBaSiMIIDJvz6T9yemr7H lnTd7NReRgLek0H2otBk2sgbowIj2NEzTGD2XvDq3LAfxbWNC32Ak3YXS14+svBCzTkQ4z aI8tltl9xo91/pwkcnpylXaRcfQh7qI= 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 91AC260BEC; Sun, 10 Sep 2023 03:40:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E782EC433CD; Sun, 10 Sep 2023 03:40:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694317253; bh=MX3U5PAIeegCJCB7eLilaWjnagt4bwpadGy8uCoTAPk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ukwU7ClsMJzswDPgiPqi34noD/YWgkgpYy9DTKZv6j27OpTnHzCYojjnIIeATvJYN ahttWt3gMemTLniiTvBNfWs/xtDY8/cnBxOVexAWmn/45Om5A9B80Fyd8Lh4ayso3S h2IOtpquQVNeVk/ljEco9I+zHWzG9plGhihdWjIUaDeakrlOgGuNxa+XnnDi/A8gfO N70z6/+H4ITZFIZp3II+NPOj7wCMGK/ofQn13w16+xfVvSR5dGtKacsaVZgLXNbC3d I4z7iTc426dEh1+QdaG28ZXBNBtTVotkJ75bMNBlcObJljwa3L3QDiAfMbfxEPN47s bXb9XM7/1Dh8w== From: SeongJae Park To: Cc: SeongJae Park , Andrew Morton , Steven Rostedt , damon@lists.linux.dev, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC 3/8] mm/damon/core: expose nr_accesses_bp from damos_before_apply tracepoint Date: Sun, 10 Sep 2023 03:40:43 +0000 Message-Id: <20230910034048.59191-4-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910034048.59191-1-sj@kernel.org> References: <20230910034048.59191-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 69FBDA0016 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: igobz959gq8pshqptpwod41ermxpi4tc X-HE-Tag: 1694317254-473129 X-HE-Meta: U2FsdGVkX1+/4n4pYYfeTd3i0S/b8FujW3afd708DRCYSpReFw80Xur1XKImBrnEQjtCz6aI6MqFEqJjfKwiIZJoM2JE/QNpO1+Nf3UwuT6Kgv/pjOPzTOBgqgxNfMcxxgF6nyqYMCoNQh1bFoF9WgsKOwGxFerHNzRaOohQo3RIqcXns4a5FeH6rol9LTGplJP+pHlPGChO2r8CFWt8l7+q9l+Z1qf2UWSFc9QV0tBuUVxRNas0yK3xzUBff3KWs22ZqmkKjibSBN+QULXyZI3pAuEVF+GD85WIfeOA3x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XDHjU0/BgFv X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: damos_before_apply tracepoint is exposing access rate of DAMON regions using nr_accesses, which was actually used by DAMOS in the past. However, it has changed to use nr_accesses_bp instead. Update the tracepoint to expose the value that DAMOS is really using. Note that it doesn't expose the value as is in the basis point, but after converting it to the natural number by dividing it by 10,000. That's for avoiding confuses for old users. Signed-off-by: SeongJae Park --- include/trace/events/damon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/events/damon.h b/include/trace/events/damon.h index 9e7b39495b05..6f98198c0104 100644 --- a/include/trace/events/damon.h +++ b/include/trace/events/damon.h @@ -34,7 +34,7 @@ TRACE_EVENT(damos_before_apply, __entry->target_idx = target_idx; __entry->start = r->ar.start; __entry->end = r->ar.end; - __entry->nr_accesses = r->nr_accesses; + __entry->nr_accesses = r->nr_accesses_bp / 10000; __entry->age = r->age; __entry->nr_regions = nr_regions; ),