From patchwork Thu Dec 19 04:03:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13914442 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 16A28E7718B for ; Thu, 19 Dec 2024 04:03:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1FD236B0083; Wed, 18 Dec 2024 23:03:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1ACD76B0085; Wed, 18 Dec 2024 23:03:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 09C506B0088; Wed, 18 Dec 2024 23:03:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id E32916B0083 for ; Wed, 18 Dec 2024 23:03:42 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 9C407A13FC for ; Thu, 19 Dec 2024 04:03:42 +0000 (UTC) X-FDA: 82910363634.21.7069974 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf01.hostedemail.com (Postfix) with ESMTP id 4D6AD40018 for ; Thu, 19 Dec 2024 04:03:16 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Z2Zz6jKF; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf01.hostedemail.com: domain of sj@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734581005; a=rsa-sha256; cv=none; b=ReOzVSiLICLulE6fpGzvABv5l8r0m4xyznVIiBDRPVyDpFIWIRBqfKyEzhRq5n7Ke3f+VV B6hZYFvIfQ16fQ9LdvoR/nrl1eWYhEdyzSJbTZjCjyOdng8qDpjIFYKUfOOX0Wj7M5tK1a Ov594A3/FxaYzshaGJFgazfTLMt50Iw= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Z2Zz6jKF; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf01.hostedemail.com: domain of sj@kernel.org designates 147.75.193.91 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=1734581005; 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=vHqq0KQ88qLGkj5flYZZPVUQ5e2k1rMAbyL/Eq2pKs0=; b=XV9r6SjZJW0l5IhkTBQHk5wkRcohalWI2wNrwUY7qNKy1lHwEJqq6RDqSRH1r0h6sgy6k1 rJlm08PK8IWu/ovKZ1mWfmCyuhNEImlALBpicHtt2+Woh4sqfxCi7I171HUCejtW3+LwGq bLyLGbx2OuhUeijRwPmgP6e9w32ODXY= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id EFDE8A41BED; Thu, 19 Dec 2024 04:01:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B80FC4CED4; Thu, 19 Dec 2024 04:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734581020; bh=6yAcbnM6J2idHIjWcNsWaXW+gfpMIfb6CiDEsPN4WLc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z2Zz6jKFVEPW7u1pYxFRdlJrY348lqcmWUcfha2+coLLc1HpWoHnTIEUfYg2ziXlC 51ibgYnkuv8dFEKmc1FBcw14hA74jR5dTKVqsb9V8e5E51G4T2ZylTxk9znabTMit9 ohbI4MhC0Re8TXQRCyrAYXo89HrLTs88AjPe31a7yabDNYi/A29oO995ydVGxEvyFR 6A7mzFy59DR/oDcHw19Bc6MRFkMZiE7h5d/MMwZ9PZ1vJmPuDLtvTjdaNcArav1vWf 749M3/3bFJ+mh+1kpk9B/5HUGfV1HxjH6bXsEqPiAQ6M36FDqcrzKHQJUiQ7wMKdHZ P2VR8NWEGYptg== From: SeongJae Park To: Cc: kernel-team@meta.com, SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 01/18] mm/damon: clarify trying vs applying on damos_stat kernel-doc comment Date: Wed, 18 Dec 2024 20:03:10 -0800 Message-Id: <20241219040327.61902-2-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241219040327.61902-1-sj@kernel.org> References: <20241219040327.61902-1-sj@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 4D6AD40018 X-Stat-Signature: uzhafs71aidag4t7sjrgrfe8f6w8e59m X-HE-Tag: 1734580996-898274 X-HE-Meta: U2FsdGVkX1/VBh4ijoVGZCFMboDtqBkouDfHE8+AgyzLdBGuOomjwee9kQHQScmZehx+02x3i7JhfjkqJVHXqDXZYrD9kqYl7FNAMRWv9mlfWpS7NuJckYmZDSrXCuAJIs9HYIxDyhubrsDpichFF5Mpf7/k8m2yOhjfUlUVPk5FLo7Px8kqvG+3jKx24S5foAXhVw44iIkWX4ahWW/sxWpfjT2shI9SSBJElaFeYh5ETdV6BeBNksUXICu7HyiFI/Vu9lDfjEYl1q2zpY6kYXxJLv92D4Hoc40fP5wwaCW330cQMWpoalhZUoHLY7o2XQIvedeBA5nk0hCRlfPgM+atl0lBbUSkbE/G5fbBSD8pPPP9ylNLk4sxF1GEaFfOSV7F4gn7JJSNGplYvA1rw94AR+850lHIuXwsLauXrJgyNL1AR5jOfjCQWUbFDXcPtUn7JZVsC+hjm0byCCiRUuNgBKxMKtkaMsUhoKSIqreRyb20iU5NwRlqfXOB3xv9av1BgglgQ8n+pn9Mn7UhWuuaa4umHGQvj6kCEKkUFnRE4hJJNmiYTFq4wb1ooXvdJvuwpN0TYmgLBBsceDSZ/TUexnosvMR1EYxnFyFV/0vSRGaweyYCcd7rX393j36GThkMEZRNVDHmh8ErIESRwqsdx+Gdz2idSfTUGJmw6ETjEvTjQSrLwrvps1NsbvQphrWJmIlI7ZkpoPxrMJOFdzvinYBBTERKZ2rryURpoLMn4HeKQWUx43+xuc1rtV7z3sXabGIB9dWVOfzZ9UCff+L6v6MkTo37DVw9tSturwd+l+YXeEKBIot+QLCY0Q6fZ+AgLcp+HBd2rHKSvDpV14NHT3THGK7hAiBM17Eo2JltkqpVbd2SjorC6FzYsYez5aQkx8GQnJFuvek2/GWCl18Nos7FrXF5cgXhmVzLDTmN32VNpAueR0bRhzIHNp56gWxFyeGbiYR9bR+qJYf rWd/a9yb AwYTgYgnj+6Sp+ahNWIc7sA7USBokqaheW8IqiG5N/vikEhyMqgykvXQadmQlGOb6psdDnOYyT2/NCYTUsphQ0X1hvgPeAz2F45FnIfvBShu1UkUEXU88c86iPSQTx8cRRxEtT9Rqk7MgHux61rPCh/3XA9e/yRjUcyNg9CIEPuCgY7PSihW3NT7ODTbZp1iXmBGlsrTDTWf34F2POucjnkmASROrZPbkS/vzwunJJ//oUj+f9/IjIMuiD4jTcttTsdwSKdVUBTO4QYIhdRLAhy1FIw== 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 somewhat implicit terms. 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 b4165cc41d99..f66fa0ab9350 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -292,6 +292,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;