[3/9] mm/damon/core: use nr_accesses_bp as a source of damos_before_apply tracepoint
Message ID | 20230916020945.47296-4-sj@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1436835vqi; Fri, 15 Sep 2023 19:18:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0pBQTeGu2cE47ICGrP5r6ZtVxqxo5nIFO5a6v5XSS697q+dxMnz1dsmHa8O3BGz5LTd3/ X-Received: by 2002:a05:6a21:7785:b0:14c:def2:6954 with SMTP id bd5-20020a056a21778500b0014cdef26954mr3879545pzc.36.1694830726889; Fri, 15 Sep 2023 19:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694830726; cv=none; d=google.com; s=arc-20160816; b=NI/qdHtN8eZ5NLyvTxWR/YFvGx/vX05gzEbHikRYBt8y48S8MrrHyW7x/EVEtiaazp pKzsw5AHT/nObh46GPWFUk1vKSmuAXwNUzqKVxlYj8JfXvw0mmehCC2Etr9l3Fq7lUPJ 5pIP5FIfQe6ODNtnMIOxu1OWNVOUTjh/OiJ+umPlMFnko4m7blfjorfEKX0/gP4MgJvA EScZdK4KST/8Zq2jN2bT6lwk856Awwqqhkhi8awN0FxvDgFY+P2LYN9oFMBDhuDe5OrQ cKqo/33k71GGY4NCv1Vg0h5CjQ0BXt7sSCOdmC93fJz7MAnPsDeiaNGkshXy292EH/1+ 4Fdg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tjIZD4tmf+jZpp9P0nQE+oJlGzUWJFPJIvL3wjD6Bi4=; fh=BtCI6lkGDJTtX/kUKY7W1m6QbhCosJAsbhe/Uk6QBzA=; b=XMnRHBHU2ZajHfZMX9f/ClV/ZlegJUAax+zGFx6xhnAW+liT6hfYKDXWrcAhaxX75c /v4UMY6n7kC4a2i58lKJMxLIj6vFcLyOjz0OCMgUCHzw/UMu7CVi0aJS8GS3fZ8MTeNT lVT3YGlFjdTF65dkUOUjuEPBiMlWBlSB+dkBmxeGeFLP5Q69GJUB1y6xLnc0r2jViuqA 2v1HZk3IxiccFHycXtiveMQa4DF17FI47BPowEb++8IAJGdJ2D9XzyH8K9E2ppUu0jCT PJcJV8Nc5pexnYeZkONIXugMYcuFGezdFKVyzeWeDWqZc0+5x7zDn/csmx6VjfAwK/PT dh3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HYpkwR/i"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id y9-20020a17090264c900b001c44c0f8d96si693342pli.251.2023.09.15.19.18.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:18:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HYpkwR/i"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id D0DC480E2241; Fri, 15 Sep 2023 19:11:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238483AbjIPCK3 (ORCPT <rfc822;toshivichauhan@gmail.com> + 27 others); Fri, 15 Sep 2023 22:10:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237357AbjIPCKK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 15 Sep 2023 22:10:10 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D22901FCE; Fri, 15 Sep 2023 19:10:00 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E761AC433C9; Sat, 16 Sep 2023 02:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694830200; bh=JTX8roVUkoUgDpJsiDynoUw1rs0WkWhqwrFFpgZDGAc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HYpkwR/inXjdyb2gngS4f7p4SFsHSMS3VtSAcLEHye2QBHmQXeQgFFKB1NqwqQ069 aJfOypDmoD9vgbsIZl9SG2hsjrARJmocVcmfc/djvDJOFqWJS/uhEYh7mMfeMcasN3 73lPOFle6veIKb+soiMhLbfXEYO1mG/l1prQj89951ycdnVn6p3OtlOpLDZ4nd1Yj7 4vwABlBysLdDFobnl2b32WnWVtx24Dl+WTM0ek1K1yrfioD5GPKq1jvihIEL2IfNhB tBJSx15beCsLcfE3aARUMt7pYaWx5eQrqJiM4aOxKic2a1uSGSjm3HDYEMadPWoeB3 9twb5KOKOqTMQ== From: SeongJae Park <sj@kernel.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: SeongJae Park <sj@kernel.org>, Steven Rostedt <rostedt@goodmis.org>, damon@lists.linux.dev, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/9] mm/damon/core: use nr_accesses_bp as a source of damos_before_apply tracepoint Date: Sat, 16 Sep 2023 02:09:39 +0000 Message-Id: <20230916020945.47296-4-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230916020945.47296-1-sj@kernel.org> References: <20230916020945.47296-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 15 Sep 2023 19:11:18 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777158824427694209 X-GMAIL-MSGID: 1777158824427694209 |
Series |
mm/damon: implement DAMOS apply intervals
|
|
Commit Message
SeongJae Park
Sept. 16, 2023, 2:09 a.m. UTC
damos_before_apply tracepoint is exposing access rate of DAMON regions
using nr_accesses field of regions, 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.
Therefore this change doesn't make user-visible behavioral differences.
Signed-off-by: SeongJae Park <sj@kernel.org>
---
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 19930bb7af9a..23200aabccac 100644 --- a/include/trace/events/damon.h +++ b/include/trace/events/damon.h @@ -36,7 +36,7 @@ TRACE_EVENT_CONDITION(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; ),