Detailed analysis of memory management related configuration items in the Linux kernel 16

Continued from the previous article: Detailed analysis of memory management related configuration items in the Linux kernel 15

Thirty-seven, Data Access Monitoring

This item is expanded as shown in the figure below:

The item "DAMON: Data Access Monitoring Framework" is not selected by default. If it is selected, the page becomes:

1. DAMON: Data Access Monitoring Framework

The corresponding configuration variable is: CONFIG_DAMON.

There are only two states for this item, selected and unselected, and the default is unselected.

The kernel source code of this item is explained in detail as:

This builds a framework that allows kernel subsystems to monitor
access frequency of each memory region. The information can be useful
for performance-centric DRAM level memory management.

This entry establishes a framework that allows the kernel subsystem to monitor how often each memory region is accessed. This information is useful for performance-focused DRAM-level memory management.

2. Data access monitoring operations for virtual address spaces

The corresponding configuration variable is: CONFIG_DAMON_VADDR.

There are only two states for this item, selected and unselected, and the default is unselected.

The kernel source code of this item is explained in detail as:

This builds the default data access monitoring operations for DAMON
that work for virtual address spaces.

This entry builds default data access monitoring operations for DAMON that apply to virtual address spaces.

3. Data access monitoring operations for the physical address space

The corresponding configuration variable is: CONFIG_DAMON_PADDR.

There are only two states for this item, selected and unselected, and the default is unselected.

The kernel source code of this item is explained in detail as:

This builds the default data access monitoring operations for DAMON
that works for the physical address space.

This entry builds default data access monitoring operations for DAMON that apply to physical address spaces.

4. DAMON sysfs interface

The corresponding configuration variable is: CONFIG_DAMON_SYSFS.

There are only two states for this item, selected and unselected, and the default is unselected.

The kernel source code of this item is explained in detail as:

This builds the sysfs interface for DAMON.  The user space can use
the interface for arbitrary data access monitoring.

This entry builds the sysfs interface for DAMON. Userspace can use this interface for arbitrary data access monitoring.

5. DAMON debugfs interface

The corresponding configuration variable is: CONFIG_DAMON_DBGFS.

There are only two states for this item, selected and unselected, and the default is unselected. This item appears only when both "Data access monitoring operations for virtual address spaces" and "Data access monitoring operations for the physical address space" are selected.

The kernel source code of this item is explained in detail as:

This builds the debugfs interface for DAMON.  The user space admins
can use the interface for arbitrary data access monitoring.

If unsure, say N.

This will be removed after >5.15.y LTS kernel is released, so users
should move to the sysfs interface (DAMON_SYSFS).

This item builds the debugfs interface for DAMON. Userspace administrators can use this interface for arbitrary data access monitoring.

If unsure (don't know how to choose), select N.

This will be removed after LTS kernel versions greater than 5.15.y, so users should move to the sysfs interface (DAMON_SYSFS).

6. Build DAMON-based reclaim (DAMON_RECLAIM)

The corresponding configuration variable is: CONFIG_DAMON_RECLAIM.

There are only two states for this item, selected and unselected, and the default is unselected. This item will only appear if the "Data access monitoring operations for the physical address space" item is selected.

The kernel source code of this item is explained in detail as:

This builds the DAMON-based reclamation subsystem.  It finds pages
that not accessed for a long time (cold) using DAMON and reclaim
those.

This is suggested to be used as a proactive and lightweight
reclamation under light memory pressure, while the traditional page
scanning-based reclamation is used for heavy pressure.

This item builds a recycling subsystem based on DAMON. It uses DAMON to find pages that have not been accessed for a long time (cold) and recycles these pages.

It is recommended for aggressive and lightweight reclamation under light memory pressure, while traditional page scan-based reclamation is used for heavy pressure.

7. Build DAMON-based LRU-lists sorting (DAMON_LRU_SORT)

The corresponding configuration variable is: CONFIG_DAMON_LRU_SORT.

There are only two states for this item, selected and unselected, and the default is unselected. This item will only appear if the "Data access monitoring operations for the physical address space" item is selected.

The kernel source code of this item is explained in detail as:

This builds the DAMON-based LRU-lists sorting subsystem.  It tries to
protect frequently accessed (hot) pages while rarely accessed (cold)
pages reclaimed first under memory pressure.

This project builds a DAMON-based LRU list sorting subsystem. Under memory pressure, it tries to protect frequently accessed (hot) pages while reclaiming rarely accessed (cold) pages first.

Guess you like

Origin blog.csdn.net/phmatthaus/article/details/131190212