Message ID | 20240625180538.73134-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 85672C3064D for <linux-mm@archiver.kernel.org>; Tue, 25 Jun 2024 18:06:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2DE446B009F; Tue, 25 Jun 2024 14:05:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 186286B00A2; Tue, 25 Jun 2024 14:05:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D3CAC6B00A0; Tue, 25 Jun 2024 14:05:51 -0400 (EDT) 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 9ED6F6B009E for <linux-mm@kvack.org>; Tue, 25 Jun 2024 14:05:51 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 39A64160411 for <linux-mm@kvack.org>; Tue, 25 Jun 2024 18:05:51 +0000 (UTC) X-FDA: 82270189302.23.7978C09 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf16.hostedemail.com (Postfix) with ESMTP id 17B1018000F for <linux-mm@kvack.org>; Tue, 25 Jun 2024 18:05:48 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=bu47WY5C; spf=pass (imf16.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719338741; a=rsa-sha256; cv=none; b=s2FrVRDj93VjIM1SHvWuZR7/TNtIi0Qebf4c/xcIEXG9eNpNoLqPrytVgEQYlW8KwblHw1 6CIDV+SfesdwDkhzRcyMqh3D4sr8uvr9dIwiA670RmcaTnYpj3OZf1MSyWbuFzvS8yMWfF EdAmOatTbHopQwhSYE16ppE2B13owXQ= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=bu47WY5C; spf=pass (imf16.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719338741; 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=PIV7EMBbyn+rg2pNEGrc9L9bALGxo0H0TA7Y0JCLUIA=; b=n/gxCJlO/aVs+0pDBZfsPy9zKvFkuMPDc71K41Mw8Aw1Ih2qBk8/0YuLBA33w1l8B3tPK3 fgsFQcQKSR1pMtapJN9/NZscJXPsP/RiW9OG7Xzuz+oyiOQXOF2zNfEdfjEpPyERa+lVMO iVXynb+X3/9yr0X8YNuOwk0jTkFjACU= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id AB111CE0D4E; Tue, 25 Jun 2024 18:05:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69C14C32782; Tue, 25 Jun 2024 18:05:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719338744; bh=1TXG9SZrMDwPCPN1jihDIbGlXNgSRELots2zUsHDeb4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bu47WY5CMcvz7hkGfMSJ2ELpSfKOgCjBYGqBqcSlmujahvS5mLk5/0/RqH31GIAq3 viEOPXasgnf2Bj/tW6jbbfRnYknmObLlrzy8U3lmX7dDR8v458+VGlKPrD6Cl2Jf55 JB0qK1boaZF/go0H3yZHxDp8cw+FroebV6s8ho7ZWsYgCROwQbbdUMVBq7Axj7YujR H5qEHPZRB/Fs2UpvtxwHvX6y2VPoMmJ4nobljvvqRNR3sSgrCQmp54+RwTxCU86hC3 mqo6UPK+gl+gPGply5HtOyHnDDdFJldiXlzVh4P/hfK8oJp38yCkyjvu6eFAae7kO0 jn7MW6yAW0s2A== From: SeongJae Park <sj@kernel.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: SeongJae Park <sj@kernel.org>, Shuah Khan <shuah@kernel.org>, damon@lists.linux.dev, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/8] selftests/damon/access_memory: use user-defined region size Date: Tue, 25 Jun 2024 11:05:31 -0700 Message-Id: <20240625180538.73134-2-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240625180538.73134-1-sj@kernel.org> References: <20240625180538.73134-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: a9tyhydhah6p5bzefxeejbgeaisga16z X-Rspamd-Queue-Id: 17B1018000F X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1719338748-98763 X-HE-Meta: U2FsdGVkX19LKR7HB/zIK5pQW4yGwF6/3kdVXXUu0EOQYbv39lVnBwW4ZxcdqKepQnEgePLTVcQA1+XIpAuE+Aw3umamZATqmivcSU8uExJP0XQFevYd+AENP+rjYb2MBono0x17/HhGd9TYbDDxPLQbI0Llyl9kiiAroQ8KuI2RC79A8cpNtqWsDzL+Ld24SbD4OUlDdqXBiayI0BiNReaNirrXZgIi46OmfULuH1ZMDLqwW0LQoIhUDyNwkXH4kekU2BHd6S6dRYB+3zRxzrksJh7xmg27Afx2Ug1wLVrMk7K5W/VmsR9/oezT6dGadammF8NBpVfbFz1UZHhttucWIt+NY9CdmVcKD2Zknx8EEbtp6Le0f4kaI9+/UGi2pTcyyFvGty1pegWXkkeHVOUqsOhZUzSpEJHJWXEXfYXFfkbaGtHN8RUxFCbX0jK/Cs4kbc7BrZID6hWNMzU5VQ+2dv3k+mk2dw77OwiFtArEhPQhgUfFX6PhtunZMKL0kGHmGB0vQfofvujgfLsg6C5p/6hAypUEUHtS/VW2dvvpiTeZTro/hiYWF6Mldu+VBeWumMR6+aBVaFKzGxeaCM1hf/z0OB6LwYSdzQ7oX2+PXqr/FdFKlhoaQkU4DzUz9p6GEj7c6U4y6VY9+k5XAIpE1eG0KWgCYGibn9n7RXmsa2huRfIt6Eq/m3S7IdnWidMVFIsAYhL+ffZ48Q61jV2l/ScGlvgBbZz/vzwYL9VDvahtxzbgGNbCbq/Ud5qZIJ+GdrKHggHzQrZ9kbyPufTULWRKpCzYoD7F4KYURaWD5/Hm2cnYgHqGHj8W+1yeyOOmlqv3z4Lmq8amGXfJrV7APlyA/XxBDhJqyE7z7Z4eYMK3QfUtul2xWx7wyu+0rnB3kkd062BZ7beqhUvaEpKotPRrDa9vsMz/y1TwMEPTuM4R2JZPsXwo36Aau+E60YsqDJ4S2nooYxnzXbp CGBI6Cv4 0INSqsQrnasYyLKV9LnTjyq5WdWLmQG89z/5aorMQMnQx7eL+CslOjEKLgqq3PJ299vmNIlXkpQWgA+aOH7iwLp7DUXi2qtsAY/RWeZVefi0abU3KdG1Y09yOCyuRCzgnPiXkMC3xTJndntzGG4iDpAVNoJT9jY/8HT8l+tPFraYisXgJ3EmFGMAcZEV81xuZtxAIIvcpRF87iPHZYfh0JWxKoXz7DnYWl92/qdcZZQ18mAxO+cB9mE5b5V8bUDOd5GjgwhnL3PeKhPGsOKS2uxTylw== 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> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
selftests/damon: test DAMOS tried regions and {min,max}_nr_regions
|
expand
|
diff --git a/tools/testing/selftests/damon/access_memory.c b/tools/testing/selftests/damon/access_memory.c index 585a2fa54329..56b17e8fe1be 100644 --- a/tools/testing/selftests/damon/access_memory.c +++ b/tools/testing/selftests/damon/access_memory.c @@ -35,7 +35,7 @@ int main(int argc, char *argv[]) start_clock = clock(); while ((clock() - start_clock) * 1000 / CLOCKS_PER_SEC < access_time_ms) - memset(regions[i], i, 1024 * 1024 * 10); + memset(regions[i], i, sz_region); } return 0; }
'access_memory' is an artificial memory access pattern generator for DAMON tests. It creates and accesses memory regions that the user specified the number and size via the command line. However, real access part of the program ignores the user-specified size of each region. Instead, it uses a hard-coded value, 10 MiB. Fix it to use user-defined size. Note that all existing 'access_memory' users are setting the region size as 10 MiB. Hence no real problem has happened so far. Fixes: b5906f5f7359 ("selftests/damon: add a test for update_schemes_tried_regions sysfs command") Signed-off-by: SeongJae Park <sj@kernel.org> --- tools/testing/selftests/damon/access_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)