Skip to contentSkip to conversation

mm/damon: rename primitives to operations

PATCH In review Enze Li 3 participants 11 messages May 24, 2025 – May 30, 2025

Subsystems (2)
lore
Share & tools
lore

Enze Li

author
#0 lore raw

PATCH 1/1 mm/damon: rename primitives to operations

The word 'primitive' is not explicit and has been deprecated in DAMON's context since commit f7d911c39cbb ("mm/damon: rename damon_primitives to damon_operations"). To make the code easier to be understand, this commit renames remaining 'primitives' to 'operations' in header comments of DAMON source files.

Fixes f7d911c39cbb ("mm/damon: rename damon_primitives to damon_operations")
---
 mm/damon/modules-common.c | 2 +-
 mm/damon/modules-common.h | 2 +-
 mm/damon/ops-common.c     | 2 +-
 mm/damon/ops-common.h     | 2 +-
 mm/damon/paddr.c          | 2 +-
 mm/damon/sysfs-common.c   | 2 +-
 mm/damon/sysfs-common.h   | 2 +-
 mm/damon/vaddr.c          | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
mm/damon/modules-common.c +1 -1
index 7cf96574cde7..61b38322a3aa 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Common Primitives for DAMON Modules
+ * Common Operations for DAMON Modules
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/modules-common.h +1 -1
index f49cdb417005..f1ffcc80a7bd 100644
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * Common Primitives for DAMON Modules
+ * Common Operations for DAMON Modules
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/ops-common.c +1 -1
index 0db1fc70c84d..1da3932b6775 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Common Primitives for Data Access Monitoring
+ * Common Operations for Data Access Monitoring
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/ops-common.h +1 -1
index 18d837d11bce..1820945679b1 100644
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * Common Primitives for Data Access Monitoring
+ * Common Operations for Data Access Monitoring
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/paddr.c +1 -1
index 1b70d3f36046..a299fdda26e4 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * DAMON Primitives for The Physical Address Space
+ * DAMON Operations for The Physical Address Space
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/sysfs-common.c +1 -1
index 70edf45c2174..107c4c20231d 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Common Primitives for DAMON Sysfs Interface
+ * Common Operations for DAMON Sysfs Interface
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/sysfs-common.h +1 -1
index 70d84bdc9f5f..d1c1b2e857f0 100644
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * Common Primitives for DAMON Sysfs Interface
+ * Common Operations for DAMON Sysfs Interface
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/vaddr.c +1 -1
index e6d99106a7f9..d034e7b5ddb8 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * DAMON Primitives for Virtual Address Spaces
+ * DAMON Operations for Virtual Address Spaces
  *
  * Author: SeongJae Park <[email protected]>
  */
Signature · 1 line
2.49.0
maintainer
#1 lore raw

Hi Enze,

Quoted 5 lines · On Sat, 24 May 2025 20:55:36 +0800 Enze Li <[email protected]> wrote:

The word 'primitive' is not explicit and has been deprecated in DAMON's context since commit f7d911c39cbb ("mm/damon: rename damon_primitives to damon_operations"). To make the code easier to be understand, this commit renames remaining 'primitives' to 'operations' in header comments of DAMON source files.

Thank you for this patch! The description makes sense to me.

The title makes me bit confused, though. By reading it, I was assuming this patch is changing some code. But this is changing only comments. Could you please make the title more clearly specify that? E.g., "fix outdated comments for monitoring primitives"?

Quoted 13 lines
Fixes f7d911c39cbb ("mm/damon: rename damon_primitives to damon_operations")
---
 mm/damon/modules-common.c | 2 +-
 mm/damon/modules-common.h | 2 +-
 mm/damon/ops-common.c     | 2 +-
 mm/damon/ops-common.h     | 2 +-
 mm/damon/paddr.c          | 2 +-
 mm/damon/sysfs-common.c   | 2 +-
 mm/damon/sysfs-common.h   | 2 +-
 mm/damon/vaddr.c          | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

But, the term (primitives) on the comments of the files means the DAMON monitoring primitives (old name of DAMON operations) only in {p,v}addr.c files. On the comment of other files, the term means code for basic and common uses.

Using 'Operations' term on the files look ok to me. But in the case, the commit message may better to slightly be updated to clarify this.

Just keeping those files to use 'Primitives' term, or using a more neutral term, say, Code (e.g., Common Code for DAMON Modules) could also be options, in my opinion.

I have no strong preference among these three options. Please pick what you prefer.

Could you please revise as abovely suggested and resend?

Thanks,
SJ

[...]

author
#2 lore raw

Hi SeongJae,

Quoted 38 lines · SeongJae Park

Hi Enze,

Quoted 5 lines · On Sat, 24 May 2025 20:55:36 +0800 Enze Li <[email protected]> wrote:

The word 'primitive' is not explicit and has been deprecated in DAMON's context since commit f7d911c39cbb ("mm/damon: rename damon_primitives to damon_operations"). To make the code easier to be understand, this commit renames remaining 'primitives' to 'operations' in header comments of DAMON source files.

