Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2303399rdb; Tue, 3 Oct 2023 17:50:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFA/CKv74koD/y4Qq4xx0p1mdCz2fUTru9hYNcVhKTscHMNWRg6Tmtcql1+lsvbvY1xQcp5 X-Received: by 2002:a05:6870:424e:b0:1be:d3a1:fd9 with SMTP id v14-20020a056870424e00b001bed3a10fd9mr1377510oac.9.1696380634975; Tue, 03 Oct 2023 17:50:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696380634; cv=none; d=google.com; s=arc-20160816; b=V4aBH6fJdJomfy13g6szDYWuQ4sUwRvclU+i35fx+2iOFt4DUIh75QOSxK70p6+RNI gQMiE3iWHVrB6SiXnvk4n+CVs4txpODaUN5nVUkTUNid6JzX84JMHImvQsGBd+77NaF7 W961EuW0XUZcnpeJNMFnyvltc/IPYj+bjKLQW+fvz+xssXt9avdXs0vLbTxBEnTRrRcU /m03+DDUjZmzjb+JOwkGasQwlikpLspGOPC6GRYT7qbkjBpLDJHEz6VPcBcPsMLaZPXe 8o+q34of+ecanQHqaf/hKAbwz9yNG2K7p2/+aTRr/gpVmLmLoFQf5e9KhAtgA9GaO+ge Z96w== 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:subject:cc:to:from:date; bh=MYlRgZ6GDSWnRovJDrrOIUFJribv4NfNmmdJeJYgwHg=; fh=hTV+i2dXtXZIleXHZ5WJRc8h7IoTA9rkK3i5xAA4664=; b=m3JuZjmGSKOnyCiebJMdt00V4U9aW+B8aMW0vsxGX+RgRC0A3ekFr6IAqB2JNVU9hT /G7jSYqP/VMzrABITlZZMQrwZzxV0I3l6dV2FKsgMx5YXy8T7RFoVL29fr+KaHWfXmjo tKjT18szU83KJqUrMzMRkWpNSpRas20wVonC/dnEK1Fu6MeArOcfo3fTFnE5riH5GfIf xNdE1Ragg+8tm1P5A5A9FZWxIxlgU+AdWPJmVdByi+B73V8b1gnXyKQgHsb9bnVi7/9n QLZGYByualDPTO+DhWztGD/yfrXmoedrCzcCWCT+iGY2ARiDg1K8bz04CfwvuiDInUxC uK7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id ea13-20020a056a004c0d00b0068e2566615esi2549297pfb.379.2023.10.03.17.50.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 17:50:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D708C8047D60; Tue, 3 Oct 2023 17:50:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232262AbjJDAtW convert rfc822-to-8bit (ORCPT + 99 others); Tue, 3 Oct 2023 20:49:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbjJDAtV (ORCPT ); Tue, 3 Oct 2023 20:49:21 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 853E3A7 for ; Tue, 3 Oct 2023 17:49:18 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2980AC433C8; Wed, 4 Oct 2023 00:49:17 +0000 (UTC) Date: Tue, 3 Oct 2023 20:50:22 -0400 From: Steven Rostedt To: SeongJae Park Cc: Andrew Morton , damon@lists.linux.dev, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND v2 1/2] mm/damon/core: add a tracepoint for damos apply target regions Message-ID: <20231003205022.58ffcb2a@gandalf.local.home> In-Reply-To: <20230913022050.2109-2-sj@kernel.org> References: <20230913022050.2109-1-sj@kernel.org> <20230913022050.2109-2-sj@kernel.org> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Tue, 03 Oct 2023 17:50:19 -0700 (PDT) On Wed, 13 Sep 2023 02:20:49 +0000 SeongJae Park wrote: > DAMON provides damon_aggregated tracepoint, which exposes details of > each region and its access monitoring results. It is useful for > getting whole monitoring results, e.g., for recording purposes. > > For investigations of DAMOS, DAMON Sysfs interface provides DAMOS > statistics and tried_regions directory. But, those provides only > statistics and snapshots. If the scheme is frequently applied and if > the user needs to know every detail of DAMOS behavior, the > snapshot-based interface could be insufficient and expensive. > > As a last resort, userspace users need to record the all monitoring > results via damon_aggregated tracepoint and simulate how DAMOS would > worked. It is unnecessarily complicated. DAMON kernel API users, > meanwhile, can do that easily via before_damos_apply() callback field of > 'struct damon_callback', though. > > Add a tracepoint that will be called just after before_damos_apply() > callback for more convenient investigations of DAMOS. The tracepoint > exposes all details about each regions, similar to damon_aggregated > tracepoint. > > Please note that DAMOS is currently not only for memory management but > also for query-like efficient monitoring results retrievals (when 'stat' > action is used). Until now, only statistics or snapshots were > supported. Addition of this tracepoint allows efficient full recording > of DAMOS-based filtered monitoring results. > From a tracing point of view. Reviewed-by: Steven Rostedt (Google) -- Steve