From patchwork Sat Sep 16 02:09:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 140882 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1438240vqi; Fri, 15 Sep 2023 19:23:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHEI1mGCRFcyxQHwIZP9utnHqY+IzY5HKv8wvwYHTS5PiDSaGI74APpn+k9D+gbnfUdodVT X-Received: by 2002:a17:90a:bc45:b0:268:18e:9dfa with SMTP id t5-20020a17090abc4500b00268018e9dfamr3331544pjv.5.1694831007829; Fri, 15 Sep 2023 19:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694831007; cv=none; d=google.com; s=arc-20160816; b=qw6CC8jXBO5NFhTuYQDJ+Q4e4wijuanBYJmEdCzA+XgnzwC6LD9NOqe2AY/kfnsMUN m5Dm7OAj2JM7/5rYVPTYy1dGqCqg9/WyzeCeVy/DLwgPGMUFs7jHooyMxo0ZYaSX2NQO 55OKbW0wBItL4MBiOEZnaXKB4ckVOSarBTpaoEzX32G3EiBbGq18DdCZ1fDATvvnTQXN ujHHf9Bvr2GJ1Dx5dpJCqZiHB6gSqJbjJRTnTgcJTxoxqoQQAMH62OdWwiVdkiKbu9u4 m9ckfKsaoxnRpxRShiTRxJrht7RdhfmDQYmXRKIMTW0ekuaE94B+DeGYEYZZscnepRwI zcgg== 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=mxS0NDdtbPRnU18dk9+OTOoH37taYp/+bQDsW+ALhsc=; fh=BzdeVYqZhG5iuwuKJRNLP969rvCput73lx0iwx2zu7A=; b=pmdmmOk9fCl0hhDlNfjRtRTwSkZ8g4zPtt9W0j6lbQmBgGa3FnM0txMLm/K/vOvjIM 2CeqEBhfLFeave71dw2tVIKQWvPerdSIOoWPRy6Lj7yAoSkZgcVGUk6IJ1U2SYRrh8ZN UvI0mBmWZt466oY1hqUXkSeN7xlnpCED0DYZQUb8J0ZK9FYfAih6I7EFua+HZ9rHjb2U cOkTM/QcCe06Ig6JFU7Y9FIldFZIjEKYb2v03hDzcbhkbc5DO2GqauMbwiUyjIazhE3K UPKDMA6+KgqkyE3jH+VLIjH2idVqoF92T4+EZGWsU9Vo4dGWFwXlFS7QVwYJBc+OGdWS vxtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DE5n19QT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id co8-20020a17090afe8800b00268278c51e3si6180032pjb.49.2023.09.15.19.23.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:23:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DE5n19QT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 8CDBE826C0E0; Fri, 15 Sep 2023 19:11:04 -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 S238295AbjIPCKW (ORCPT + 27 others); Fri, 15 Sep 2023 22:10:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235752AbjIPCKB (ORCPT ); Fri, 15 Sep 2023 22:10:01 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 867D6173C for ; Fri, 15 Sep 2023 19:09:56 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC149C433C8; Sat, 16 Sep 2023 02:09:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694830196; bh=VEo1bT4L3oASolFpAiFgoKtkxwTv3u9FxZ+yfBw7tjQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DE5n19QTrLA/q3MCbj6txVWl1uVLgvfvimtQFgvcddmHPnYMGBO3fFDzwOKCAE1Ea 6ZYLcxHkm5CTWFprrqRjF2KtaYm2Pz1lRDiwdDYTuq77AJA0RSUh5o65EYEXrOnEHs xWMKylLYUB2wBv7QR/yROAzDf7cNTsquwx29G72dwKWAZ+EmwIigZOPRJm/YCHaQd8 oGtGCMonOLobfZnVSyKN0ZWlbECSyGnvfq2vefdC/SACWvKlxDcHJ9gAJk10AUBeAe OUhBoRM9HauQyDIauN7P46WxsCKPvr3KFTi/4wXKmwRabKlNI1DRkIECckLti/Mt8P t2+3IdJ/6uTGA== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/9] mm/damon/core: make DAMOS uses nr_accesses_bp instead of nr_accesses Date: Sat, 16 Sep 2023 02:09:37 +0000 Message-Id: <20230916020945.47296-2-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 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: 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:04 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777159119214202182 X-GMAIL-MSGID: 1777159119214202182 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 to users. Meanwhile, it allows DAMOS to apply the schemes in a time interval that less than the aggregation interval. It could be useful and more flexible for some cases. Do it. Signed-off-by: SeongJae Park --- mm/damon/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/damon/core.c b/mm/damon/core.c index b15cf47d2d29..79fef5145a4b 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -770,12 +770,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; } From patchwork Sat Sep 16 02:09:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 140881 Return-Path: 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 + 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 ); 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 ; 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 To: Andrew Morton Cc: SeongJae Park , 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//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 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: 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 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 --- 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; From patchwork Sat Sep 16 02:09:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 140878 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1436835vqi; Fri, 15 Sep 2023 19:18:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0pBQTeGu2cE47ICGrP5r6ZtVxqxo5nIFO5a6v5XSS697q+dxMnz1dsmHa8O3BGz5LTd3/ X-Received: by 2002:a05:6a21:7785:b0:14c:def2:6954 with SMTP id bd5-20020a056a21778500b0014cdef26954mr3879545pzc.36.1694830726889; Fri, 15 Sep 2023 19:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694830726; cv=none; d=google.com; s=arc-20160816; b=NI/qdHtN8eZ5NLyvTxWR/YFvGx/vX05gzEbHikRYBt8y48S8MrrHyW7x/EVEtiaazp pKzsw5AHT/nObh46GPWFUk1vKSmuAXwNUzqKVxlYj8JfXvw0mmehCC2Etr9l3Fq7lUPJ 5pIP5FIfQe6ODNtnMIOxu1OWNVOUTjh/OiJ+umPlMFnko4m7blfjorfEKX0/gP4MgJvA EScZdK4KST/8Zq2jN2bT6lwk856Awwqqhkhi8awN0FxvDgFY+P2LYN9oFMBDhuDe5OrQ cKqo/33k71GGY4NCv1Vg0h5CjQ0BXt7sSCOdmC93fJz7MAnPsDeiaNGkshXy292EH/1+ 4Fdg== 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=tjIZD4tmf+jZpp9P0nQE+oJlGzUWJFPJIvL3wjD6Bi4=; fh=BtCI6lkGDJTtX/kUKY7W1m6QbhCosJAsbhe/Uk6QBzA=; b=XMnRHBHU2ZajHfZMX9f/ClV/ZlegJUAax+zGFx6xhnAW+liT6hfYKDXWrcAhaxX75c /v4UMY6n7kC4a2i58lKJMxLIj6vFcLyOjz0OCMgUCHzw/UMu7CVi0aJS8GS3fZ8MTeNT lVT3YGlFjdTF65dkUOUjuEPBiMlWBlSB+dkBmxeGeFLP5Q69GJUB1y6xLnc0r2jViuqA 2v1HZk3IxiccFHycXtiveMQa4DF17FI47BPowEb++8IAJGdJ2D9XzyH8K9E2ppUu0jCT PJcJV8Nc5pexnYeZkONIXugMYcuFGezdFKVyzeWeDWqZc0+5x7zDn/csmx6VjfAwK/PT dh3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HYpkwR/i"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id y9-20020a17090264c900b001c44c0f8d96si693342pli.251.2023.09.15.19.18.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:18:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HYpkwR/i"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id D0DC480E2241; Fri, 15 Sep 2023 19:11:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238483AbjIPCK3 (ORCPT + 27 others); Fri, 15 Sep 2023 22:10:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237357AbjIPCKK (ORCPT ); Fri, 15 Sep 2023 22:10:10 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D22901FCE; Fri, 15 Sep 2023 19:10:00 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E761AC433C9; Sat, 16 Sep 2023 02:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694830200; bh=JTX8roVUkoUgDpJsiDynoUw1rs0WkWhqwrFFpgZDGAc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HYpkwR/inXjdyb2gngS4f7p4SFsHSMS3VtSAcLEHye2QBHmQXeQgFFKB1NqwqQ069 aJfOypDmoD9vgbsIZl9SG2hsjrARJmocVcmfc/djvDJOFqWJS/uhEYh7mMfeMcasN3 73lPOFle6veIKb+soiMhLbfXEYO1mG/l1prQj89951ycdnVn6p3OtlOpLDZ4nd1Yj7 4vwABlBysLdDFobnl2b32WnWVtx24Dl+WTM0ek1K1yrfioD5GPKq1jvihIEL2IfNhB tBJSx15beCsLcfE3aARUMt7pYaWx5eQrqJiM4aOxKic2a1uSGSjm3HDYEMadPWoeB3 9twb5KOKOqTMQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Steven Rostedt , damon@lists.linux.dev, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/9] mm/damon/core: use nr_accesses_bp as a source of damos_before_apply tracepoint Date: Sat, 16 Sep 2023 02:09:39 +0000 Message-Id: <20230916020945.47296-4-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 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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 15 Sep 2023 19:11:18 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777158824427694209 X-GMAIL-MSGID: 1777158824427694209 damos_before_apply tracepoint is exposing access rate of DAMON regions using nr_accesses field of regions, which was actually used by DAMOS in the past. However, it has changed to use nr_accesses_bp instead. Update the tracepoint to expose the value that DAMOS is really using. Note that it doesn't expose the value as is in the basis point, but after converting it to the natural number by dividing it by 10,000. Therefore this change doesn't make user-visible behavioral differences. Signed-off-by: SeongJae Park --- include/trace/events/damon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/events/damon.h b/include/trace/events/damon.h index 19930bb7af9a..23200aabccac 100644 --- a/include/trace/events/damon.h +++ b/include/trace/events/damon.h @@ -36,7 +36,7 @@ TRACE_EVENT_CONDITION(damos_before_apply, __entry->target_idx = target_idx; __entry->start = r->ar.start; __entry->end = r->ar.end; - __entry->nr_accesses = r->nr_accesses; + __entry->nr_accesses = r->nr_accesses_bp / 10000; __entry->age = r->age; __entry->nr_regions = nr_regions; ), From patchwork Sat Sep 16 02:09:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 140883 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1438241vqi; Fri, 15 Sep 2023 19:23:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH13svFU3v278+IP2xcqtFCPw1WHkT+zaSchKvLGhvCAPlaZfWRGamufxc1mevxIq47898G X-Received: by 2002:a92:c26b:0:b0:349:2bb0:c87d with SMTP id h11-20020a92c26b000000b003492bb0c87dmr3997826ild.32.1694831007971; Fri, 15 Sep 2023 19:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694831007; cv=none; d=google.com; s=arc-20160816; b=UTkwtJIU5NP421GihroPzZoXruEK9SKFUBCloNe295VbvRyuu4sU6uz7nZDhs9O9pM JPQDULcr6Jeh9qPuNGd8gylpcBPteqxvi9R/EoZMzPt4zmMTAuNNOurDZaRpmtP/eY6E yTxoTLekyA4vr3O+etbflXdKly75xIP/vn/RQtyGStaCI1aV50KDqFCeqlNeka5vReuj X4pe+hv2OgKpTKdQWjpYmf+zHqr75i7Hrj1o8Rj8MbEEFR+InSFEtc7I6xgtpEAh/+PW 7jHgSHW2eVM8I/yWy4XrNaHVdxdnTdOsljKYRphShpQFnvtH/zzwUZxdU1WNgybYGsWn Vq2g== 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=DVEaMa28rX+Gs6eO+uCsU5jNGvIdC15qzAuqzh03Phw=; fh=BzdeVYqZhG5iuwuKJRNLP969rvCput73lx0iwx2zu7A=; b=NAPad3PG3l/O3Kwao8RDSqM7lKy0fsyy5Jn8vP915Va2mwj9b4jKoLs+OZhHYolt5N 27GPPbYKYin7Pv96FI66H+gVPhWH0SiRlhUc0ogixvYzOidJ1BCDk0+2pNzBQV7nwGEM w/7MfNVmBBmvoDP3uWbtFacgWN5xFlNOlgLvUI0bVyEY4UdL/jMoaqnEChEmI515lTfo x3RxEf675qB0BZMBQVcj2HibQwcuGCLRCM6Yilu9zEhlXZpVaEqSNiNh6ICz+3zn/cVs 92EmxJpreUH3AuNVbzWzwwvVUqK4+e7gt5jud3fjniVG0ArR1HQOCt0q2IG1uAsVnh6k cuDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JRCz0chf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o66-20020a634145000000b0056532a14f54si4032767pga.900.2023.09.15.19.23.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:23:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JRCz0chf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 D5E5382AE2E8; Fri, 15 Sep 2023 19:11:22 -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 S238512AbjIPCKa (ORCPT + 27 others); Fri, 15 Sep 2023 22:10:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237777AbjIPCKL (ORCPT ); Fri, 15 Sep 2023 22:10:11 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 679061FD2 for ; Fri, 15 Sep 2023 19:10:03 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E686C433C8; Sat, 16 Sep 2023 02:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694830203; bh=JUVOiKnbFP1P3h1N8WZGp4VELJOnjvi4EWBeSgCcdes=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JRCz0chf72Vh9+e392vovS+W0gIrf5nqSKcbjSTAfrHR0WzpUZcZfXzufoaUDoCrG i54SHcNj/Dq3jrj0ZdmDdiX84betAgXfTm6kFnaElrGpDSRLgHJ+2jYq64pyXhElOi zdV/+zkOrE0oDT1D1rMiL53MrK1fTQXIj9M0sOxVMejcKxqK54BTp22C9ne46CMjtc tdp6zOu920EzUgs9EaAYhTinj7HWrSt1Hd7fT10QftDqNTxQlWrN7BUHS7gm/skaJr RkgZTzkfGn5ipCSRVOhTpqu7iyRNhME3KIXVvuTNM+V4BPnnmKDjhUEW3GS5kJlxDz h2qUHteRiyjGw== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/9] mm/damon/core: implement scheme-specific apply interval Date: Sat, 16 Sep 2023 02:09:40 +0000 Message-Id: <20230916020945.47296-5-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 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: 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:22 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777159119264171001 X-GMAIL-MSGID: 1777159119264171001 DAMON-based operation schemes are applied for every aggregation interval. That was mainly because schemes were using nr_accesses, which be complete to be used for every aggregation interval. However, the schemes are now using nr_accesses_bp, which is updated for each sampling interval in a way that reasonable to be used. Therefore, there is no reason to apply schemes for each aggregation interval. The unnecessary alignment with aggregation interval was also making some use cases of DAMOS tricky. Quotas setting under long aggregation interval is one such example. Suppose the aggregation interval is ten seconds, and there is a scheme having CPU quota 100ms per 1s. The scheme will actually uses 100ms per ten seconds, since it cannobe be applied before next aggregation interval. The feature is working as intended, but the results might not that intuitive for some users. This could be fixed by updating the quota to 1s per 10s. But, in the case, the CPU usage of DAMOS could look like spikes, and would actually make a bad effect to other CPU-sensitive workloads. Implement a dedicated timing interval for each DAMON-based operation scheme, namely apply_interval. The interval will be sampling interval aligned, and each scheme will be applied for its apply_interval. The interval is set to 0 by default, and it means the scheme should use the aggregation interval instead. This avoids old users getting any behavioral difference. Signed-off-by: SeongJae Park --- include/linux/damon.h | 17 ++++++++-- mm/damon/core.c | 72 ++++++++++++++++++++++++++++++++++++---- mm/damon/dbgfs.c | 3 +- mm/damon/lru_sort.c | 2 ++ mm/damon/reclaim.c | 2 ++ mm/damon/sysfs-schemes.c | 2 +- 6 files changed, 87 insertions(+), 11 deletions(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index 491fdd3e4c76..27b995c22497 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -314,16 +314,19 @@ struct damos_access_pattern { * struct damos - Represents a Data Access Monitoring-based Operation Scheme. * @pattern: Access pattern of target regions. * @action: &damo_action to be applied to the target regions. + * @apply_interval_us: The time between applying the @action. * @quota: Control the aggressiveness of this scheme. * @wmarks: Watermarks for automated (in)activation of this scheme. * @filters: Additional set of &struct damos_filter for &action. * @stat: Statistics of this scheme. * @list: List head for siblings. * - * For each aggregation interval, DAMON finds regions which fit in the + * For each @apply_interval_us, DAMON finds regions which fit in the * &pattern and applies &action to those. To avoid consuming too much * CPU time or IO resources for the &action, "a is used. * + * If @apply_interval_us is zero, &damon_attrs->aggr_interval is used instead. + * * To do the work only when needed, schemes can be activated for specific * system situations using &wmarks. If all schemes that registered to the * monitoring context are inactive, DAMON stops monitoring either, and just @@ -340,6 +343,14 @@ struct damos_access_pattern { struct damos { struct damos_access_pattern pattern; enum damos_action action; + unsigned long apply_interval_us; +/* private: internal use only */ + /* + * number of sample intervals that should be passed before applying + * @action + */ + unsigned long next_apply_sis; +/* public: */ struct damos_quota quota; struct damos_watermarks wmarks; struct list_head filters; @@ -641,7 +652,9 @@ void damos_add_filter(struct damos *s, struct damos_filter *f); void damos_destroy_filter(struct damos_filter *f); struct damos *damon_new_scheme(struct damos_access_pattern *pattern, - enum damos_action action, struct damos_quota *quota, + enum damos_action action, + unsigned long apply_interval_us, + struct damos_quota *quota, struct damos_watermarks *wmarks); void damon_add_scheme(struct damon_ctx *ctx, struct damos *s); void damon_destroy_scheme(struct damos *s); diff --git a/mm/damon/core.c b/mm/damon/core.c index 79fef5145a4b..5eb649bd002f 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -313,7 +313,9 @@ static struct damos_quota *damos_quota_init_priv(struct damos_quota *quota) } struct damos *damon_new_scheme(struct damos_access_pattern *pattern, - enum damos_action action, struct damos_quota *quota, + enum damos_action action, + unsigned long apply_interval_us, + struct damos_quota *quota, struct damos_watermarks *wmarks) { struct damos *scheme; @@ -323,6 +325,13 @@ struct damos *damon_new_scheme(struct damos_access_pattern *pattern, return NULL; scheme->pattern = *pattern; scheme->action = action; + scheme->apply_interval_us = apply_interval_us; + /* + * next_apply_sis will be set when kdamond starts. While kdamond is + * running, it will also updated when it is added to the DAMON context, + * or damon_attrs are updated. + */ + scheme->next_apply_sis = 0; INIT_LIST_HEAD(&scheme->filters); scheme->stat = (struct damos_stat){}; INIT_LIST_HEAD(&scheme->list); @@ -335,9 +344,21 @@ struct damos *damon_new_scheme(struct damos_access_pattern *pattern, return scheme; } +static void damos_set_next_apply_sis(struct damos *s, struct damon_ctx *ctx) +{ + unsigned long sample_interval = ctx->attrs.sample_interval ? + ctx->attrs.sample_interval : 1; + unsigned long apply_interval = s->apply_interval_us ? + s->apply_interval_us : ctx->attrs.aggr_interval; + + s->next_apply_sis = ctx->passed_sample_intervals + + apply_interval / sample_interval; +} + void damon_add_scheme(struct damon_ctx *ctx, struct damos *s) { list_add_tail(&s->list, &ctx->schemes); + damos_set_next_apply_sis(s, ctx); } static void damon_del_scheme(struct damos *s) @@ -558,6 +579,7 @@ int damon_set_attrs(struct damon_ctx *ctx, struct damon_attrs *attrs) { unsigned long sample_interval = attrs->sample_interval ? attrs->sample_interval : 1; + struct damos *s; if (attrs->min_nr_regions < 3) return -EINVAL; @@ -573,6 +595,10 @@ int damon_set_attrs(struct damon_ctx *ctx, struct damon_attrs *attrs) damon_update_monitoring_results(ctx, attrs); ctx->attrs = *attrs; + + damon_for_each_scheme(s, ctx) + damos_set_next_apply_sis(s, ctx); + return 0; } @@ -1094,14 +1120,29 @@ static void kdamond_apply_schemes(struct damon_ctx *c) struct damon_target *t; struct damon_region *r, *next_r; struct damos *s; + unsigned long sample_interval = c->attrs.sample_interval ? + c->attrs.sample_interval : 1; + bool has_schemes_to_apply = false; damon_for_each_scheme(s, c) { + if (c->passed_sample_intervals != s->next_apply_sis) + continue; + + s->next_apply_sis += + (s->apply_interval_us ? s->apply_interval_us : + c->attrs.aggr_interval) / sample_interval; + if (!s->wmarks.activated) continue; + has_schemes_to_apply = true; + damos_adjust_quota(c, s); } + if (!has_schemes_to_apply) + return; + damon_for_each_target(t, c) { damon_for_each_region_safe(r, next_r, t) damon_do_apply_schemes(c, t, r); @@ -1372,11 +1413,19 @@ static void kdamond_init_intervals_sis(struct damon_ctx *ctx) { unsigned long sample_interval = ctx->attrs.sample_interval ? ctx->attrs.sample_interval : 1; + unsigned long apply_interval; + struct damos *scheme; ctx->passed_sample_intervals = 0; ctx->next_aggregation_sis = ctx->attrs.aggr_interval / sample_interval; ctx->next_ops_update_sis = ctx->attrs.ops_update_interval / sample_interval; + + damon_for_each_scheme(scheme, ctx) { + apply_interval = scheme->apply_interval_us ? + scheme->apply_interval_us : ctx->attrs.aggr_interval; + scheme->next_apply_sis = apply_interval / sample_interval; + } } /* @@ -1428,19 +1477,28 @@ static int kdamond_fn(void *data) if (ctx->ops.check_accesses) max_nr_accesses = ctx->ops.check_accesses(ctx); - sample_interval = ctx->attrs.sample_interval ? - ctx->attrs.sample_interval : 1; if (ctx->passed_sample_intervals == next_aggregation_sis) { - ctx->next_aggregation_sis = next_aggregation_sis + - ctx->attrs.aggr_interval / sample_interval; kdamond_merge_regions(ctx, max_nr_accesses / 10, sz_limit); if (ctx->callback.after_aggregation && ctx->callback.after_aggregation(ctx)) break; - if (!list_empty(&ctx->schemes)) - kdamond_apply_schemes(ctx); + } + + /* + * do kdamond_apply_schemes() after kdamond_merge_regions() if + * possible, to reduce overhead + */ + if (!list_empty(&ctx->schemes)) + kdamond_apply_schemes(ctx); + + sample_interval = ctx->attrs.sample_interval ? + ctx->attrs.sample_interval : 1; + if (ctx->passed_sample_intervals == next_aggregation_sis) { + ctx->next_aggregation_sis = next_aggregation_sis + + ctx->attrs.aggr_interval / sample_interval; + kdamond_reset_aggregated(ctx); kdamond_split_regions(ctx); if (ctx->ops.reset_aggregated) diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c index 124f0f8c97b7..dc0ea1fc30ca 100644 --- a/mm/damon/dbgfs.c +++ b/mm/damon/dbgfs.c @@ -278,7 +278,8 @@ static struct damos **str_to_schemes(const char *str, ssize_t len, goto fail; pos += parsed; - scheme = damon_new_scheme(&pattern, action, "a, &wmarks); + scheme = damon_new_scheme(&pattern, action, 0, "a, + &wmarks); if (!scheme) goto fail; diff --git a/mm/damon/lru_sort.c b/mm/damon/lru_sort.c index 7b8fce2f67a8..3ecdcc029443 100644 --- a/mm/damon/lru_sort.c +++ b/mm/damon/lru_sort.c @@ -158,6 +158,8 @@ static struct damos *damon_lru_sort_new_scheme( pattern, /* (de)prioritize on LRU-lists */ action, + /* for each aggregation interval */ + 0, /* under the quota. */ "a, /* (De)activate this according to the watermarks. */ diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c index 648d2a85523a..ab974e477d2f 100644 --- a/mm/damon/reclaim.c +++ b/mm/damon/reclaim.c @@ -142,6 +142,8 @@ static struct damos *damon_reclaim_new_scheme(void) &pattern, /* page out those, as soon as found */ DAMOS_PAGEOUT, + /* for each aggregation interval */ + 0, /* under the quota. */ &damon_reclaim_quota, /* (De)activate this according to the watermarks. */ diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index 093700f50b18..3d30e85596b0 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -1610,7 +1610,7 @@ static struct damos *damon_sysfs_mk_scheme( .low = sysfs_wmarks->low, }; - scheme = damon_new_scheme(&pattern, sysfs_scheme->action, "a, + scheme = damon_new_scheme(&pattern, sysfs_scheme->action, 0, "a, &wmarks); if (!scheme) return NULL; From patchwork Sat Sep 16 02:09:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 140873 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1435303vqi; Fri, 15 Sep 2023 19:13:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEcA0UPMhSsvHSZ2Ov69OYi6Mkx3OQtEZQZyGE8dBxajw45D3uQZA/Yo42U+5R9WbQZObfm X-Received: by 2002:a17:90a:9b02:b0:26d:4ab3:fe11 with SMTP id f2-20020a17090a9b0200b0026d4ab3fe11mr2935322pjp.24.1694830414074; Fri, 15 Sep 2023 19:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694830414; cv=none; d=google.com; s=arc-20160816; b=DdPpE/V0nZ99zv8+kPLzxbobU7W+D3Aqyf2FHoufOTGeYdfPbybgN/EF25RkWxVoI5 tlJYbJjCXinjCzELjjnXjzGuXcYPtWhrKCNo0GGru3TCpFvoxhP7yPNW3s2EdppSXUu9 I+1h00I8jDsqBTQkDv/We7YTCnCCOTM6V5e7uL1Zrqyp6l0vhPBX3BgcCijfuvAgzaWJ uHoX+daj0vxJKk7yVdT+Or0N/Z0x4Febcdh/sW6cKMgmt0N+C1T+29lwuKi4mtespdwy SH6Bp4KFq5kSJbYYLLG5MXDYCDLhH2q64hikipyx0dTWNGiqhJtg9dChqeyTaSI5uunl CdnQ== 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=/taA131RLMOon4BDgU01sqZZPFDcXmF9GVqTYwaZBbU=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=jzcwDQFWNdci8IS6noC89luv9uIBvUneo5pYikzRsX1uCAKr9KgRiH4EFExSpKBG2v Mfm0DmL5kO0ace8292HM6hyC32FO54yI7aswXECVVrNpztLEYEybvLDOZ7MPUVhdzy+0 GWCIQE4IHt1vVJ2gnt7sO5mhytrdb1p8qixYA+L09HUStcaZx7o5H79XEci/GVSSmuLT yclGYLScuUHgLjqyobmCEp/0xkx5hdTVpTFgyJYDY+5YCTMfssnssBlMh5MUn9XPJS1U w4cgAlNeIWKzVJyKwx5UP2ddUFjDvFavFImXgJE2yAHS0fFWtgbg2q7Tde4dvrBJuTK4 9/Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D5fwDD0t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id ne14-20020a17090b374e00b002719ad11d97si3954580pjb.137.2023.09.15.19.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:13:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D5fwDD0t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id D088382ABABD; Fri, 15 Sep 2023 19:11:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238455AbjIPCK1 (ORCPT + 27 others); Fri, 15 Sep 2023 22:10:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237655AbjIPCKL (ORCPT ); Fri, 15 Sep 2023 22:10:11 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EA771FD6; Fri, 15 Sep 2023 19:10:05 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 382ABC433CA; Sat, 16 Sep 2023 02:10:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694830204; bh=nsy3XKNul10yj7Y4C7UdRuVcXMAYGZfrN5/ruA9B7bY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D5fwDD0thq/Rt72hGYBK0NcXdn7gIm9hhCVt0E9COGIdJlZlT5diQNJHgrqlRm2/w /hJeRDI7YMNSa34674k2tuFz1TEtFUrS112DzxcXapnvRWe7lRkVkVGzUcP4Q6Mn1S RpaUPA/u6e+cUlUNhbCsmnNL8YEvnugttaxfg5Eu55gGGazyO5netSuj1JvK/y7F1I jvU2m8i4d4PyQ79MLBzTW0/6LiTw7gsPVE9Ca7ZMS7lGESQDY3HJxS9Z7YfMVuCJuP eXOAdloC1XbqCLlzqjd+bAxppTZqzXuG+XazVEwVZw+8OGlmGvK9EkXfP830RlrvVI IRF8dNOB4kzZA== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/9] Docs/mm/damon/design: document DAMOS apply intervals Date: Sat, 16 Sep 2023 02:09:41 +0000 Message-Id: <20230916020945.47296-6-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 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 15 Sep 2023 19:11:24 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777158496155555058 X-GMAIL-MSGID: 1777158496155555058 Update DAMON design doc to explain about DAMOS apply intervals. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 18e9b42673f8..1f7e0586b5fa 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -259,7 +259,8 @@ works, DAMON provides a feature called Data Access Monitoring-based Operation Schemes (DAMOS). It lets users specify their desired schemes at a high level. For such specifications, DAMON starts monitoring, finds regions having the access pattern of interest, and applies the user-desired operation actions -to the regions as soon as found. +to the regions, for every user-specified time interval called +``apply_interval``. .. _damon_design_damos_action: From patchwork Sat Sep 16 02:09:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 140884 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1438496vqi; Fri, 15 Sep 2023 19:24:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFeycm9e5EiMbz2dhLQDnJH4jnc/eqsZsbONUVo7v+64O/LHjmFVd7zEng8WyMA+00dcJ2A X-Received: by 2002:a05:6a20:3d1b:b0:153:8983:d87c with SMTP id y27-20020a056a203d1b00b001538983d87cmr9851645pzi.22.1694831067380; Fri, 15 Sep 2023 19:24:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694831067; cv=none; d=google.com; s=arc-20160816; b=EOL3jCU8utSVPGBkud8vZgE+ArSh7c9cSGKgfupA9qV9FaC30eTmgHHUPZSNmtOvPl gKYRcwBxptq03/NjTlkpybs3XGZOC0M1F0Yqe8ewLw83eDdUMuyfsN7U/qZY8h3pq9EF AnVHWe/vCJjoiPRPv1NtBxIm1L+7uv82sDnHKh+nRFFy8ojajqdEGcZWl2nTL6MlRns2 vYvTPZCmOCPztgNpVB8W3O6gUJpCxKTEt6D3Epq1NokzGi4fN0HSUpWrvIAZA8lFGiNY n5RPp5hE+SPJpkX1ErZDw7NYAwEYsRwyUcc9ELlcWYwn1F11ScENl8l0cx8pv7z4h8aj Qa8Q== 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=NUas3Av5c7Yuwe0Tw6b8l7+Jb4Jf4UY1Y9mRHVVQKto=; fh=BzdeVYqZhG5iuwuKJRNLP969rvCput73lx0iwx2zu7A=; b=Z68J76jHqa3Ect0JDGT8IAsg1kiLNvdHbXGf/DVS0BwAAR+TbXAGwYyRZWWC1Ylj5A M1Mk3xo47UA4hIqCtPao/xmZJH+Gx9Rib9ieRombxcQcxEtS9Uv0c2sG0z2KKA5VtVuH 5HbZq47vbt0efDqZwaTK9J6/Fy9GQwYEbs7Vjg7rcWaWprXzR4iUtuO+/CgTD2cxdX/F pho8q+wsDpa+WPZrCrchDPjbH9ZtSGaatNUS3eNWSDlQsjY2C/Xne1ZfYrUEmHCT7s9O m8nPygYZV9dTs1Z1d3JCxTIT70CsE+2AsJtIi27f4Qdv+wArbPOF8Idl6bVFGExzHAv9 Dzug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XUb0Za8b; 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 x26-20020a63b21a000000b0056baff5c553si4134177pge.101.2023.09.15.19.24.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:24:27 -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=XUb0Za8b; 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 DE0658270DED; Fri, 15 Sep 2023 19:11:11 -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 S238409AbjIPCKZ (ORCPT + 27 others); Fri, 15 Sep 2023 22:10:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237683AbjIPCKL (ORCPT ); Fri, 15 Sep 2023 22:10:11 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84BC9173C for ; Fri, 15 Sep 2023 19:10:06 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8E34C433CB; Sat, 16 Sep 2023 02:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694830206; bh=CxNdbzA0gxD0qFOAF+9FaJdfdv1eofTN2A5LeDdD5oY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XUb0Za8b5NIRMAAJKo0tr9S53C++iGSYlP/jV4+2zMzBqfI5andQM3B8DKRE56GBE JYVNEg6j5tUbTrcXRo4I1lkPLG42yvwG5xUWCn3ezU4XMMbz2mOMwtn8B6BlIZq/d4 ICfyBmkefS09qC8by3z7VGo0i/vBV1m92PDvsbYYIwkdYLNmCZt/tpLHa+pEUw1vte RUoB1p1dMYcv5w1MNew42XFfsi5Wj+8P1zNARMuVwKQcUxazpj71sjgncklfPPnxin hiFnZpeP0MrQ5VCdcqcs8Hz8fv0mc7IYZ0/BWUsmqotVbhAEPBu1U+6oDF5nxeh2GC 5OM5b/TUAD5og== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/9] mm/damon/sysfs-schemes: support DAMOS apply interval Date: Sat, 16 Sep 2023 02:09:42 +0000 Message-Id: <20230916020945.47296-7-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 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,URIBL_BLOCKED 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: 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:11 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777159181378054615 X-GMAIL-MSGID: 1777159181378054615 Update DAMON sysfs interface to support DAMOS apply intervals by adding a new file, 'apply_interval_us' in each scheme directory. Users can set and get the interval for each scheme in microseconds by writing to and reading from the file. Signed-off-by: SeongJae Park --- mm/damon/sysfs-schemes.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index 3d30e85596b0..a7d70b95c4dd 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -1121,6 +1121,7 @@ struct damon_sysfs_scheme { struct kobject kobj; enum damos_action action; struct damon_sysfs_access_pattern *access_pattern; + unsigned long apply_interval_us; struct damon_sysfs_quotas *quotas; struct damon_sysfs_watermarks *watermarks; struct damon_sysfs_scheme_filters *filters; @@ -1141,7 +1142,7 @@ static const char * const damon_sysfs_damos_action_strs[] = { }; static struct damon_sysfs_scheme *damon_sysfs_scheme_alloc( - enum damos_action action) + enum damos_action action, unsigned long apply_interval_us) { struct damon_sysfs_scheme *scheme = kmalloc(sizeof(*scheme), GFP_KERNEL); @@ -1150,6 +1151,7 @@ static struct damon_sysfs_scheme *damon_sysfs_scheme_alloc( return NULL; scheme->kobj = (struct kobject){}; scheme->action = action; + scheme->apply_interval_us = apply_interval_us; return scheme; } @@ -1353,6 +1355,25 @@ static ssize_t action_store(struct kobject *kobj, struct kobj_attribute *attr, return -EINVAL; } +static ssize_t apply_interval_us_show(struct kobject *kobj, + struct kobj_attribute *attr, char *buf) +{ + struct damon_sysfs_scheme *scheme = container_of(kobj, + struct damon_sysfs_scheme, kobj); + + return sysfs_emit(buf, "%lu\n", scheme->apply_interval_us); +} + +static ssize_t apply_interval_us_store(struct kobject *kobj, + struct kobj_attribute *attr, const char *buf, size_t count) +{ + struct damon_sysfs_scheme *scheme = container_of(kobj, + struct damon_sysfs_scheme, kobj); + int err = kstrtoul(buf, 0, &scheme->apply_interval_us); + + return err ? err : count; +} + static void damon_sysfs_scheme_release(struct kobject *kobj) { kfree(container_of(kobj, struct damon_sysfs_scheme, kobj)); @@ -1361,8 +1382,12 @@ static void damon_sysfs_scheme_release(struct kobject *kobj) static struct kobj_attribute damon_sysfs_scheme_action_attr = __ATTR_RW_MODE(action, 0600); +static struct kobj_attribute damon_sysfs_scheme_apply_interval_us_attr = + __ATTR_RW_MODE(apply_interval_us, 0600); + static struct attribute *damon_sysfs_scheme_attrs[] = { &damon_sysfs_scheme_action_attr.attr, + &damon_sysfs_scheme_apply_interval_us_attr.attr, NULL, }; ATTRIBUTE_GROUPS(damon_sysfs_scheme); @@ -1413,7 +1438,11 @@ static int damon_sysfs_schemes_add_dirs(struct damon_sysfs_schemes *schemes, schemes->schemes_arr = schemes_arr; for (i = 0; i < nr_schemes; i++) { - scheme = damon_sysfs_scheme_alloc(DAMOS_STAT); + /* + * apply_interval_us as 0 means same to aggregation interval + * (same to before-apply_interval behavior) + */ + scheme = damon_sysfs_scheme_alloc(DAMOS_STAT, 0); if (!scheme) { damon_sysfs_schemes_rm_dirs(schemes); return -ENOMEM; @@ -1610,8 +1639,8 @@ static struct damos *damon_sysfs_mk_scheme( .low = sysfs_wmarks->low, }; - scheme = damon_new_scheme(&pattern, sysfs_scheme->action, 0, "a, - &wmarks); + scheme = damon_new_scheme(&pattern, sysfs_scheme->action, + sysfs_scheme->apply_interval_us, "a, &wmarks); if (!scheme) return NULL; @@ -1641,6 +1670,7 @@ static void damon_sysfs_update_scheme(struct damos *scheme, scheme->pattern.max_age_region = access_pattern->age->max; scheme->action = sysfs_scheme->action; + scheme->apply_interval_us = sysfs_scheme->apply_interval_us; scheme->quota.ms = sysfs_quotas->ms; scheme->quota.sz = sysfs_quotas->sz; From patchwork Sat Sep 16 02:09:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 140876 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1436271vqi; Fri, 15 Sep 2023 19:16:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFPeg/Y1k/wtmSsMWOb5hOxXHdn97S9kjbP6GOzF4u4sUMDotANeEkjn6ixMNJUKJUlf6z3 X-Received: by 2002:a17:903:2302:b0:1c0:afdb:1e6c with SMTP id d2-20020a170903230200b001c0afdb1e6cmr4399722plh.8.1694830613392; Fri, 15 Sep 2023 19:16:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694830613; cv=none; d=google.com; s=arc-20160816; b=NG35K5YPq4w6Dz1K822+5goNdlyqIqGcLUw9xDUrb3VXd+xGGDGGa0ypHpUpfAJEq6 2iPd0bcZbdOd6YB6BqgMy0QS0jgFZs5pHSgv9jsTBRVw6yrpJGU3BDzaa61hpmFpn2pl KZ03Oq/qnmi1e85MhlJnB0CvDzAJxvyprfFhMAnpqxqOLvW0kwnKFsRW4VXC3xVxGC5N 1XEpx91RU25chID39krW4VRTYY6KfgxgSLtHHfJdAr3LWgwn5eRFiSkfdnwSThlvJIG5 eMh225quoyphqfXmnQKs3DaDUWXnjoCv5SyZQ6SoZ6B/8bxGV3O9NpmJAXmDubuwLk1/ VAWA== 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=QGvGFrXp8RrAxQNw97Ot4AaOxtjAjo+XaujrL0TRHLE=; fh=9H4z7/o7y4OLn0xLmjdSk9Pth53+ED/R+iGnGlnIr7g=; b=o7jMd7saKJIztFUtCidc16IsKofC4wcYkfTc3ZGTQAb1jY15Lg5cdeabVXOPEYuuI0 DOFxqCTy4ILJQPiQ7+wU6mPpz50U5XvWtsYFCEtH8+yUgxP+/RG/R7pYfqrdVmebZtvp /F1uzidJix5et0P9sNgt8HrogFbOx2yqvqGyg0v+VGqRwiUgfdTmBUHbsCsCC82ns1H+ Y6V8O3C33YKiJkTlJP1NZy47xS81bhZo9JgS8acrL+GIgRd+cJzMTfpi75XWu3HfDM99 TS3dIVVDGIELVRRSlQtoIrSJPEy2DEebx0yYjYtTVCaxBgwVAdqQ9YsoBbFx1o6q9WUV ucOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SKhM4RCi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id j3-20020a170903028300b001c4329b77bfsi2031570plr.123.2023.09.15.19.16.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:16:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SKhM4RCi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id AF7CA80A0E34; Fri, 15 Sep 2023 19:11:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238560AbjIPCKc (ORCPT + 27 others); Fri, 15 Sep 2023 22:10:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237962AbjIPCKN (ORCPT ); Fri, 15 Sep 2023 22:10:13 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08EDD173C; Fri, 15 Sep 2023 19:10:08 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D3E2C433C9; Sat, 16 Sep 2023 02:10:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694830207; bh=I2fvF7L5MWw0Xd6X92VF2iHBCnxT4grJu/1S+mVZwhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SKhM4RCiPW/WTsWk5JRgIEMREqf3W6POSXpmuWjX+pNtpbUKhf9uSSUSCfWwTyVmt O0IjP4qBbo7CWUTv7afVCGvVFZEuytTab+a9LlQKW78/utBW81O3uDztR6cOx5ev64 pIX82Gd/olQdHoBt8QLIc80rPpTTZd16EGrkeI9BkD0T3iFbc0tiYmCH/AFuqA2fFY j4s2acBog/OIGBGeyBvNG+xzEImkvBvcF83HnXH9ajYft0z5YG6VdlyQ3G190oTika y4PWdtiibt/78XrDsqhUy3bsC2YFWGbyhY1zo9tv79mChFaA9yJPIfOFqFoQTp8xQD H4lwh2LfGuiTQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Shuah Khan , damon@lists.linux.dev, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/9] selftests/damon/sysfs: test DAMOS apply intervals Date: Sat, 16 Sep 2023 02:09:43 +0000 Message-Id: <20230916020945.47296-8-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 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 15 Sep 2023 19:11:29 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777158705116384590 X-GMAIL-MSGID: 1777158705116384590 Update DAMON selftests to test existence of the file for reading/writing DAMOS apply interval under each scheme directory. Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/sysfs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/damon/sysfs.sh b/tools/testing/selftests/damon/sysfs.sh index 60a9a305aef0..56f0230a8b92 100644 --- a/tools/testing/selftests/damon/sysfs.sh +++ b/tools/testing/selftests/damon/sysfs.sh @@ -175,6 +175,7 @@ test_scheme() ensure_dir "$scheme_dir" "exist" ensure_file "$scheme_dir/action" "exist" "600" test_access_pattern "$scheme_dir/access_pattern" + ensure_file "$scheme_dir/apply_interval_us" "exist" "600" test_quotas "$scheme_dir/quotas" test_watermarks "$scheme_dir/watermarks" test_filters "$scheme_dir/filters" From patchwork Sat Sep 16 02:09:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 140874 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1435315vqi; Fri, 15 Sep 2023 19:13:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEt0jcLpxw7dffxekaoUztD7KpiD1ifegljedW+TZ8+35q0aBy7Eeyvq9mnvA87KdXqvbfi X-Received: by 2002:a05:6358:5e0a:b0:142:d0dc:a3ce with SMTP id q10-20020a0563585e0a00b00142d0dca3cemr3763454rwn.2.1694830418249; Fri, 15 Sep 2023 19:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694830418; cv=none; d=google.com; s=arc-20160816; b=vLlGAonidi3/RwFmzrdcGS2+YkakYD4/vbZdjmJ+bW+nF/kkLsJPYd28H2xQhjGu6B eyx5RTfOXYb6dSE2uZM0rILa7gjt8bSNeKOZSRXdNlKF2W+TtQP8yyHKggsY4YNCY1Nw VybYiAfogZPojvZ4oMYO+BiExExRzy01oEaj/jyEb3lAgFANNTVQSOzenTe2CHIuKgrs xR6iGiiFZtjwFoPQTlE3CQX3vDKOrjfLG43mjkZ0UOWcBCbErZ0Ywtno8tzHRcBrrNmc m77q2rgM+7ZAeVh2wjA170iK1h+REgtY/ttrBtUjo5NpZ0JFvW8YCTHrZJ3p9DglJw6z wv+w== 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=pn6oOlASxZHN7mPKejPZwPvUfkQcqx14txayV6bXunQ=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=ui+Zi8H3Nb+TvuFTXTExHta5ZfyFE0/Wi5cWkOxi7qvj/SD4adREepSe6uERG1dc2H Dfv8UDiz32FJ27+ovCUEqBfUMyC5zM2oxxPOIhoZB9R6KSsWZW1M4934OESvIIWkLtnS MYokO/3eUiAZOupq0mPtQNW+V34xeElM/4R9tramENYadJSMA70Erd1ttMccgRwrFX6G LvKi8HFSDClKWLC8NnL/uoPmMtmTBzW9FU6X4HTbHMUOZXes+Vs7TevY9JVXsLq6sr6a JL5VpFCaSjj9J4rxD2BL0CTK/wyLpFI3eO9seaOX9Tqnsmf+yovwih5Luw4aFgdldqoR DrTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RR9Frdag; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id k24-20020a63ff18000000b00565e5651c6dsi3515490pgi.766.2023.09.15.19.13.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:13:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RR9Frdag; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id DD4928220D6C; Fri, 15 Sep 2023 19:11:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234135AbjIPCKr (ORCPT + 27 others); Fri, 15 Sep 2023 22:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237972AbjIPCKO (ORCPT ); Fri, 15 Sep 2023 22:10:14 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 691311BF2; Fri, 15 Sep 2023 19:10:09 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E569C433C7; Sat, 16 Sep 2023 02:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694830209; bh=mFM51HzoacyqEH6SUQlgy6Seux4I2scRhn39ZTi26N8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RR9FrdagkAthQDZzU/MqLOXvaeDFzI76AyKnmNaANhjKl5qK562b8z09HGpclirta jYc6LhrAJdUrtF6/8jEUYFxkzhz4DQs0wM8OIqyrP6MuYh5q8fsrOCkAhZ8cDkRDL+ m68G1t0/aauOfr5qF8XtuEjYHQmFewU+Siz5iH7DwXksWnvKxs++VqIl9SDSLjoUoY 0QdXTO1VgnyGAGXCuhbJxMUqcWGdICS6t8Md21tTKIOimgBmf0pSxHXMHOvbu2Sjsc As4vL2HJ+p/l6ENXnlhs5iHasOdBcHl2cwXlMbhtQReq+p8GnBNOXcxmZ4rOV/Zo9t 87jyj74Sod1Gg== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/9] Docs/admin-guide/mm/damon/usage: update for DAMOS apply intervals Date: Sat, 16 Sep 2023 02:09:44 +0000 Message-Id: <20230916020945.47296-9-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 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 15 Sep 2023 19:11:39 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777158500408574273 X-GMAIL-MSGID: 1777158500408574273 Update DAMON usage document's DAMON sysfs interface section for the newly added DAMOS apply intervals support (apply_interval_us file). Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 6272cd36590a..8507a6e45d86 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -76,7 +76,7 @@ comma (","). :: │ │ │ │ │ │ │ │ ... │ │ │ │ │ │ ... │ │ │ │ │ schemes/nr_schemes - │ │ │ │ │ │ 0/action + │ │ │ │ │ │ 0/action,apply_interval_us │ │ │ │ │ │ │ access_pattern/ │ │ │ │ │ │ │ │ sz/min,max │ │ │ │ │ │ │ │ nr_accesses/min,max @@ -269,8 +269,8 @@ schemes// ------------ In each scheme directory, five directories (``access_pattern``, ``quotas``, -``watermarks``, ``filters``, ``stats``, and ``tried_regions``) and one file -(``action``) exist. +``watermarks``, ``filters``, ``stats``, and ``tried_regions``) and two files +(``action`` and ``apply_interval``) exist. The ``action`` file is for setting and getting the scheme's :ref:`action `. The keywords that can be written to and read @@ -296,6 +296,9 @@ Note that support of each action depends on the running DAMON operations set - ``stat``: Do nothing but count the statistics. Supported by all operations sets. +The ``apply_interval_us`` file is for setting and getting the scheme's +:ref:`apply_interval ` in microseconds. + schemes//access_pattern/ --------------------------- From patchwork Sat Sep 16 02:09:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 140885 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1438543vqi; Fri, 15 Sep 2023 19:24:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwAd9tEwl2IktqZsWWNhSAtS/OB+pL1QQNeCinuzQ1mesdEITmcqqqrQ8UpQFijMMK81Ha X-Received: by 2002:a05:6a00:8086:b0:68e:16ce:f2e3 with SMTP id eh6-20020a056a00808600b0068e16cef2e3mr9226425pfb.0.1694831080441; Fri, 15 Sep 2023 19:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694831080; cv=none; d=google.com; s=arc-20160816; b=XXq6zOetCpkeHLmmfqU1zbWsgULWYMuFceeB8SCdgMCOrQ6xwlPYiBpzGV/UI9o/Qn qku5daiHU8J7z7+DYSHFiJmSxIJ0eZ3cVBDaUBsD7agIGn28bkpTn12wB+/dpx/hPEX1 fsMBT1gr+lqCJU30pmZFWD+sPsN0JdC1/LyYro9ZRR8MBIp2acxqFeEkAiZ0kY/I2EoS FIo+58r2HF9MLrFhB/qglzRc/bSOVIwt1h81lSg34CpzsGg3aP75kaQQUQF+jGO4oXY+ Otpz95QOWX+cJuE0EroUICdKb2RRFBXDmp9nut8+3lA7Hwh4cB1FfJEt9ANZxwbx8XYa NWVQ== 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=alqlwqGbXdvxEAQtsSQzGpGwyTFVwe6CMf9RuauYePk=; fh=BzdeVYqZhG5iuwuKJRNLP969rvCput73lx0iwx2zu7A=; b=Aj+A4drXmoiYaNeIfyx2xYrXjge5h5t+rDJAzf4L4tBGdk9/IVH7nTOi8us8ZNNc2t crLpxpQ6t/xXauwBq5qlnrpdAhsx8ugDuoOB4tMg7E5OFZiWzVSVYTMVisw0sTXcDoKk 2FUY89tw/ri7CTwfXJU3Ts4tQN6RVH/g7SBch2sq+qWuEfm17FKG9C9OXWwUSzAV8Ktz 1xcGX6dGngXCvZ9v7hU9FLmOJracj+SQ1cjg5dWDIR4l+95KZPjnG3sygku1PiI3/NmV QxammSyX1WNwWpyHZ71ZNuBivbqUQSVb5MpCLvHli8WuKOmxaJaCkGnTIdYLUheH56tA 1VZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GVF09ecm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bt10-20020a056a00438a00b0068e4358d041si4157700pfb.175.2023.09.15.19.24.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:24:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GVF09ecm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 8B0D681489C5; Fri, 15 Sep 2023 19:11:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238632AbjIPCKv (ORCPT + 27 others); Fri, 15 Sep 2023 22:10:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235345AbjIPCKP (ORCPT ); Fri, 15 Sep 2023 22:10:15 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B8B4173C for ; Fri, 15 Sep 2023 19:10:11 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EFD3C433C7; Sat, 16 Sep 2023 02:10:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694830210; bh=eynGbeHbTWCoAAQx22o6QCyTrP+ceLiyJPZLaUvkSBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GVF09ecmlXNA4Gm1ne2dlVGwKKBXDHM7gFSXc2cJejlIaCwBwiyeVvNwFI8Qm1Tfz 57C3h2zwphY3lOIm91d/nPqTyId4O9EfmA7qYlfZ9pjrLCWypmdLyaW3wq3kfx/g8W Ufot/UzqKCXn8eA1oOnj4ZTfdWwtg6ZxJIY0OXbLrx84eKVr2yfBGvmHItm70EhTmB t3jF1TX9mCuE5CdDmblHGw1dNK/2+9ZUjjNb3fryk2dA9h1md0SpkSkadBy1RnkSyV DaY+5mNkaYiItneVpS3IfMc+s+ZRSPTYENbTucEylRX2yfN09HKustYnQbjbq8Hlga PKAnbxZfPOZOQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 9/9] Docs/ABI/damon: update for DAMOS apply intervals Date: Sat, 16 Sep 2023 02:09:45 +0000 Message-Id: <20230916020945.47296-10-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 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 15 Sep 2023 19:11:30 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777159194614884173 X-GMAIL-MSGID: 1777159194614884173 Update DAMON ABI document for the newly added DAMON sysfs file for DAMOS apply intervals (apply_interval_us file). Signed-off-by: SeongJae Park --- Documentation/ABI/testing/sysfs-kernel-mm-damon | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-damon b/Documentation/ABI/testing/sysfs-kernel-mm-damon index 420b30f09cf0..b35649a46a2f 100644 --- a/Documentation/ABI/testing/sysfs-kernel-mm-damon +++ b/Documentation/ABI/testing/sysfs-kernel-mm-damon @@ -151,6 +151,13 @@ Contact: SeongJae Park Description: Writing to and reading from this file sets and gets the action of the scheme. +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//apply_interval_us +Date: Sep 2023 +Contact: SeongJae Park +Description: Writing a value to this file sets the action apply interval of + the scheme in microseconds. Reading this file returns the + value. + What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//access_pattern/sz/min Date: Mar 2022 Contact: SeongJae Park