From patchwork Tue Jun 25 18:05:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13711786 Return-Path: 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 7F013C3064D for ; Tue, 25 Jun 2024 18:05:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EE96A6B0098; Tue, 25 Jun 2024 14:05:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E98296B009A; Tue, 25 Jun 2024 14:05:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D5F886B009B; Tue, 25 Jun 2024 14:05:47 -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 B69AD6B0098 for ; Tue, 25 Jun 2024 14:05:47 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 5502AC04B7 for ; Tue, 25 Jun 2024 18:05:47 +0000 (UTC) X-FDA: 82270189134.26.5EF7FFE Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf03.hostedemail.com (Postfix) with ESMTP id B589620013 for ; Tue, 25 Jun 2024 18:05:45 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=i08owaJA; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf03.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1719338729; 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=dYj6HLuYpGkQUNgwKMuH/GKEZKSoZ677efJq4Fss2IQ=; b=n0o0yuXhTRWV8jZxuGDlb+dmNSlRR9hBuFVuE+99VjsObsbVYdsB8mus8HDTp2TzIGuENF p/uYS+X5XfMdbaaESJXZjxyxyGc+uirsDpmkgj7NUH5M0PCvfAp9EXrHf/g2dmG+MT8v27 QbvxHHhT5jnOGECL0+8fKhA2HO2tKro= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719338729; a=rsa-sha256; cv=none; b=23gwoclj3Pi1dD3PAzO0On14IuTZQw/JSrNV2vHjGpP1OpPcYUr8amoGK83G3NZ3f+SD2z j7Dg1Ln7h+I0ns/3E16tEuKPMldPUYgdGhImnOxJihIB8Lf0YKKVc2Hcsn5LTYMm5qG1Gh 8SLTxM3j4LYR1/f+NmokWSpfK8qljxs= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=i08owaJA; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf03.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 8215D614E8; Tue, 25 Jun 2024 18:05:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3E08C32781; Tue, 25 Jun 2024 18:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719338744; bh=shsXNhCfXHTnED5QM8sxuSUHkfSGO2/rCdvA/fWyJng=; h=From:To:Cc:Subject:Date:From; b=i08owaJAQt4aQchFM+u1qNEciFAPS0MtFm3d+XrItCAi03MbkfywUVJCPFQrtiEkz 6L8Sm++wHq1fziDzl/2RdxLSerhuTj0UqArRMJsK9km/JpoNdsxLTFTDHQ2Rs4sRL/ DHea+PYzDOc042LpGCa5Ta/jTvaY2pCb6e2hfx61IfXYiequnH11XLO4ubRlrJ6C7t jXTfmo8lhkgi/2L+Vb3nxEi68oKg8LVCXpi4d0SMx1BgjU30NyTAHO9EwlMDxkLlYw 1D4q14SJksE9qNfDQVqi3aot+sqcLrjB6ozPmcRUnVS9r866blRB0IU4Pv3d1P3/ro OqzSK1cQDgslg== 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 0/8] selftests/damon: test DAMOS tried regions and {min,max}_nr_regions Date: Tue, 25 Jun 2024 11:05:30 -0700 Message-Id: <20240625180538.73134-1-sj@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: B589620013 X-Stat-Signature: r7dqfmr4tsrxxjesjce3d67zqt4ijh1m X-Rspam-User: X-HE-Tag: 1719338745-868883 X-HE-Meta: U2FsdGVkX18ziMMI3JzRXWomSR6qK8EBbN1v2gBgmEKi+D1dq+VexIxZdQIC4sCrkHRrB9kc3z7tEGs46XseKpCKoDDs3xKhjogs7VJ2ujkGnE9GKMYv6SMtlx+28CSG/eDzjUa3RxqEVuFAVaEBrsFuU/uXPL6Aqt0edd1UPFRoTK9rRPs1cs7pOfni+Cu4R4oIr8rWKZ+53UI4q1fpebtB71Fp6A340VbQ7nxgVAScDn72ah5Q3IieVtiJUjEPocha5nuGiOAGXpcmPX67Y89H8cwwyVemh4Sb2uUoS4PrGiG7CgQq1wDEYd265x2TSOTPMPgWwY9LLYBqDKr4S8lUG7wH42ykjvqRsHDGXcG0JB5so9GpFxqjcYwMVjAuUnv08ThimHFh5sfQvLNSGE6/oxtfd2zVcZlI5PmgWm5mqoLIhof1ONyN7iVChk1snftzEYrK6Y/CddamE/kJ5jAf4JxhuyVwUX3Z8dmB8+KRVNzDbaWuM6RqNP3RZEHaHvdWJMR/cFXfRQCKyqKg8IWV3xFcV0PAaZTAG0LKFO6k5mcRp0w+R34twsNTK56g72FfWWLJ4ABY8RaA8vzxRnoUGjT3uttbrKhPQspow7asoxTV7IaRjH/gZaLSDXUI9FNgyJ58+NCxNwXpUxhsgFvE64/1Ycuz6QmwiQhuU1Ux8hSkPc19exGrzMf2RIT9qOmxTJHUE/4PZrVIo7czUV/nZ46122CEz+qXWYxecPBQliMvpZqRQhnypv4CzraESpX1WdFTKs29tmmdbLqx08kuFqyyrO7VIYSwl1voeWP3bEb9KEavpk45j2H+YsJGwtQ58A8hViHkFsfgAsJWKKuVAaTAwIvCpNIz6tAu3eHVYfvn5juJ2a+qzDgff9R5jnDgv+9uegNIydpvN122q7qSTV4P0tbq9ENhrpSdAFXI7nOUtbdGLAVHtRICAgaTtiXUMgA0NlK6V26DTeS UomVcIOI it/4+IYeFxeUUWbHDGrockxVkKECXMTZHskB5obpYA3Bwi2z94RqLpRBCyoLaq55XVYHZ+5qKVDO2L3U8AdVq4CPMUqUaOjiNX/1ICJ+LrKgRzUFDHRf2F5JfxTjQ4fIQb9RJV8Bh5U4KYfzQomC6jm5qEdci1Dz3OkzksPje9axgRFA5tV/PnS4CpbO07SCSUz6gsvKgIQOMqNdNs3eWwzDCb2Xn86cGS54INAjtJ2Xa1tAVaj6vpRoGWQedqB3lFBqb52JVlVJ2hhK4PSGIq71ak7/lrqA6lFXt 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: List-Subscribe: List-Unsubscribe: This patch series fix a minor issue in a program for DAMON selftest, and implement new functionality selftests for DAMOS tried regions and {min,max}_nr_regions. The test for max_nr_regions also test the recovery from online tuning-caused limit violation, which was fixed by a previous patch [1] titled "mm/damon/core: merge regions aggressively when max_nr_regions is unmet". The first patch fixes a minor problem in the articial memory access pattern generator for tests. Following 3 patches (2-4) implement schemes tried regions test. Then a couple of patches (5-6) implementing static setup based {min,max}_nr_regions functionality test follows. Final two patches (7-8) implement dynamic max_nr_regions update test. [1] https://lore.kernel.org/20240624210650.53960C2BBFC@smtp.kernel.org SeongJae Park (8): selftests/damon/access_memory: use user-defined region size selftests/damon/_damon_sysfs: support schemes_update_tried_regions selftests/damon: implement a program for even-numbered memory regions access selftests/damon: implement DAMOS tried regions test selftests/damon/_damon_sysfs: implement kdamonds stop function selftests/damon: implement test for min/max_nr_regions _damon_sysfs: implement commit() for online parameters update selftests/damon/damon_nr_regions: test online-tuned max_nr_regions tools/testing/selftests/damon/Makefile | 3 +- tools/testing/selftests/damon/_damon_sysfs.py | 65 +++++++- tools/testing/selftests/damon/access_memory.c | 2 +- .../selftests/damon/access_memory_even.c | 42 +++++ .../selftests/damon/damon_nr_regions.py | 145 ++++++++++++++++++ .../selftests/damon/damos_tried_regions.py | 65 ++++++++ 6 files changed, 319 insertions(+), 3 deletions(-) create mode 100644 tools/testing/selftests/damon/access_memory_even.c create mode 100644 tools/testing/selftests/damon/damon_nr_regions.py create mode 100644 tools/testing/selftests/damon/damos_tried_regions.py base-commit: 99348045d11f3bac71146b381f90b0aa39855ee7