Message ID | 20230909033711.55794-8-sj@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 62F7EEEB57F for <linux-mm@archiver.kernel.org>; Sat, 9 Sep 2023 03:37:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3FD026B0104; Fri, 8 Sep 2023 23:37:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3ABE86B0106; Fri, 8 Sep 2023 23:37:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 226566B0107; Fri, 8 Sep 2023 23:37:32 -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 0E2496B0104 for <linux-mm@kvack.org>; Fri, 8 Sep 2023 23:37:32 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id E06AB16027F for <linux-mm@kvack.org>; Sat, 9 Sep 2023 03:37:31 +0000 (UTC) X-FDA: 81215649102.17.F3C7AD7 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf23.hostedemail.com (Postfix) with ESMTP id 38501140003 for <linux-mm@kvack.org>; Sat, 9 Sep 2023 03:37:29 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=M330diVc; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694230650; 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=t0/NgnLtC+2FcxnOrp3sy4dMgy71ergshlIM2wzPpzk=; b=Tp0tSZhys14UfZFJbEf6UgytdntTYxlGtu1/Bd8gX34NJ2+tCPDORxYCJM+a4SwtKqouqO h7NLa8zU//zBHurPKxsHHwnNIS8CtuV6+v4Pzm01mkTDCCiA0KL2gyA0jKpnEfK+fhsv/h BmfPrWZ6/DeepBBBfGlqCBXCcTaGU1E= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=M330diVc; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694230650; a=rsa-sha256; cv=none; b=EwstwZNhrTIHUMsxdZsffX5dP1kGtwbjYWvUIgDU5XngPQ37ymCq14Nk0ptCdff6Z50uW/ WlMYRJpdBr28dvAPuPHuHnNmjVu4JsJlk9PQjJeBsrZPuMCRW39kt0QJlsQ34sh/udX6Wl 5v+x/Cs+g5hg+hFkBWaMBd+7OGlYgmQ= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C0D20B8231E; Sat, 9 Sep 2023 03:37:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DD2AC433CC; Sat, 9 Sep 2023 03:37:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694230648; bh=T2wTbeMBvGg1oZ8nMQI/oEwy81mbG221hI8+18jJewo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M330diVcv9Kv8EFldGI7s8B5vCDzjiNiU4H2nlTH8r7+IiEwi5kUPhPW/GuRSKP5x v3IyZOtLRDLVfZ2WPK8Zkz9IrzCPN0ZTJ9nO4TsUmxF7xs9lVlqAAkfd8jXu6wYtVQ 91yY3g+LT32JKjm2Xx94XGmfyFt0XxQ+YkNTnDOHU8NosYA/liDzlDbrc+3MfWXejp IjwVRkebxbYSQ9sVjy87LpHF4LPtnNfK3UypHePRMR6wW33HnXGYmLjfFlhsTo67gU 8tbGUIUCWUodMZey4IKMSr8S4w70YMr164pmXvOXKWrnX1zKb/ZXBBK6k538Mu2WF8 ZZvnEWTpJZY6A== From: SeongJae Park <sj@kernel.org> To: Cc: SeongJae Park <sj@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC 7/8] mm/damon/core: skip updating nr_accesses_bp for each aggregation interval Date: Sat, 9 Sep 2023 03:37:10 +0000 Message-Id: <20230909033711.55794-8-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230909033711.55794-1-sj@kernel.org> References: <20230909033711.55794-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 38501140003 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: th9mdwoz9gmruq54b9upu3tw3g7dzx7u X-HE-Tag: 1694230649-117909 X-HE-Meta: U2FsdGVkX1+xfaJlx9N9vZ6ZCRa299p8eGnu/0UqKY2IxH6etfbufKW/FrfK46l8injN3kLMcWH2P/ZMvQoxHCe9lIA4cH2z8P4U1hXHy7juuv6p3pCdswrfgqq2v6DnZRNWYNWuikzMyy1wGoGvnnNiRB9n6m2Lw73WaNWzT7aRi099N3J8nJHGct0YGayxGwzQngZmZB4bo4OfNe/dGaDn5W2RdiPSVAppF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ooqaVzmm7DuzZUkmlrKWsJLoJuq2pCsbrS4OJsar2jA4uBmpQlsXF9N 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: <linux-mm.kvack.org> |
Series |
mm/damon: provide pseudo-moving sum based access rate
|
expand
|
diff --git a/mm/damon/core.c b/mm/damon/core.c index c813407c09b4..1ba7c4669263 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -1182,8 +1182,6 @@ static void damon_merge_regions_of(struct damon_target *t, unsigned int thres, else r->age++; - r->nr_accesses_bp = r->nr_accesses * 10000; - if (prev && prev->ar.end == r->ar.start && abs(prev->nr_accesses - r->nr_accesses) <= thres && damon_sz_region(prev) + damon_sz_region(r) <= sz_limit)
damon_merge_regions_of(), which is called for each aggregation interval, updates nr_accesses_bp to nr_accesses * 10000. However, nr_accesses_bp is updated for each sampling interval via damon_moving_sum() using the aggregation interval as the moving time window. And by the definition of the algorithm, the value becomes same to discrete-window based sum for each time window-aligned time. Hence, nr_accesses_bp will be same to nr_accesses * 10000 for each aggregation interval without explicit update. Remove the unnecessary update of nr_accesses_bp in damon_merge_regions_of(). Signed-off-by: SeongJae Park <sj@kernel.org> --- mm/damon/core.c | 2 -- 1 file changed, 2 deletions(-)