From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 ADCCF3BED0F for ; Tue, 2 Jun 2026 22:25:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780439109; cv=none; b=gL/JY8PRltt5uFkEc/hZ3FcubbZWn8JYot0IbEdSs7CPHPfm9tgsdHfi4+3x+XD71ohf98YV+l3NQhngdxodKJXm+m/WjGx1rA0L8UdHrfDI06xRwvvjw6GfgVeYF8O4vhdkj3uCbTucW1qKcNNVq0VCChsQH5lXbMit1M4EfMg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780439109; c=relaxed/simple; bh=ixqj6QfB2QwwtOpkA9idPeVHF3C7/Na37ZsQnbqdgfM=; h=Date:To:From:Subject:Message-Id; b=NUL9W7wO0tXccw+sHFSsMV4mozj7QvuIezgCtct2HBZch6nZm0x/3e5+NB5j+7sjjIK8oTw2Zw16hSsODJRICRYDTQsWgaxnEz1Qn0cFpW2EYhaswnmzDf6TkPgA5eFc6lG+6a1vLojM4eyEIXZps2mCcTHN6D6/3k9/W6cXlgg= 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=DAjGXsTc; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="DAjGXsTc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80CF01F00898; Tue, 2 Jun 2026 22:25:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1780439108; bh=z/B8Ca1vGAUk5e28ZC5gPuvhKln8UYrIcgKM+DXs6+Q=; h=Date:To:From:Subject; b=DAjGXsTcCeVyKm/H2pT+xYL0j0NDbOnMJuPp2YCHuVYgaaKY41zOxRYUzer95B0E7 3koYIn/TM/EU5rEWF3hD/sEEOZ9WQA45zo9zarBOk/QC03drCbzP1cM4TwslCIyk92 ePOWP3svWH8MUcga48dN2o/zC0TH/dCPoqLUwJzY= Date: Tue, 02 Jun 2026 15:25:08 -0700 To: mm-commits@vger.kernel.org,vbabka@kernel.org,surenb@google.com,shuah@kernel.org,rppt@kernel.org,rostedt@goodmis.org,mhocko@suse.com,mhiramat@kernel.org,mathieu.desnoyers@efficios.com,ljs@kernel.org,liam@infradead.org,david@kernel.org,corbet@lwn.net,sj@kernel.org,akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-stable] docs-mm-damon-design-document-data-attributes-monitoring.patch removed from -mm tree Message-Id: <20260602222508.80CF01F00898@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The quilt patch titled Subject: Docs/mm/damon/design: document data attributes monitoring has been removed from the -mm tree. Its filename was docs-mm-damon-design-document-data-attributes-monitoring.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: SeongJae Park Subject: Docs/mm/damon/design: document data attributes monitoring Date: Mon, 18 May 2026 16:41:08 -0700 Update DAMON design document for newly added data attributes monitoring feature. Link: https://lore.kernel.org/20260518234119.97569-21-sj@kernel.org Signed-off-by: SeongJae Park Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Michal Hocko Cc: Mike Rapoport Cc: Shuah Khan Cc: Steven Rostedt Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton --- Documentation/mm/damon/design.rst | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) --- a/Documentation/mm/damon/design.rst~docs-mm-damon-design-document-data-attributes-monitoring +++ a/Documentation/mm/damon/design.rst @@ -276,6 +276,43 @@ interval``, DAMON checks if the region's (``nr_accesses``) has significantly changed. If so, the counter is reset to zero. Otherwise, the counter is increased. +Data Attributes Monitoring +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Data access pattern is only one type of data attributes. In some use cases, +users need to know more data attributes information. For example, users may +need to know how much of a given hot or cold memory region is backed by +anonymous pages, or belong to a specific cgroup. For such use case, data +attributes monitoring feature is provided. + +Using the feature, users can register data attributes of their interest to the +DAMON :ref:`context `. The +registration is made by specifying a probe per attribute. Each of the probe +specifies a rule to determine if a given memory region has the related +attribute. The rule is constructed with multiple filters. The filters work +same to :ref:`DAMOS filters ` except the supported +filter types. Currently only ``anon`` filter type is supported for data +attributes monitoring. + +If such probes are registered, DAMON executes the probes for each region's +sampling memory when it does the access :ref:`sampling +`. The number of samples that identified +as having the data attribute (hitting the probe) per :ref:`aggregation interval +` is accounted in a per-region per-probe counter. +Users can therefore know how much of a given DAMON region has a specific data +attribute by reading the per-region per-probe probe hits counter after each +aggregation interval. + +This is a sampling based mechanism. Hence, it is lightweight but the output +may include some measurement errors. The output should be used with good +understanding of statistics. + +Another way to do this for higher accuracy is using :ref:`DAMOS filter +` with ``stat`` :ref:`action +` and ``sz_ops_filter_passed`` :ref:`stat +`. This approach provides the data attributes +information in page level. But, because it is operated in page level, the +overhead is proportional to the size of the memory. Dynamic Target Space Updates Handling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _ Patches currently in -mm which might be from sj@kernel.org are mm-damon-reclaim-handle-ctx-allocation-failure.patch mm-damonn-lru_sort-handle-ctx-allocation-failure.patch maintainers-add-testing-abi-documents-for-mm.patch