Thread (34 messages) 34 messages, 2 authors, 2021-07-01

Re: [PATCH v31 08/13] mm/damon/dbgfs: Export kdamond pid to the user space

flat view

From: Shakeel Butt <hidden>
Date: 2021-06-22 18:23:28
Also in: linux-mm, lkml

On Mon, Jun 21, 2021 at 1:31 AM SeongJae Park [off-list ref] wrote:
From: SeongJae Park <redacted>

For CPU usage accounting, knowing pid of the monitoring thread could be
helpful.  For example, users could use cpuaccount cgroups with the pid.

This commit therefore exports the pid of currently running monitoring
thread to the user space via 'kdamond_pid' file in the debugfs
directory.

Signed-off-by: SeongJae Park <redacted>
Reviewed-by: Fernand Sieber <redacted>
---
[...]
+static const struct file_operations kdamond_pid_fops = {
+       .owner = THIS_MODULE,
I don't think you need to set the owner (and for other fops) as these
files are built into modules. Otherwise it looks good.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help