* [PATCH] tools/mm/page_owner_sort.c: fix TGID output when cull=tg is used
@ 2023-04-11 3:49 Steve Chou
2023-04-11 4:01 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Steve Chou @ 2023-04-11 3:49 UTC (permalink / raw)
To: akpm; +Cc: Steve Chou, linux-mm, linux-kernel
When using cull option with 'tg' flag, the fprintf is using pid instead
of tgid. It should use tgid instead.
Signed-off-by: Steve Chou <steve_chou@pesi.com.tw>
---
tools/mm/page_owner_sort.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/mm/page_owner_sort.c b/tools/mm/page_owner_sort.c
index 7c2ac124cdc8..99798894b879 100644
--- a/tools/mm/page_owner_sort.c
+++ b/tools/mm/page_owner_sort.c
@@ -857,7 +857,7 @@ int main(int argc, char **argv)
if (cull & CULL_PID || filter & FILTER_PID)
fprintf(fout, ", PID %d", list[i].pid);
if (cull & CULL_TGID || filter & FILTER_TGID)
- fprintf(fout, ", TGID %d", list[i].pid);
+ fprintf(fout, ", TGID %d", list[i].tgid);
if (cull & CULL_COMM || filter & FILTER_COMM)
fprintf(fout, ", task_comm_name: %s", list[i].comm);
if (cull & CULL_ALLOCATOR) {
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] tools/mm/page_owner_sort.c: fix TGID output when cull=tg is used
2023-04-11 3:49 [PATCH] tools/mm/page_owner_sort.c: fix TGID output when cull=tg is used Steve Chou
@ 2023-04-11 4:01 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2023-04-11 4:01 UTC (permalink / raw)
To: Steve Chou; +Cc: linux-mm, linux-kernel, Jiajian Ye
On Tue, 11 Apr 2023 11:49:28 +0800 Steve Chou <steve_chou@pesi.com.tw> wrote:
> When using cull option with 'tg' flag, the fprintf is using pid instead
> of tgid. It should use tgid instead.
>
> ...
>
> --- a/tools/mm/page_owner_sort.c
> +++ b/tools/mm/page_owner_sort.c
> @@ -857,7 +857,7 @@ int main(int argc, char **argv)
> if (cull & CULL_PID || filter & FILTER_PID)
> fprintf(fout, ", PID %d", list[i].pid);
> if (cull & CULL_TGID || filter & FILTER_TGID)
> - fprintf(fout, ", TGID %d", list[i].pid);
> + fprintf(fout, ", TGID %d", list[i].tgid);
> if (cull & CULL_COMM || filter & FILTER_COMM)
> fprintf(fout, ", task_comm_name: %s", list[i].comm);
> if (cull & CULL_ALLOCATOR) {
Thanks, copy-paste error, I expect. I'll add Fixes: 9c8a0a8e599
("tools/vm/page_owner_sort.c: support for user-defined culling rules")
and cc:stable.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-11 4:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-11 3:49 [PATCH] tools/mm/page_owner_sort.c: fix TGID output when cull=tg is used Steve Chou
2023-04-11 4:01 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox