From patchwork Fri Dec 10 15:00:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12669729 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 E2BD3C433F5 for ; Fri, 10 Dec 2021 15:00:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 132F96B0071; Fri, 10 Dec 2021 10:00:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E2996B0072; Fri, 10 Dec 2021 10:00:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EEC3A6B0074; Fri, 10 Dec 2021 10:00:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0175.hostedemail.com [216.40.44.175]) by kanga.kvack.org (Postfix) with ESMTP id E0E2F6B0071 for ; Fri, 10 Dec 2021 10:00:47 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id AC211181AF5D0 for ; Fri, 10 Dec 2021 15:00:37 +0000 (UTC) X-FDA: 78902196114.07.63D5384 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf08.hostedemail.com (Postfix) with ESMTP id 160B0160018 for ; Fri, 10 Dec 2021 15:00:35 +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 ams.source.kernel.org (Postfix) with ESMTPS id 944CEB8286F; Fri, 10 Dec 2021 15:00:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02F36C341CF; Fri, 10 Dec 2021 15:00:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639148435; bh=2b/kJPy6Ru8lp4mLuBC4gZhE6gEGLdtczcdpxF4fXV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IA6wPuKs8/wSWbByJbY83094uMyDXF4cihcUBuGdTNkLB+xqcdS7kvAaK+XX6p3PP YmH62jgVYIWn9BByLhZEOrGUh6KrkXbYrdf4oaUK4I76roB1iI/rsWRtIGsfU+YZ63 4JM9r429ufnL/AbYEgw79x1PZWsgAAYIdKBPSNyrHmoU9SFP5/l5veDCfnk2GWXAPx /xPerIXRdUYid/Pbdd1zUXSgYxHoKpbQN4VRqpSrp2ASfWzdhHNOsjov8lrvRddhad PUWbpOpUi0FGwT5opBYcSUxIJu2sNBOrgebjNY4s1DS1iVnJAKI6MQBbHshZ+Aht4H o52UESh7tSydQ== From: SeongJae Park To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH 5/6] mm/damon/dbgfs: Support all DAMOS stats Date: Fri, 10 Dec 2021 15:00:15 +0000 Message-Id: <20211210150016.35349-6-sj@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211210150016.35349-1-sj@kernel.org> References: <20211210150016.35349-1-sj@kernel.org> X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 160B0160018 X-Stat-Signature: stwj9ozh71unf7hnb8wycwrpg6oqjfuc Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=IA6wPuKs; spf=pass (imf08.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-HE-Tag: 1639148435-410645 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: Currently, DAMON debugfs interface is not supporting DAMON-based Operation Schemes (DAMOS) stats for schemes successfully applied regions and time/space quota limit exceeds. This commit adds the support. Signed-off-by: SeongJae Park --- mm/damon/dbgfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c index ef79b7b7716d..58dbb9692279 100644 --- a/mm/damon/dbgfs.c +++ b/mm/damon/dbgfs.c @@ -105,7 +105,7 @@ static ssize_t sprint_schemes(struct damon_ctx *c, char *buf, ssize_t len) damon_for_each_scheme(s, c) { rc = scnprintf(&buf[written], len - written, - "%lu %lu %u %u %u %u %d %lu %lu %lu %u %u %u %d %lu %lu %lu %lu %lu %lu\n", + "%lu %lu %u %u %u %u %d %lu %lu %lu %u %u %u %d %lu %lu %lu %lu %lu %lu %lu %lu %lu\n", s->min_sz_region, s->max_sz_region, s->min_nr_accesses, s->max_nr_accesses, s->min_age_region, s->max_age_region, @@ -117,7 +117,9 @@ static ssize_t sprint_schemes(struct damon_ctx *c, char *buf, ssize_t len) s->quota.weight_age, s->wmarks.metric, s->wmarks.interval, s->wmarks.high, s->wmarks.mid, s->wmarks.low, - s->stat.nr_tried, s->stat.sz_tried); + s->stat.nr_tried, s->stat.sz_tried, + s->stat.nr_applied, s->stat.sz_applied, + s->stat.qt_exceeds); if (!rc) return -ENOMEM;