From patchwork Mon Jan 6 19:33:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13927782 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 B09DBE77199 for ; Mon, 6 Jan 2025 19:34:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 138E66B0096; Mon, 6 Jan 2025 14:34:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0F40D6B0099; Mon, 6 Jan 2025 14:34:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ECC516B009E; Mon, 6 Jan 2025 14:34:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id D19B66B0096 for ; Mon, 6 Jan 2025 14:34:11 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 644BF41A98 for ; Mon, 6 Jan 2025 19:34:11 +0000 (UTC) X-FDA: 82978027902.16.B545658 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf02.hostedemail.com (Postfix) with ESMTP id CADE180012 for ; Mon, 6 Jan 2025 19:34:09 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=A8l0h8S4; spf=pass (imf02.hostedemail.com: domain of sj@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736192049; 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=jBSofeIvXALKj2Xzu8l3oYz6+1drxGWC3iDO5Daf3OQ=; b=17Q4rSe4mhQmrgLr4GBgzqqGuL1v1OHxFXoy7cVIh7iExuRzXOMU8t6fkvaYXZ8H6YvmFz 8AQzngCj2JhUXwkN0m6P0f7guiIj+8HTUgUNKsET+8Kmcb8tDdq9yyL798cPYFynoNwsqk 5OvEHDT17YXM9zsdgTVLxUgCDF2TuBo= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=A8l0h8S4; spf=pass (imf02.hostedemail.com: domain of sj@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736192049; a=rsa-sha256; cv=none; b=lQB08M9kYfDDRBCe4CPvUVcqxkaMfpHpy+ktSj4etWGweYqECdVmp2vf1ufRFDWXZWjr+J adCxGScPAFT2tHd56sY5+Q8WLLq7CBdjTBSLHWmo8//8g1+A3MUwpYyWZbgDDqK5GHXJWr 1OeH7hCj2AC6r8OasbUglWKlbu4Wuj8= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 5A722A41D80; Mon, 6 Jan 2025 19:32:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E036C4CED2; Mon, 6 Jan 2025 19:34:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736192048; bh=qj6QWyOD/vM16R3ECxClV3J3o7l3msnzxK4/LkXjXQ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A8l0h8S4TeRjSGATIMkb1PfMopf+UW8RezfO2VkwcGRrc/e2pYzf78MvnitsaAhYr GA5J8txVBRUq3W+q4d7+bbJ1zpqvbJQ2s9pppFrwjsY3+pmo1PnJ0ltgaFcHk8UqL0 k+piP6rOQD3MyyDNKGJFQz62kQaKFzCEyq0AADV/e9IYtVhhlWmZtaxywVtrZfb4NL iQuYo5B1H6PFEwJhUq/yI8EtL/Li9SxyuwRp5U2Q6tpStImOr3Gl1S3mjA24V0c/Gv yQfcZtL+f9y7LHS0W5aMdrDB1X6hlBqNWbwhbHpgx4X2xEEeL/JOEOkQsS4CAz/Dy8 T8IvacplUVvVw== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 01/16] mm/damon: clarify trying vs applying on damos_stat kernel-doc comment Date: Mon, 6 Jan 2025 11:33:46 -0800 Message-Id: <20250106193401.109161-2-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250106193401.109161-1-sj@kernel.org> References: <20250106193401.109161-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: CADE180012 X-Stat-Signature: 843mw7e6bw9b75k5nzi7g49rhbkkkgt6 X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1736192049-243861 X-HE-Meta: U2FsdGVkX1/Y2GvnikwAJxWtvEl+DordxGKt97QkhVze3Plqlk6rZctWvBDGrhSBlwGjJRQQ8C6AmAKFVTNizeYs1KJREVsRhmr1KKoNmf714yDkD2ySP7iJMKDmzT5A3efu3lM/GsG9nPtqBzpJapI9AbhJ5DTdmecjZS3w26n8KWc94ZQXOBV8FksuP1vz+1oSRGr7jzc1MTphQVhaJxOFYC14eKRUU2sseS79aGowDV78GbPVcxbYaCZmg6/YgIUNECDOSLeYz72YFOc/IXrHce0LyfHcyQaezqhdWXy/dRqi6Iq7B9cC2dwAsgMwf5ucIWmM/Dra350FMa8WZlGGhwRZMA5dq0lRXN3x/qt8VtlsQGRaXd+ShOO7quoutICcaeVS1IAhU9a7m77/hAr9ove1v7uOjSF068r9YZBUL2YNBeKJWZhhVM8Z/v1EiP/2aQwulZUNO20m8USExp0lGW1Mop7ffWGvlaY61wrTgIr8RhcL9u9H6szYrkLDcr9elkzn/j416tZ6Z3iLdjiRowmYp6F4UYwXV6rlad0bUAwTmh6KmoZYCO0FY0BEttmjxT8HpCzxg3LT3WI1CxvCSgtuZGLbDCHd9P4cPccHBRLCJM/NN0flSibGOmug0G1aPS/4ojHBGhLohHi+MgxWPaGOXwEtGmIzvwDjqo3SBE6J1Ypmhk4emd63F4r+IEliMDMms1G+ZEomD5rGAggsppdcUnSgPhv+bDlUngLTmoRA11t4U8WwbmBTiD8q6BgLHJ3U/ou1gWgYb4rrBqhNqOgS6nbYPYvBWok2Qq+44yXFTehvFn5P2Tfu1VBlzOZoH+yIUXvqE/QQNjXXL/HIRsLqXUVUIJivwQ6sFgVQU6520jxNSimLlaEm6IMqCPHvmmJMIeQaJo+QZZsFA6tfkkI0LkOcwt1dSun04k72VTKpgZQF1YU8lycVaeUWIK4qGNaGGc4kxFsiD3h iIQdku7Z VYfMWTTHjscJx+RpIWs4AVDiSTrsmNKP3gea8LIspi3lF3S90U/oz1FbSPOtDBxSct4R5pbEVDvfM9FPXohwnu56BcsMHEGkaOrF0PLN8wfmQVXpOe93dj59pONfcNUaX89fLwSgCYfDjQEf/bJpMSEyKiD3ItGu5Bi6+xPcUYjNteFPajEZQi3NGrq6EWRjybxTMwAx/KcKLZ6IZ72BcEcOx1rB7MUYS08E7mJNwZsmdeGUsydv2QN05Zb7NF8KIMOF3ma5GeJtZnAnu3yw7oABHIA== 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: DAMOS stat kernel-doc documentation is using terms that bit ambiguous. Without reading the code, understanding it correctly is not that easy. Add the clarification on the kernel-doc comment. Signed-off-by: SeongJae Park --- include/linux/damon.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/linux/damon.h b/include/linux/damon.h index 2889de3526c3..b85eae388f5b 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -287,6 +287,23 @@ struct damos_watermarks { * @nr_applied: Total number of regions that the scheme is applied. * @sz_applied: Total size of regions that the scheme is applied. * @qt_exceeds: Total number of times the quota of the scheme has exceeded. + * + * "Tried an action to a region" in this context means the DAMOS core logic + * determined the region as eligible to apply the action. The access pattern + * (&struct damos_access_pattern), quotas (&struct damos_quota), watermarks + * (&struct damos_watermarks) and filters (&struct damos_filter) that handled + * on core logic can affect this. The core logic asks the operation set + * (&struct damon_operations) to apply the action to the region. + * + * "Applied an action to a region" in this context means the operation set + * (&struct damon_operations) successfully applied the action to the region, at + * least to a part of the region. The filters (&struct damos_filter) that + * handled on operation set layer and type of the action and pages of the + * region can affect this. For example, if a filter is set to exclude + * anonymous pages and the region has only anonymous pages, the region will be + * failed at applying the action. If the action is &DAMOS_PAGEOUT and all + * pages of the region are already paged out, the region will be failed at + * applying the action. */ struct damos_stat { unsigned long nr_tried;