Message ID | 20230910034048.59191-2-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 93DDBEEB590 for <linux-mm@archiver.kernel.org>; Sun, 10 Sep 2023 03:41:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A3C456B0125; Sat, 9 Sep 2023 23:40:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 997D76B0128; Sat, 9 Sep 2023 23:40:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6A9116B0129; Sat, 9 Sep 2023 23:40:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 4C46E6B0126 for <linux-mm@kvack.org>; Sat, 9 Sep 2023 23:40:57 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 17EEE1CA365 for <linux-mm@kvack.org>; Sun, 10 Sep 2023 03:40:57 +0000 (UTC) X-FDA: 81219286554.11.A07A759 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf17.hostedemail.com (Postfix) with ESMTP id 55B8D40008 for <linux-mm@kvack.org>; Sun, 10 Sep 2023 03:40:55 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ecUnwAiC; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf17.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=1694317255; 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=fQgZDgTF0qm2Vnxfnh+bfImd7o0cAR5iWCC57Tq+QMs=; b=Jn7J+qPfgizcS8Gqyn+4DNXxdrYfz/lixwfr23ccSrPIiBKp0VPz70MgvJAk7yNl0KLB/7 9PHS2n38Ilru16Nqlklv/mCnoaJILVnHMMc1vKgvEFk7Q3+Xb3yWWupDzZ2oDiicnGUCMA pIi3TKjRclUItGqIStCJL6t8wZhCCtA= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ecUnwAiC; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf17.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=1694317255; a=rsa-sha256; cv=none; b=azZ1lhpllD4HvFHkdWu4mjsOG02ThI40VI3cI43TWeyQzQa54YYa1JBQGrSyBiVak71LVg tyrxmccgcBWxIAPA1L9wX3imMF3mI4t+bFJ+XH+cqzXRnGkXEQZMPet2lc0/P2ubRWTDFJ sDIVTqFb7K4Wl/50QwfVECl3wLgbCuE= 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 61AE1B80139; Sun, 10 Sep 2023 03:40:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC3E3C433CA; Sun, 10 Sep 2023 03:40:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694317252; bh=ksAtuRMHUySOp8Xx1g77nkmGZFnU3FZ4zcI4qBiSy/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ecUnwAiCcOAgRM4f0xtr+cxgCRncgILzBDXmIG/5Vd1IiS25/+TOD765eUx12lkbK Hbh7qPvTSqx2y7tFuVbwgEJJCdrc4VOBaLbrFw1nKuFRp5xtLAOIyRSU35QDEpORhV 3zPFTr9qA8WrXg8bJ7ICCMpcA9/JDVX3A0iT3GMV9/qt7mcI6uo7vtdA6ApLS6cEns EVTQ6ni8/Ebvnri1GA6uUZ8wjkDZ4JjyZUxxPrChUk4a1ErFyV6YEwtYFxUc7Zphaz ZYcCz9+BnwmnfYGH7q91HlkK6vyvfNLOtDfMRyUz5QZC2xuOT3G2BZeP9sKfr5W0Jz eTLniDweakmyw== 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 1/8] mm/damon/core: make DAMOS uses nr_accesses_bp instead of nr_accesses Date: Sun, 10 Sep 2023 03:40:41 +0000 Message-Id: <20230910034048.59191-2-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910034048.59191-1-sj@kernel.org> References: <20230910034048.59191-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 55B8D40008 X-Stat-Signature: sb5t8oosdqt5k9ibhmng8wp8p5wi854e X-HE-Tag: 1694317255-292993 X-HE-Meta: U2FsdGVkX1+cqPlAEDUYDicTgJrpuBzr/XaIYImMby1OdaTxAR20hpL70b+1VIUbSE3qxJcO7Y8j/3fQvjfqRjk+/KkvWxwMFAbCTaaw7xPN0utYF7eH7ivohc9RIBJXseEvYmBIvh7mNrLd/xKeWN8ZjvjItX0P6gi+KEe5wMGl71xBrvHmfgypEwLMzLhV1en5Y1Fm5WcqZC+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cj/4ZsaKZCMlI2sBLEuhOkkR6kiqmPRbDUX1c12Mp/Sf5ZM94cO1vK+bhEWTYV4jzvpX1S92fD92VcgtSp2jnZIUFv9Fn4Hq 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: implement DAMOS apply intervals
|
expand
|
diff --git a/mm/damon/core.c b/mm/damon/core.c index 83b0cd329e84..3e0532c6896c 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -799,12 +799,13 @@ static void damon_split_region_at(struct damon_target *t, static bool __damos_valid_target(struct damon_region *r, struct damos *s) { unsigned long sz; + unsigned int nr_accesses = r->nr_accesses_bp / 10000; sz = damon_sz_region(r); return s->pattern.min_sz_region <= sz && sz <= s->pattern.max_sz_region && - s->pattern.min_nr_accesses <= r->nr_accesses && - r->nr_accesses <= s->pattern.max_nr_accesses && + s->pattern.min_nr_accesses <= nr_accesses && + nr_accesses <= s->pattern.max_nr_accesses && s->pattern.min_age_region <= r->age && r->age <= s->pattern.max_age_region; }
DAMON provides nr_accesses_bp, which becomes same to nr_accesses * 10000 for every aggregation interval, but updated every sampling interval with a reasonable accuracy. Since DAMON-based operation schemes are applied in every aggregation interval using nr_accesses, using nr_accesses_bp instead will make no difference. This also makes future DAMOS changes for applying the scheme in a time interval that less than the aggregation interval possible. Signed-off-by: SeongJae Park <sj@kernel.org> --- mm/damon/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)