[2/9] mm/damon/sysfs-schemes: use nr_accesses_bp as the source of tried_regions/<N>/nr_accesses
Message ID | 20230916020945.47296-3-sj@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1438220vqi; Fri, 15 Sep 2023 19:23:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNtuM8FplchZRDv6WL/OrO3g5NDrHwUcmlOV8DB6lJbpPl1HQmr3M6PxgxSHPjjuvVd6gO X-Received: by 2002:a17:90b:1c89:b0:26d:4d1c:5395 with SMTP id oo9-20020a17090b1c8900b0026d4d1c5395mr9017627pjb.18.1694831001148; Fri, 15 Sep 2023 19:23:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694831001; cv=none; d=google.com; s=arc-20160816; b=pAHb8Wwf8AWw2B/bVqRMAsJMmS+gxFtvO2zXIXGyMVqDvjfDJcsvQnUgtodUZc6BDI 1GP7/+t8Dk0HLuY5adqXs7/3gtpOasJNdfYEV4uXOQFQUrSbJg4Y3MIo/0oR26z1O2sr Rs4jivr4jEjUxBapArEl2EAb/VIEIuJPcLkhtf93UWJf9kOcLmGGAYThvlZLchBA+m3Z Rmiup2/nt43TXvPnK62kgL/k5MILqH8YZmgc+c5Lc0JTaIgINCNqo3XckjTkktmreJUU b4aHhnfUqjnWi4Zs9sx4s0ox/AG5U69sbhbWWEkVjBK/5sTEmbhlEuiRCOmNnyyjcN6I P1Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XMv7ZYg2RAYZEyI+n5LIQn6oa94Zk4SRuNBtg0vN5u8=; fh=BzdeVYqZhG5iuwuKJRNLP969rvCput73lx0iwx2zu7A=; b=bcJPiV0wIazDTury1Q8WND4TW7zABfZWB8FJVe/z72BkZcl5AwLF64fYBVoTA9kwip igPw5+Qzj/+9ps30NYWoqkR54mBrhI5YnpVuM1nWPZJplFGBK0PDpyjZAIuXams9KzFV QYjVkPjquS2TYM1oV2eq1x5z6SPN4u2VS9HqBs6NtTHdBBOaJJOUvUjeeiIF77rCQQLs JxwTVOAPyfGf3WCBGQxHam4E93PeGijHV+FISr5mnm12BvlC4C6rI+QmuKhveXN8KKOm Ji8twKponOFA1rVStRoVhJao+5ZhEOF5lgs+y2DVCCwtHIDwBXWh+ZumkPWDowET7nkM CmeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VOW72m4+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id o66-20020a634145000000b00563de199314si4090719pga.896.2023.09.15.19.23.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:23:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VOW72m4+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 80486827331F; Fri, 15 Sep 2023 19:11:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238349AbjIPCKY (ORCPT <rfc822;toshivichauhan@gmail.com> + 27 others); Fri, 15 Sep 2023 22:10:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235779AbjIPCKD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 15 Sep 2023 22:10:03 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9889B173C for <linux-kernel@vger.kernel.org>; Fri, 15 Sep 2023 19:09:58 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0623C433C8; Sat, 16 Sep 2023 02:09:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694830198; bh=DNLoykVfcLunzlqLq92ppaTwpNSuqGnLy/p/x4HnboY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VOW72m4+tcRyIHubvfGta2PK60I+MtD4+v+Xr+eH0EemTaxQPuTpCGCkUMLnjCAa+ o/2hmGpyllSeicIhd3FysLe0WsJ8ETtGUxFa7DFAmLgljTuv8bSbEQX785z8vISz2W ULi87aU+zbisxJZKBJ7bMQ5GwcLGJYKr1vBzMsiUzRCaqaatj7WjHpB7n5/570XMYj QjUNjvbxGcwD9TPVr7FBbPoMwNYPLh3eRe/8kKkE8me85m9jNJL4GfTQoKudWnzImQ vsDZ2/2R8LpB8aAXw+R0ARwhL5AEaBGZAzoS/PYxAr/WWECQg4TsDtiObwoyz/ZEpc mD1gZAGqr5wfQ== 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 2/9] mm/damon/sysfs-schemes: use nr_accesses_bp as the source of tried_regions/<N>/nr_accesses Date: Sat, 16 Sep 2023 02:09:38 +0000 Message-Id: <20230916020945.47296-3-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230916020945.47296-1-sj@kernel.org> References: <20230916020945.47296-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 15 Sep 2023 19:11:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777159112248081811 X-GMAIL-MSGID: 1777159112248081811 |
Series |
mm/damon: implement DAMOS apply intervals
|
|
Commit Message
SeongJae Park
Sept. 16, 2023, 2:09 a.m. UTC
DAMON sysfs interface exposes access rate of each region via DAMOS tried
regions directory. For this, the nr_accesses field of the region is
used. DAMOS was actually using nr_accesses in the past, but it uses
nr_accesses_bp now. Use the value that it is really using as the
source.
Note that this doesn't expose nr_accesses_bp as is (in basis point), but
after converting it to the natural number by dividing the value by
10,000. Hence there is no behavioral change from users' perspective.
Signed-off-by: SeongJae Park <sj@kernel.org>
---
mm/damon/sysfs-schemes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index 527e7d17eb3b..093700f50b18 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -31,7 +31,7 @@ static struct damon_sysfs_scheme_region *damon_sysfs_scheme_region_alloc( return NULL; sysfs_region->kobj = (struct kobject){}; sysfs_region->ar = region->ar; - sysfs_region->nr_accesses = region->nr_accesses; + sysfs_region->nr_accesses = region->nr_accesses_bp / 10000; sysfs_region->age = region->age; INIT_LIST_HEAD(&sysfs_region->list); return sysfs_region;