From mboxrd@z Thu Jan 1 00:00:00 1970 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 8A712C4332F for ; Wed, 19 Oct 2022 17:32:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1AD9F6B0073; Wed, 19 Oct 2022 13:32:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 15EBF6B0074; Wed, 19 Oct 2022 13:32:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 04EFB6B0075; Wed, 19 Oct 2022 13:32:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id EA88F6B0073 for ; Wed, 19 Oct 2022 13:32:09 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id C292DAB051 for ; Wed, 19 Oct 2022 17:32:09 +0000 (UTC) X-FDA: 80038392378.15.AA1DF47 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf12.hostedemail.com (Postfix) with ESMTP id 6EE9D40036 for ; Wed, 19 Oct 2022 17:32:08 +0000 (UTC) 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 50DBC61978; Wed, 19 Oct 2022 17:32:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34240C433D6; Wed, 19 Oct 2022 17:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666200727; bh=j5op88tCtQJYSZcABrjvuLNqEi5MZTKsnk+JdLArf+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lTrDtmlVNr2LSm472A9vSFy+P198V/su8VSou661enLYiKL6DuiO149uM0dMiVxvF SKyZGXElT56ETi2brFrQ423OU3OvSt43WSC8uxFVGHb2tsZOgsSckx5DUa4YFQ8Tzg gAbURZVeiO7egr1c1Q05I2hulDFa9RrZJe05vuKii2/XfXz/g/ofg8w7hS1skw5ul6 1JgClGV12xcOh1l1z1HlGKNphUiYP4MgnFcMR7LmuclRdDrvDbT6D6cCqQSOk6rg+n 83pEhULHUBZNfahhCfqFEJlWSQuQxjC3tVDKoNBlBAXbzVwvzyewkVYBR76/V+26uX PtGRmNbchL1AQ== From: SeongJae Park To: SeongJae Park Cc: Andrew Morton , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 00/18] efficiently expose damos action tried regions information Date: Wed, 19 Oct 2022 17:32:05 +0000 Message-Id: <20221019173205.85216-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221019001317.104270-1-sj@kernel.org> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666200729; a=rsa-sha256; cv=none; b=gKU80RVLbDHg1eJBT0vpBAVu1lbhuzXqBNKofQakMnV5uZGlvWjQe/BmGLLW994dtSwgOF WJgPloBJP522YTLMapz9/+yX99Cy97Vda1SrWoezd5ox5u4GBXv2QiaDvPVs+LDeP4qLTL w8X0IaVr3t3T/O57Cv/TFR8eeRlImgw= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=lTrDtmlV; spf=pass (imf12.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666200729; 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=tQ2pStzT4k+oa+d+VLd4wgj+OJzS3k71OzteSCEMpdA=; b=NURpNJVlbUU51/MktXaa3BNe6zT8fQtP7L3L5feYov3rPHEFuQJN/G/dPKo8gToi9/dPU+ pkpn9cRTlWU2ABPCuzCAtjKF5QtlHfMSdKeIP+FHuc+0RKMAMMxgc41st66ImOvgOV0G2m WQv3r3LD3sOh34W1IoXwoaMArEOPIaA= X-Rspam-User: Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=lTrDtmlV; spf=pass (imf12.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Stat-Signature: u7riox3e4kngemit1zmcgc8p9553et5b X-Rspamd-Queue-Id: 6EE9D40036 X-Rspamd-Server: rspam10 X-HE-Tag: 1666200728-169020 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: On Wed, 19 Oct 2022 00:12:59 +0000 SeongJae Park wrote: > DAMON users can retrieve the monitoring results via 'after_aggregation' > callbacks if the user is using the kernel API, or 'damon_aggregated' > tracepoint if the user is in the user space. Those are useful if full > monitoring results are necessary. However, if the user has interest in > only some regions having specific access pattern, the interfaces could > be inefficient. For example, some DAMOS users might want to know > exactly what regions were identified as fulfilling the access pattern of > the scheme, for a debugging or a tuning. > > This patchset implements DAMON kernel API callbacks and sysfs directory > for efficient exposure of the information. The new callback will be > called for each region before specific DAMOS action is gonna tried to be > applied. The sysfs directory will be called 'tried_regions' and placed > under each scheme sysfs directory. User can write a special keyworkd, > 'update_schemes_regions' to the 'state' file of a kdamond sysfs > directory. Then, DAMON sysfs interface will fill the directory with the > information of regions that corresponding scheme action was tried to be > applied for one aggregation interval. > > Patches Sequence > ---------------- > > First five patches (1-5) clean up and refactor code that following patch > will touch, and the following one (patch 6) implements the DAMON > callback for DAMON kernel API users. > > Following six patches (7-12) clean up and refactor the sysfs interface > before the new sysfs directory introduction. Following two patches (13 > and 14) implement the sysfs directories, and successing two patches (15 > and 16) implement the special keyword for 'state' to fill and clean up > the directories. > > Finally, two more patches (17 and 18) for the documentation of the usage > and ABI follow. I think this patchset is unnecessarily big due to the cleanups and refactorings. I added them in this patchset mainly because I found the messy code while working for the feature. However, now it looks like it would make more sense to split them out into separate patchsets. Just thinking loudly, but any input is welcome. Thanks, SJ [...]