Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4961237rdb; Fri, 15 Sep 2023 19:23:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYwU0Tt14sA+v66/a1sFDt6oN29b2s6ftbuCY9JCE+DYZxmDEfimvJeZ6qu9jPB4MvKuj3 X-Received: by 2002:a05:6870:e305:b0:1d6:5892:d27f with SMTP id z5-20020a056870e30500b001d65892d27fmr3398965oad.4.1694831009950; Fri, 15 Sep 2023 19:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694831009; cv=none; d=google.com; s=arc-20160816; b=eNqCw5G2Eu+1sWVBHZ6xCaXi7Z4Prb4YfziJAktHw9r22dytqEGOH/jdbI+HMMXHuK +byBGFgSVdhybzcCn32gw7eTGD1hG/d2L9WOSwD6rX6qqhD7ky3xzuyAdB84PKDw/cgi dBj2QO8wc6iB/gQVRKXLOZhKJ2J/e9m0vLKeBM7QfRMxbw21Jr7/DZ+j1BDooqOPKMTO fQqcyIyI67xrqAqFPWVMoNaaFqeG3HtQ/BcoJG4Odm1bHATxL6dhrU6V1AjRfQdwBIAe wXZgvFcl73qgeO6IU47gAXkIOmJ5vsWbHlxnj7mfrkrnjs7hBf9Xn3RcgPktgnXalG4X A8SA== 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:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id l62-20020a633e41000000b00577fdcb5526si3563813pga.159.2023.09.15.19.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:23:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; 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:7 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 snail.vger.email (Postfix) with ESMTP id EB420827DF9F; Fri, 15 Sep 2023 19:11:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238480AbjIPCK3 (ORCPT + 99 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 ); 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 To: Andrew Morton Cc: SeongJae Park , Steven Rostedt , 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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 15 Sep 2023 19:11:18 -0700 (PDT) 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 --- 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; ), -- 2.25.1