Skip to contentSkip to conversation

mm/damon: update expired description of damos_action

PATCH Superseded Sang-Heon Jeon 2 participants 3 messages Aug 4, 2025 – Aug 5, 2025

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mm/damon: update expired description of damos_action

Nowadays, damos operation actions support more various operation set. But comments(also, generated documentation) doesn't updated. So, fix the comments with current support status.

---
Changes from v1 [1]:
1. change baseline from damon/next to mm/mm-new
2. Add note about DAMOS_PAGEOUT and demotion.

[1] https://lore.kernel.org/all/[email protected]/

---
I also watch your comment from [1]. Thank you for not forgetting :)

[1] https://lore.kernel.org/damon/[email protected]/

---
 include/linux/damon.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
include/linux/damon.h +5 -3
index f13664c62ddd..d4b3ffd6144d 100644
@@ -110,7 +110,7 @@ struct damon_target {
  *
  * @DAMOS_WILLNEED:	Call ``madvise()`` for the region with MADV_WILLNEED.
  * @DAMOS_COLD:		Call ``madvise()`` for the region with MADV_COLD.
- * @DAMOS_PAGEOUT:	Call ``madvise()`` for the region with MADV_PAGEOUT.
+ * @DAMOS_PAGEOUT:	Reclaim the region.
  * @DAMOS_HUGEPAGE:	Call ``madvise()`` for the region with MADV_HUGEPAGE.
  * @DAMOS_NOHUGEPAGE:	Call ``madvise()`` for the region with MADV_NOHUGEPAGE.
  * @DAMOS_LRU_PRIO:	Prioritize the region on its LRU lists.
@@ -123,8 +123,10 @@ struct damon_target {
  * The support of each action is up to running &struct damon_operations.
  * &enum DAMON_OPS_VADDR and &enum DAMON_OPS_FVADDR supports all actions except
  * &enum DAMOS_LRU_PRIO and &enum DAMOS_LRU_DEPRIO.  &enum DAMON_OPS_PADDR
- * supports only &enum DAMOS_PAGEOUT, &enum DAMOS_LRU_PRIO, &enum
- * DAMOS_LRU_DEPRIO, and &DAMOS_STAT.
+ * supports all actions except &enum DAMOS_WILLNEED, &enum DAMOS_COLD,
+ * &enum DAMOS_HUGEPAGE, &enum DAMOS_NOHUGEPAGE.
+ *
+ * Note that DAMOS_PAGEOUT doesn't trigger demotions.
  */
 enum damos_action {
 	DAMOS_WILLNEED,
Signature · 1 line
2.43.0
maintainer
#1 lore raw

Hello Sang-Heon,

Quoted 9 lines · On Mon, 4 Aug 2025 23:38:16 +0900 Sang-Heon Jeon <[email protected]> wrote:

Nowadays, damos operation actions support more various operation set. But comments(also, generated documentation) doesn't updated. So, fix the comments with current support status.

---
Changes from v1 [1]:
1. change baseline from damon/next to mm/mm-new
2. Add note about DAMOS_PAGEOUT and demotion.

Thank you for making this revision!

Quoted 26 lines

[1] https://lore.kernel.org/all/[email protected]/

---
I also watch your comment from [1]. Thank you for not forgetting :)

[1] https://lore.kernel.org/damon/[email protected]/

---
 include/linux/damon.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
include/linux/damon.h +1 -1
index f13664c62ddd..d4b3ffd6144d 100644
@@ -110,7 +110,7 @@ struct damon_target {
  *
  * @DAMOS_WILLNEED:	Call ``madvise()`` for the region with MADV_WILLNEED.
  * @DAMOS_COLD:		Call ``madvise()`` for the region with MADV_COLD.
- * @DAMOS_PAGEOUT:	Call ``madvise()`` for the region with MADV_PAGEOUT.
+ * @DAMOS_PAGEOUT:	Reclaim the region.
  * @DAMOS_HUGEPAGE:	Call ``madvise()`` for the region with MADV_HUGEPAGE.
  * @DAMOS_NOHUGEPAGE:	Call ``madvise()`` for the region with MADV_NOHUGEPAGE.
  * @DAMOS_LRU_PRIO:	Prioritize the region on its LRU lists.

include/linux/damon.h struct damon_target { · line 127

Quoted 7 lines
include/linux/damon.h +2 -2
@@ -123,8 +123,10 @@ struct damon_target {
  * The support of each action is up to running &struct damon_operations.
  * &enum DAMON_OPS_VADDR and &enum DAMON_OPS_FVADDR supports all actions except
  * &enum DAMOS_LRU_PRIO and &enum DAMOS_LRU_DEPRIO.  &enum DAMON_OPS_PADDR
- * supports only &enum DAMOS_PAGEOUT, &enum DAMOS_LRU_PRIO, &enum
- * DAMOS_LRU_DEPRIO, and &DAMOS_STAT.
+ * supports all actions except &enum DAMOS_WILLNEED, &enum DAMOS_COLD,
+ * &enum DAMOS_HUGEPAGE, &enum DAMOS_NOHUGEPAGE.

I think we agreed[1] to add a reference to the design doc, instead of keeping this duplicated. Am I missing something?

Quoted 7 lines
include/linux/damon.h +2 -0
+ *
+ * Note that DAMOS_PAGEOUT doesn't trigger demotions.
  */
 enum damos_action {
 	DAMOS_WILLNEED,
Signature · 1 line
2.43.0

[1] https://lore.kernel.org/CABFDxMGh7-vDgNzepJKtrhdOF40_U7=NT6Jvm85qtdwGpBZawg@mail.gmail.com

Thanks,
SJ

#2 lore raw

Hi, SeongJae

Quoted 45 lines · SeongJae Park

Hello Sang-Heon,

Quoted 9 lines · On Mon, 4 Aug 2025 23:38:16 +0900 Sang-Heon Jeon <[email protected]> wrote:

Nowadays, damos operation actions support more various operation set. But comments(also, generated documentation) doesn't updated. So, fix the comments with current support status.

---
Changes from v1 [1]:
1. change baseline from damon/next to mm/mm-new
2. Add note about DAMOS_PAGEOUT and demotion.

Thank you for making this revision!

Quoted 28 lines

[1] https://lore.kernel.org/all/[email protected]/

---
I also watch your comment from [1]. Thank you for not forgetting :)

[1] https://lore.kernel.org/damon/[email protected]/

---
 include/linux/damon.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
include/linux/damon.h +1 -1
index f13664c62ddd..d4b3ffd6144d 100644
@@ -110,7 +110,7 @@ struct damon_target {
  *
  * @DAMOS_WILLNEED:  Call ``madvise()`` for the region with MADV_WILLNEED.
  * @DAMOS_COLD:              Call ``madvise()`` for the region with MADV_COLD.
- * @DAMOS_PAGEOUT:   Call ``madvise()`` for the region with MADV_PAGEOUT.
+ * @DAMOS_PAGEOUT:   Reclaim the region.
  * @DAMOS_HUGEPAGE:  Call ``madvise()`` for the region with MADV_HUGEPAGE.
  * @DAMOS_NOHUGEPAGE:        Call ``madvise()`` for the region with MADV_NOHUGEPAGE.
  * @DAMOS_LRU_PRIO:  Prioritize the region on its LRU lists.
@@ -123,8 +123,10 @@ struct damon_target {
  * The support of each action is up to running &struct damon_operations.
  * &enum DAMON_OPS_VADDR and &enum DAMON_OPS_FVADDR supports all actions except
Quoted 8 lines

include/linux/damon.h struct damon_target { · line 127

Quoted 5 lines
include/linux/damon.h +2 -2
  * &enum DAMOS_LRU_PRIO and &enum DAMOS_LRU_DEPRIO.  &enum DAMON_OPS_PADDR
- * supports only &enum DAMOS_PAGEOUT, &enum DAMOS_LRU_PRIO, &enum
- * DAMOS_LRU_DEPRIO, and &DAMOS_STAT.
+ * supports all actions except &enum DAMOS_WILLNEED, &enum DAMOS_COLD,
+ * &enum DAMOS_HUGEPAGE, &enum DAMOS_NOHUGEPAGE.

I think we agreed[1] to add a reference to the design doc, instead of keeping this duplicated. Am I missing something?

OMG. It's my mistake. I'll make v3 patch right now.

Quoted 8 lines
Quoted 7 lines
include/linux/damon.h +2 -1
+ *
+ * Note that DAMOS_PAGEOUT doesn't trigger demotions.
  */
 enum damos_action {
      DAMOS_WILLNEED,
--

2.43.0

Quoted 5 lines

[1] https://lore.kernel.org/CABFDxMGh7-vDgNzepJKtrhdOF40_U7=NT6Jvm85qtdwGpBZawg@mail.gmail.com

Thanks,
SJ

Best Regards.
Sang-Heon Jeon