Linux kernel source tree
Go to file
SeongJae Park 8d009da32f mm/damon/sysfs: set damon_ctx->min_sz_region only for paddr use case
damon_ctx->addr_unit is respected only for physical address space
monitoring use case.  Meanwhile, damon_ctx->min_sz_region is used by the
core layer for aligning regions, regardless of whether it is set for
physical address space monitoring or virtual address spaces monitoring. 
And it is set as 'DAMON_MIN_REGION / damon_ctx->addr_unit'.  Hence, if
user sets ->addr_unit on virtual address spaces monitoring mode, regions
can be unexpectedly aligned in <PAGE_SIZE granularity.  It shouldn't cause
crash-like issues but make monitoring and DAMOS behavior difficult to
understand.

Fix the unexpected behavior by setting ->min_sz_region only when it is
configured for physical address space monitoring.

The issue was found from a result of Chris' experiments that thankfully
shared with me off-list.

Link: https://lkml.kernel.org/r/20250917160041.53187-1-sj@kernel.org
Fixes: d8f867fa08 ("mm/damon: add damon_ctx->min_sz_region")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Chris Mason <clm@fb.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: ze zuo <zuoze1@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-09-23 14:14:16 -07:00
Documentation Docs/admin-guide/mm/damon/start: add --target_pid to DAMOS example command 2025-09-21 14:22:37 -07:00
LICENSES
arch ptdesc: remove ptdesc_to_virt() 2025-09-21 14:22:27 -07:00
block block: use largest_zero_folio in __blkdev_issue_zero_pages() 2025-09-13 16:54:54 -07:00
certs
crypto crypto: remove nth_page() usage within SG entry 2025-09-21 14:22:09 -07:00
drivers mm: make folio page count functions return unsigned 2025-09-21 14:22:31 -07:00
fs mm/hwpoison: decouple hwpoison_filter from mm/memory-failure.c 2025-09-21 14:22:21 -07:00
include mm: do not assume file == vma->vm_file in compat_vma_mmap_prepare() 2025-09-22 20:17:11 -07:00
init init/main.c: fix boot time tracing crash 2025-09-03 17:10:36 -07:00
io_uring io_uring/zcrx: remove nth_page() usage within folio 2025-09-21 14:22:05 -07:00
ipc
kernel mm/oom_kill: thaw the entire OOM victim process 2025-09-21 14:22:35 -07:00
lib alloc_tag: mark inaccurate allocation counters in /proc/allocinfo output 2025-09-21 14:22:36 -07:00
mm mm/damon/sysfs: set damon_ctx->min_sz_region only for paddr use case 2025-09-23 14:14:16 -07:00
net net: ipv4: fix regression in local-broadcast routes 2025-08-28 10:52:30 +02:00
rust rust: maple_tree: add MapleTreeAlloc 2025-09-21 14:22:19 -07:00
samples samples/damon/mtier: use damon_initialized() 2025-09-21 14:22:39 -07:00
scripts scripts/decode_stacktrace.sh: code: preserve alignment 2025-09-21 14:22:28 -07:00
security
sound ALSA: hda/hdmi: Add pin fix for another HP EliteDesk 800 G4 model 2025-09-01 13:51:57 +02:00
tools mm: do not assume file == vma->vm_file in compat_vma_mmap_prepare() 2025-09-22 20:17:11 -07:00
usr
virt
.clang-format
.clippy.toml
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap .mailmap: add entry for Easwar Hariharan 2025-08-19 16:35:55 -07:00
.pylintrc
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: retire Boris from TLS maintainers 2025-08-26 17:36:01 -07:00
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: rename DAMON section 2025-09-21 14:22:37 -07:00
Makefile Linux 6.17-rc4 2025-08-31 15:33:07 -07:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.