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 19112C433EF for ; Fri, 29 Apr 2022 16:06:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 46F356B0082; Fri, 29 Apr 2022 12:06:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 420416B0083; Fri, 29 Apr 2022 12:06:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D6C76B0085; Fri, 29 Apr 2022 12:06:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 0CADE6B0082 for ; Fri, 29 Apr 2022 12:06:21 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 5011760653 for ; Fri, 29 Apr 2022 16:06:20 +0000 (UTC) X-FDA: 79410393720.30.A73C39D Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf07.hostedemail.com (Postfix) with ESMTP id D3B674003E for ; Fri, 29 Apr 2022 16:06:16 +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 CDA7C620D8; Fri, 29 Apr 2022 16:06:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D751FC385AE; Fri, 29 Apr 2022 16:06:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651248378; bh=7UakBPu0iWJJixVSPO62y2876KNAoXM3u3qWB69JqFY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O3B5SxHBvRaT5/G6adHHMtRK1xtcEqNd1DCbK4qQKQGIzcpcGiuWNkCIo3jtI9AoD QzxvnUIrn84esYMn7uZ3++BzUf6qwtGbAIPSWlHCzrBTGIO1D1OueFEtAxy++fQFX9 k6SL7vpnc4mbZzFD8MgPcGEpvVbmDXJyGPscEGPh1YuI5iwHhH9SAk6YyHD70d94ay SVy7pGKcbrkKaz8FhH0cCjR294AEWuX6p2bldo+fRgO8CPDshrxhTuLgOLcM3Sy++r r6Nn130sH/bf+GSSIw+hPTMLsV8hwg6eTB9b4hjC72pAJ3ICSM1m+80qsgjGUa8YhG 9+SaRKEB/5Pkw== From: sj@kernel.org To: akpm@linux-foundation.org Cc: linux-damon@amazon.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH 05/14] mm/damon/vaddr: remove damon_va_apply_three_regions() Date: Fri, 29 Apr 2022 16:05:57 +0000 Message-Id: <20220429160606.127307-6-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220429160606.127307-1-sj@kernel.org> References: <20220429160606.127307-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: D3B674003E X-Stat-Signature: 65uwdbrpbs7rm6orxba1req5j3msouya X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=O3B5SxHB; spf=pass (imf07.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-HE-Tag: 1651248376-908360 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: From: SeongJae Park 'damon_va_apply_three_regions()' is just a wrapper of its general version, 'damon_set_regions()'. This commit replaces the wrapper calls to directly call the general version. Signed-off-by: SeongJae Park --- mm/damon/vaddr-test.h | 6 +++--- mm/damon/vaddr.c | 18 +----------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/mm/damon/vaddr-test.h b/mm/damon/vaddr-test.h index dbf2b8759607..602266e5ae22 100644 --- a/mm/damon/vaddr-test.h +++ b/mm/damon/vaddr-test.h @@ -98,7 +98,7 @@ static struct damon_region *__nth_region_of(struct damon_target *t, int idx) } /* - * Test 'damon_va_apply_three_regions()' + * Test 'damon_set_regions()' * * test kunit object * regions an array containing start/end addresses of current @@ -113,7 +113,7 @@ static struct damon_region *__nth_region_of(struct damon_target *t, int idx) * the change, DAMON periodically reads the mappings, simplifies it to the * three regions, and updates the monitoring target regions to fit in the three * regions. The update of current target regions is the role of - * 'damon_va_apply_three_regions()'. + * 'damon_set_regions()'. * * This test passes the given target regions and the new three regions that * need to be applied to the function and check whether it updates the regions @@ -134,7 +134,7 @@ static void damon_do_test_apply_three_regions(struct kunit *test, damon_add_region(r, t); } - damon_va_apply_three_regions(t, three_regions); + damon_set_regions(t, three_regions, 3); for (i = 0; i < nr_expected / 2; i++) { r = __nth_region_of(t, i); diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c index c1ddd598f087..9a56ff60f244 100644 --- a/mm/damon/vaddr.c +++ b/mm/damon/vaddr.c @@ -282,22 +282,6 @@ static void damon_va_init(struct damon_ctx *ctx) } } -/* - * Functions for the dynamic monitoring target regions update - */ - -/* - * Update damon regions for the three big regions of the given target - * - * t the given target - * bregions the three big regions of the target - */ -static void damon_va_apply_three_regions(struct damon_target *t, - struct damon_addr_range bregions[3]) -{ - damon_set_regions(t, bregions, 3); -} - /* * Update regions for current memory mappings */ @@ -309,7 +293,7 @@ static void damon_va_update(struct damon_ctx *ctx) damon_for_each_target(t, ctx) { if (damon_va_three_regions(t, three_regions)) continue; - damon_va_apply_three_regions(t, three_regions); + damon_set_regions(t, three_regions, 3); } } -- 2.25.1