From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DF272DAFA2 for ; Tue, 16 Dec 2025 18:58:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765911502; cv=none; b=NT7rEhoggKjvFUIqAfh02QVUTIu+eKNmSz3HG3jh0YFoL21Wzuks+Zz5oqGtSaCCDDVLKEw2QT7dq0AZl+rw0EpV4EFOlCbSF0gp7wJ0fu1FB5fpZ0WZ5i+og7WSK63psmcfaXFE+yqea1OPu56q4pAxN1BpvThZf3sMYOFYLhk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765911502; c=relaxed/simple; bh=L9S4RBuSZ4Zp72FscfiE4bgyAJRYsk7xAkkQhhjlGSk=; h=Date:To:From:Subject:Message-Id; b=XRZJekYUpNv8ZkPtIBH1tSzQHdgrFqedLNhu7HfMP1yuv/kptrCFLxPayrZMQG1ThJpJDEL/ZuBp871bjNtNEwE/TnJCtk4Ywa2xGd06QmLRektGNrUssNJRe64yUVLmAR3R9JFmq8Z0UltXsculTT6lwLf+msT+QwUJ/u1nxLQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=MLjbPr8z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="MLjbPr8z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC675C4CEF1; Tue, 16 Dec 2025 18:58:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1765911502; bh=L9S4RBuSZ4Zp72FscfiE4bgyAJRYsk7xAkkQhhjlGSk=; h=Date:To:From:Subject:From; b=MLjbPr8zoskMaM20Mzn0VqRXpPvfrVqN75TNgBkdxKFrCwxGkMj72wJK6tYPP8LzC xBgthHf1FyMsjxEdPgZhf9L9fxueSaR8pvuAavllF1Z3QxHOsdyBbWQZ+k38EXDemC PJ8HcikBbvD1PvI2gLovZYZ3K1D62Md/brhV2/ZM= Date: Tue, 16 Dec 2025 10:58:21 -0800 To: mm-commits@vger.kernel.org,vbabka@suse.cz,surenb@google.com,rppt@kernel.org,rostedt@goodmis.org,mhocko@suse.com,mhiramat@kernel.org,mathieu.desnoyers@efficios.com,lorenzo.stoakes@oracle.com,liam.howlett@oracle.com,corbet@lwn.net,sj@kernel.org,akpm@linux-foundation.org From: Andrew Morton Subject: + docs-mm-damon-design-update-for-max_nr_snapshots.patch added to mm-new branch Message-Id: <20251216185821.EC675C4CEF1@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: Docs/mm/damon/design: update for max_nr_snapshots has been added to the -mm mm-new branch. Its filename is docs-mm-damon-design-update-for-max_nr_snapshots.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/docs-mm-damon-design-update-for-max_nr_snapshots.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. The mm-new branch of mm.git is not included in linux-next Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there most days ------------------------------------------------------ From: SeongJae Park Subject: Docs/mm/damon/design: update for max_nr_snapshots Date: Tue, 16 Dec 2025 00:01:22 -0800 Update DAMON design document for the newly added snapshot level DAMOS deactivation feature, max_nr_snapshots. Link: https://lkml.kernel.org/r/20251216080128.42991-10-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Michal Hocko Cc: Mike Rapoport Cc: Steven Rostedt Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton --- Documentation/mm/damon/design.rst | 5 +++++ 1 file changed, 5 insertions(+) --- a/Documentation/mm/damon/design.rst~docs-mm-damon-design-update-for-max_nr_snapshots +++ a/Documentation/mm/damon/design.rst @@ -720,6 +720,7 @@ scheme's execution. - ``qt_exceeds``: Total number of times the quota of the scheme has exceeded. - ``nr_snapshots``: Total number of DAMON snapshots that the scheme is tried to be applied. +- ``max_nr_snapshots``: Upper limit of ``nr_snapshots``. "A scheme is tried to be applied to a region" means DAMOS core logic determined the region is eligible to apply the scheme's :ref:`action @@ -741,6 +742,10 @@ to exclude anonymous pages and the regio action is ``pageout`` while all pages of the region are unreclaimable, applying the action to the region will fail. +Unlike normal stats, ``max_nr_snapshots`` is set by users. If it is set as +non-zero and ``nr_snapshots`` be same to or greater than ``nr_snapshots``, the +scheme is deactivated. + To know how user-space can read the stats via :ref:`DAMON sysfs interface `, refer to :ref:s`stats ` part of the documentation. _ Patches currently in -mm which might be from sj@kernel.org are mm-damon-core-introduce-nr_snapshots-damos-stat.patch mm-damon-sysfs-schemes-introduce-nr_snapshots-damos-stat-file.patch docs-mm-damon-design-update-for-nr_snapshots-damos-stat.patch docs-admin-guide-mm-damon-usage-update-for-nr_snapshots-damos-stat.patch docs-abi-damon-update-for-nr_snapshots-damos-stat.patch mm-damon-update-damos-kerneldoc-for-stat-field.patch mm-damon-core-implement-max_nr_snapshots.patch mm-damon-sysfs-schemes-implement-max_nr_snapshots-file.patch docs-mm-damon-design-update-for-max_nr_snapshots.patch docs-admin-guide-mm-damon-usage-update-for-max_nr_snapshots.patch docs-abi-damon-update-for-max_nr_snapshots.patch mm-damon-core-add-trace-point-for-damos-stat-per-apply-interval.patch