Thank you for this patch! The description makes sense to me.

The title makes me bit confused, though. By reading it, I was assuming this patch is changing some code. But this is changing only comments. Could you please make the title more clearly specify that? E.g., "fix outdated comments for monitoring primitives"?

Quoted 13 lines
Fixes f7d911c39cbb ("mm/damon: rename damon_primitives to damon_operations")
---
 mm/damon/modules-common.c | 2 +-
 mm/damon/modules-common.h | 2 +-
 mm/damon/ops-common.c     | 2 +-
 mm/damon/ops-common.h     | 2 +-
 mm/damon/paddr.c          | 2 +-
 mm/damon/sysfs-common.c   | 2 +-
 mm/damon/sysfs-common.h   | 2 +-
 mm/damon/vaddr.c          | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

But, the term (primitives) on the comments of the files means the DAMON monitoring primitives (old name of DAMON operations) only in {p,v}addr.c files. On the comment of other files, the term means code for basic and common uses.

Using 'Operations' term on the files look ok to me. But in the case, the commit message may better to slightly be updated to clarify this.

Quoted 6 lines

Just keeping those files to use 'Primitives' term, or using a more neutral term, say, Code (e.g., Common Code for DAMON Modules) could also be options, in my opinion.

I have no strong preference among these three options. Please pick what you prefer.

Thanks for your suggestion. It seems to me that using 'Code' term is a reasonable choice.

Quoted 2 lines

Could you please revise as abovely suggested and resend?

I've sent a v2 to the current thread, many thanks for your review and suggestions! Please let me know if further adjustments are needed.

BR,
Enze

Quoted 6 lines

Thanks,
SJ

[...]

maintainer
#3 lore raw
Quoted 3 lines · On Mon, 26 May 2025 14:25:40 +0800 Enze Li <[email protected]> wrote:

Hi SeongJae,

On Sat, May 24 2025 at 09:29:10 AM -0700, SeongJae Park wrote:

[...]

Quoted 4 lines
Quoted 2 lines

Could you please revise as abovely suggested and resend?

I've sent a v2 to the current thread,

I think it is more common to send new versions of a patch as a new thread, rather than as a reply to an old version. Please do so from next time, for a consistency.

Quoted 2 lines

many thanks for your review and
suggestions! Please let me know if further adjustments are needed.

David gave us good point[1] to think about the title. I don't think that's a strict blocker, but also no reason to rush on this. So let's take a bit more time for the discussion, unless this is urgent for you.

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

Thanks,
SJ

[...]

author
#4 lore raw
Quoted 7 lines · SeongJae Park
Quoted 3 lines · On Mon, 26 May 2025 14:25:40 +0800 Enze Li <[email protected]> wrote:

Hi SeongJae,

On Sat, May 24 2025 at 09:29:10 AM -0700, SeongJae Park wrote:

[...]

Quoted 1 line
Quoted 1 line
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Could you please revise as abovely suggested and resend?

I've sent a v2 to the current thread,

I think it is more common to send new versions of a patch as a new thread, rather than as a reply to an old version. Please do so from next time, for a consistency.

Noted -- I'll keep that in mind.

BR,
Enze

[...]

#5 lore raw
In reply to SeongJae Park
Quoted 10 lines · SeongJae Park

Hi Enze,

Quoted 5 lines · On Sat, 24 May 2025 20:55:36 +0800 Enze Li <[email protected]> wrote:

The word 'primitive' is not explicit and has been deprecated in DAMON's context since commit f7d911c39cbb ("mm/damon: rename damon_primitives to damon_operations"). To make the code easier to be understand, this commit renames remaining 'primitives' to 'operations' in header comments of DAMON source files.

Quoted 6 lines

Thank you for this patch! The description makes sense to me.

The title makes me bit confused, though. By reading it, I was assuming this patch is changing some code. But this is changing only comments. Could you please make the title more clearly specify that? E.g., "fix outdated comments for monitoring primitives"?

Heh, but wouldn't we be calling this things "primitives" in the current context?

"don't refer to common code as 'primitives'"

Signature · 3 lines
Cheers,

David / dhildenb
maintainer
#6 lore raw

Hi David,

Quoted 13 lines · On Mon, 26 May 2025 11:31:45 +0200 David Hildenbrand <[email protected]> wrote:
Quoted 12 lines · SeongJae Park

Hi Enze,

Quoted 5 lines · On Sat, 24 May 2025 20:55:36 +0800 Enze Li <[email protected]> wrote:

The word 'primitive' is not explicit and has been deprecated in DAMON's context since commit f7d911c39cbb ("mm/damon: rename damon_primitives to damon_operations"). To make the code easier to be understand, this commit renames remaining 'primitives' to 'operations' in header comments of DAMON source files.

Thank you for this patch! The description makes sense to me.

Quoted 7 lines
Quoted 4 lines

