Message ID | 20231119171529.66863-1-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 44664C54FB9 for <linux-mm@archiver.kernel.org>; Sun, 19 Nov 2023 17:15:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CAD906B00D0; Sun, 19 Nov 2023 12:15:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C5D606B012D; Sun, 19 Nov 2023 12:15:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B4C466B0296; Sun, 19 Nov 2023 12:15:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id A5C406B00D0 for <linux-mm@kvack.org>; Sun, 19 Nov 2023 12:15:39 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 71376C04A2 for <linux-mm@kvack.org>; Sun, 19 Nov 2023 17:15:39 +0000 (UTC) X-FDA: 81475355598.10.5A82590 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf24.hostedemail.com (Postfix) with ESMTP id 73D6A18000E for <linux-mm@kvack.org>; Sun, 19 Nov 2023 17:15:37 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=XkfEizFw; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf24.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 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=1700414137; 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:references:dkim-signature; bh=k3qlEKrpUKlu9+VRA9cFAtNOmR60PMxaKlmk8cYBIEQ=; b=GOUg6P3sW8XQnUNU97VCV1+8LoJc+4i+oE0k5I7CXHRRj9jDC0WluO88F/6NS3sgoW3GdP SxMwKg89zb9NBZTiidtlJbPvFBvwILbv+FFBICQr4eVfD2zCuXhhsPojS8prUeCj8znjnX ZQbPZc9EwWdgjLiRdSHtVXVkAs1xwfw= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=XkfEizFw; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf24.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700414137; a=rsa-sha256; cv=none; b=RCSXT16+5zmP0jBUs7APUPbla9+nPFZSjuz4U26cDFLGfgw9KXSYe3Gmyi4h0mz3JKroyn G3nB5suSR97z2e18weXOdM4kVF+AgdYVvUtrPnX3lv56Rbkdv0KorwLlyxN51Nj4UIpjpC 8BoMLbk60eyINtBFgHH6mHzR6ZrsKP0= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id E5F04CE0B4F; Sun, 19 Nov 2023 17:15:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06C42C433C8; Sun, 19 Nov 2023 17:15:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700414131; bh=wGhN7a1c1/p9kfRbyE8itY6KQu9wn5cOAaIJeGVmnnc=; h=From:To:Cc:Subject:Date:From; b=XkfEizFwjv4s2yyAh/IAdR4Ce6ANjOrHPS6OuUGobhk63MS2x68e7h7vDvp478EgL raG02fy8zS6Zg8iVPZ2/GmQeoINkjLj9ER0t634jT0bMnPTVJlIGwZEuAhRG9bRdGp LGqm7giPcvncWcu7qPOQbfn4BAZzlqiiIw4JVn4sJh9HLYuVRRcvUKgpXRLATg3bE3 Z3/oPm1KhExae4SvDwzPARf/8tZLK4fi6QW6K38QS/kF5fUs0mYxWbzOVIuNMUGEM3 Jk6MSHWzyA/E66pjT5jbU5I17CbKbEz4aou4ik1VANNJ4G2tAZhC+9o2fL+3tA+Dlu j0XgF6IfYEe/w== From: SeongJae Park <sj@kernel.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: SeongJae Park <sj@kernel.org>, damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] mm/damon/core: copy nr_accesses when splitting region Date: Sun, 19 Nov 2023 17:15:28 +0000 Message-Id: <20231119171529.66863-1-sj@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 73D6A18000E X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: sk6rszynkpzrzwoo1hiri1f9qfjnehgw X-HE-Tag: 1700414137-355216 X-HE-Meta: U2FsdGVkX1+78GvLtg7e0/DWXsMTG2RKQW7SKzi3RsCx9zg3NmSmBdYXZMETTQS2t+wPzipCg23ZQ/4UfWnS1UtRcraMzwfSzY15F+eSVKepD1nCPKTKoKkSgAZYXwied159yZ5ctJgdJOFpRhywIYbk6IBZA26/ftakOjCnhj1QhyAC1OU+FY5hT27JoYXraQV0MBI5AvU4uA4DmLR2ohXq5gaK0ci+gyoZTlkSmmLIcPW11zy2S6K/c6VEDzQLJ88aFrbG8fb1SzSWwHtEiX/FK+dm1JgrSQNogYWPFgYUtuppFCpSGj4elTSCJl0SVtZ0TKtARZDl7MFw+8zD4TmGf1w9iBhJ1qNt05f9YUmKHG3/RkaoUGHk+abBC/jWfiWzoGP93eepPjwLDb2bSQVCoaCQITPQkrc59GbAY6SVXrIQtW3rAP0+Qrh9AKlWIwDvd65yDP6bNQrrbrPZAf2Y7Fz+vufmtURXSnXndyX2N9pimNKtHuFm76nm/Jjid/Zp9GrpNeasqocn3X16vAmURjK0ukjr1+GtqA4lN2XLTAP8I77uIr2JUKbImqkbRnADBjG6VoJDAgSxAhDkgJPipQX+uTUYbtIeE2q0DJtBX2W3YCLpvAiFLC4XPCd9KsEpPTXhi0KhcFZ326TQWGho9gkHz8Td1UqGZRknikZca4tX8EY6RxH92bgBqhk2tGZaDtZtjRcHwJKZI91DEYiNa/MYmzgbWLTZe1QSWFZ5523lCBnVjRkZUndEg6eiD8he1YQCRMgzH9iZzuHdSGBemJge7NKnCFE8Fi8H5cicNw8BpER4uVcCFk9PKsvdKWS4NRZ0CmgJ3kJztYGr2d8qsn/UW1IRYIyj6MFnBfXbEVH25uJUMimLGHwGDHoGJvVN8zlS7LpMshU2hRkWXH3JJX+r3Li9juF+vKskV9AQfRqEHN4CXJ+kgPCn0biUXPVgIMHkJip/hISG2tW iTAd5uCd jclWdxDQMVOlw3WzUWWMPzcivMgcsglnW+pSjlxtwy5Agf+9HLl54qG5iJuau7Fwq+uqz6ZHraHUYz1klMqYWcXHZCqiYfS3Mvpmoh5IX6Z2STXW7jXUUEombOjZN+9+GLMah4GKFQJt9KN9NtBvp/wH6SZKpwlRewt/IDFj0U7dEEm4s6B0+f2+L/4XAVlgWTUk7MqjSYT3WMwoSzBpnf2a4uNNZP0qQ0jrYtPiHuIhuIh1NwrY8HAdXSGqCuD5hzw+pslDOtVyJGO0GjA9zV/GAnQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000071, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
[1/2] mm/damon/core: copy nr_accesses when splitting region
|
expand
|
diff --git a/mm/damon/core.c b/mm/damon/core.c index 6262d55904e7..ce1562783e7e 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -1225,6 +1225,7 @@ static void damon_split_region_at(struct damon_target *t, new->age = r->age; new->last_nr_accesses = r->last_nr_accesses; new->nr_accesses_bp = r->nr_accesses_bp; + new->nr_accesses = r->nr_accesses; damon_insert_region(new, r, damon_next_region(r), t); }
Regions split function ('damon_split_region_at()') is called at the beginning of an aggregation interval, and when DAMOS applying the actions and charging quota. Because 'nr_accesses' fields of all regions are reset at the beginning of each aggregation interval, and DAMOS was applying the action at the end of each aggregation interval, there was no need to copy the 'nr_accesses' field to the split-out region. However, commit 42f994b71404 ("mm/damon/core: implement scheme-specific apply interval") made DAMOS applies action on its own timing interval. Hence, 'nr_accesses' should also copied to split-out regions, but the commit didn't. Fix it by copying it. Fixes: 42f994b71404 ("mm/damon/core: implement scheme-specific apply interval") Signed-off-by: SeongJae Park <sj@kernel.org> --- Cc-ing stable@ is not needed, since the commit that introduced the issue has merged in v6.7 merge window. mm/damon/core.c | 1 + 1 file changed, 1 insertion(+)