From mboxrd@z Thu Jan 1 00:00:00 1970 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 06F95C433EF for ; Thu, 30 Dec 2021 10:14:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 17B926B009E; Thu, 30 Dec 2021 05:14:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E4B6D6B00A2; Thu, 30 Dec 2021 05:14:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C28EC6B00A0; Thu, 30 Dec 2021 05:14:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0223.hostedemail.com [216.40.44.223]) by kanga.kvack.org (Postfix) with ESMTP id 9B1A96B009E for ; Thu, 30 Dec 2021 05:14:49 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5737789068 for ; Thu, 30 Dec 2021 10:14:49 +0000 (UTC) X-FDA: 78974051898.24.936344C Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf26.hostedemail.com (Postfix) with ESMTP id EC29B140002 for ; Thu, 30 Dec 2021 10:14:48 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2DBB2B81B0B; Thu, 30 Dec 2021 10:14:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A472C36AE9; Thu, 30 Dec 2021 10:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1640859285; bh=nQhsx3NefR1s0VrbzOivpVKLa6kobr744dEgSMnpo7g=; h=From:To:Cc:Subject:Date:From; b=MnidE3HrIlypk1hZDwBi+8BPitqPgjqqMmhEvXc4ieaQC6j03Vv8gfvZEI0sjAQX4 iN5LXdEnQmv+bFR+Xo+edmabGRPIQzON3nJMPWH/HeVkmFrVD2zaBAEBs0k8rieREv 8h2xPz7fMHhkc0W8k8TpPKxuxqdGAp6RPPwaSR/2Omu/bJW3M81cEWiMLEsrHPI1M/ k5SFZ/sTxCQ1eh3kCp3PrdNz/VdZxYr3NgggrxcLkSz1tDSoSZgoz5N/t7y80kPh51 nNFD1HekbkNmud1ZgmNkwFKT8TEagpQxyQbh0u8IXsV8T+emHSZc1HOFSc9cKJpoVc GSAZwoMmd2l/g== From: SeongJae Park To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH 0/4] Remove the type-unclear target id concept Date: Thu, 30 Dec 2021 10:07:19 +0000 Message-Id: <20211230100723.2238-1-sj@kernel.org> X-Mailer: git-send-email 2.17.1 Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=MnidE3Hr; spf=pass (imf26.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Queue-Id: EC29B140002 X-Stat-Signature: tjbus4ba9pdkp4xps8wrkwcddyjnije1 X-Rspamd-Server: rspam04 X-HE-Tag: 1640859288-376233 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: DAMON asks each monitoring target ('struct damon_target') to have one 'unsigned long' integer called 'id', which should be unique among the targets of same monitoring context. Meaning of it is, however, totally up to the monitoring primitives that registered to the monitoring context. For example, the virtual address spaces monitoring primitives treats the id as a 'struct pid' pointer. This makes the code flexible but ugly, not well-documented, and type-unsafe[1]. Also, identification of each target can be done via its index. For the reason, this patchset removes the concept and uses clear type definition. [1] https://lore.kernel.org/linux-mm/20211013154535.4aaeaaf9d0182922e405dd1e@linux-foundation.org/ SeongJae Park (4): mm/damon/dbgfs/init_regions: Use target index instead of target id Docs/admin-guide/mm/damon/usage: Update for changed initail_regions file input mm/damon/core: Move damon_set_targets() into dbgfs mm/damon: Remove the target id concept Documentation/admin-guide/mm/damon/usage.rst | 24 ++- include/linux/damon.h | 13 +- mm/damon/core-test.h | 21 +- mm/damon/core.c | 36 +--- mm/damon/dbgfs-test.h | 83 +++----- mm/damon/dbgfs.c | 202 ++++++++++++------- mm/damon/reclaim.c | 3 +- mm/damon/vaddr-test.h | 6 +- mm/damon/vaddr.c | 4 +- 9 files changed, 199 insertions(+), 193 deletions(-) -- 2.17.1