The title makes me bit confused, though. By reading it, I was assuming this patch is changing some code. But this is changing only comments. Could you please make the title more clearly specify that? E.g., "fix outdated comments for monitoring primitives"?

Heh, but wouldn't we be calling this things "primitives" in the current context?

Thanks for giving us this good point. I was reading this as "fix outdated comments for monitoring primitives (, which is a deprecated term)". And I agree this is not very clear.

Quoted 2 lines

"don't refer to common code as 'primitives'"

Nice suggestion. But, this wouldn't explain the changes to {p,v}addr.c files, since those are not for common code.

Maybe "mm/damon: s/primitives/code/ on comments" could also be a simple and not that bad title?

Thanks,
SJ

Quoted 5 lines
Signature · 4 lines
-- 
Cheers,

David / dhildenb
maintainer
#7 lore raw

On Mon, 26 May 2025 10:55:24 -0700 SeongJae Park <[email protected]> wrote:

[...]

Quoted 2 lines

Maybe "mm/damon: s/primitives/code/ on comments" could also be a simple and not that bad title?

I understand we found no real concern on this. :) Thanks to all discussion participants and their patience. Of course, just add more comments if you just forgot posting it and I'm rushing.

Enze, could you please post v3 with the updated title?

Thanks,
SJ

[...]

author
#8 lore raw

Hi SeongJae,

Quoted 11 lines · SeongJae Park

On Mon, 26 May 2025 10:55:24 -0700 SeongJae Park <[email protected]> wrote:

[...]

Quoted 2 lines

Maybe "mm/damon: s/primitives/code/ on comments" could also be a simple and not that bad title?

I understand we found no real concern on this. :) Thanks to all discussion participants and their patience. Of course, just add more comments if you just forgot posting it and I'm rushing.

Enze, could you please post v3 with the updated title?

I've sent the v3 here [1]. Thank you for reviewing, and my appreciation to David as well.

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

BR,
Enze

[...]

author
#9 lore raw

PATCH v2 1/1 mm/damon: fix outdated comments for monitoring primitives

In reply to Enze Li

The word 'primitive' is not explicit. To make the code easier to be understood, this commit renames 'primitives' to 'code' in header comments of some source files.

---
Changes in v2:
- Fixed commit message maintainer feedback.
- Use a more neutral term instead of 'primitive'.

---
 mm/damon/modules-common.c | 2 +-
 mm/damon/modules-common.h | 2 +-
 mm/damon/ops-common.c     | 2 +-
 mm/damon/ops-common.h     | 2 +-
 mm/damon/paddr.c          | 2 +-
 mm/damon/sysfs-common.c   | 2 +-
 mm/damon/sysfs-common.h   | 2 +-
 mm/damon/vaddr.c          | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
mm/damon/modules-common.c +1 -1
index 7cf96574cde7..86d58f8c4f63 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Common Primitives for DAMON Modules
+ * Common Code for DAMON Modules
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/modules-common.h +1 -1
index f49cdb417005..f103ad556368 100644
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * Common Primitives for DAMON Modules
+ * Common Code for DAMON Modules
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/ops-common.c +1 -1
index 0db1fc70c84d..b43620fee6bb 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Common Primitives for Data Access Monitoring
+ * Common Code for Data Access Monitoring
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/ops-common.h +1 -1
index 18d837d11bce..cc9f5da9c012 100644
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * Common Primitives for Data Access Monitoring
+ * Common Code for Data Access Monitoring
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/paddr.c +1 -1
index 1b70d3f36046..c9c338170603 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * DAMON Primitives for The Physical Address Space
+ * DAMON Code for The Physical Address Space
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/sysfs-common.c +1 -1
index 70edf45c2174..ffaf285e241a 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Common Primitives for DAMON Sysfs Interface
+ * Common Code for DAMON Sysfs Interface
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/sysfs-common.h +1 -1
index 70d84bdc9f5f..2099adee11d0 100644
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * Common Primitives for DAMON Sysfs Interface
+ * Common Code for DAMON Sysfs Interface
  *
  * Author: SeongJae Park <[email protected]>
  */
mm/damon/vaddr.c +1 -1
index e6d99106a7f9..46554e49a478 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * DAMON Primitives for Virtual Address Spaces
+ * DAMON Code for Virtual Address Spaces
  *
  * Author: SeongJae Park <[email protected]>
  */

base-commit: 0ff41df1cb268fc69e703a08a57ee14ae967d0ca

Signature · 1 line
2.43.0
maintainer Reviewed-by on v2 1/1
#10 lore raw

Re: [PATCH v2] mm/damon: fix outdated comments for monitoring primitives

Quoted 5 lines · On Mon, 26 May 2025 14:09:01 +0800 Enze Li <[email protected]> wrote:

The word 'primitive' is not explicit. To make the code easier to be understood, this commit renames 'primitives' to 'code' in header comments of some source files.

So we have an ongoing discussion for the title[1]. Other than that, all looks good to me and I believe the discussion will not change this patch significantly. So, giving my Reviewed-by first.

Thanks,
SJ

[...]