From: Steven Rostedt <rostedt@goodmis.org>
To: Gang Li <ligang.bdlg@bytedance.com>
Cc: mhocko@suse.com, akpm@linux-foundation.org, surenb@google.com,
Ingo Molnar <mingo@redhat.com>,
hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com,
borntraeger@linux.ibm.com, svens@linux.ibm.com,
viro@zeniv.linux.org.uk, ebiederm@xmission.com,
keescook@chromium.org, peterz@infradead.org, acme@kernel.org,
mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
jolsa@kernel.org, namhyung@kernel.org, david@redhat.com,
imbrenda@linux.ibm.com, adobriyan@gmail.com,
yang.yang29@zte.com.cn, brauner@kernel.org,
stephen.s.brennan@oracle.com, zhengqi.arch@bytedance.com,
haolee.swjtu@gmail.com, xu.xin16@zte.com.cn,
Liam.Howlett@Oracle.com, ohoono.kwon@samsung.com,
peterx@redhat.com, arnd@arndb.de, shy828301@gmail.com,
alex.sierra@amd.com, xianting.tian@linux.alibaba.com,
willy@infradead.org, ccross@google.com, vbabka@suse.cz,
sujiaxun@uniontech.com, sfr@canb.auug.org.au,
vasily.averin@linux.dev, mgorman@suse.de, vvghjk1234@gmail.com,
tglx@linutronix.de, luto@kernel.org, bigeasy@linutronix.de,
fenghua.yu@intel.com, linux-s390@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2 3/5] mm: add numa fields for tracepoint rss_stat
Date: Fri, 8 Jul 2022 13:31:47 -0400 [thread overview]
Message-ID: <20220708133147.20f3d887@gandalf.local.home> (raw)
In-Reply-To: <20220708082129.80115-4-ligang.bdlg@bytedance.com>
On Fri, 8 Jul 2022 16:21:27 +0800
Gang Li <ligang.bdlg@bytedance.com> wrote:
> --- a/include/trace/events/kmem.h
> +++ b/include/trace/events/kmem.h
> @@ -363,7 +363,8 @@ static unsigned int __maybe_unused mm_ptr_to_hash(const void *ptr)
> EM(MM_FILEPAGES) \
> EM(MM_ANONPAGES) \
> EM(MM_SWAPENTS) \
> - EMe(MM_SHMEMPAGES)
> + EM(MM_SHMEMPAGES) \
> + EMe(MM_NO_TYPE)
>
> #undef EM
> #undef EMe
> @@ -383,29 +384,41 @@ TRACE_EVENT(rss_stat,
>
> TP_PROTO(struct mm_struct *mm,
> int member,
> - long count),
> + long member_count,
> + int node,
> + long node_count,
> + long diff_count),
>
> - TP_ARGS(mm, member, count),
> + TP_ARGS(mm, member, member_count, node, node_count, diff_count),
>
> TP_STRUCT__entry(
> __field(unsigned int, mm_id)
> __field(unsigned int, curr)
> __field(int, member)
> - __field(long, size)
> + __field(long, member_size)
> + __field(int, node)
Please swap the node and member_size fields. I just noticed that size
should have been before member in the original as well. Because it will
leave a 4 byte "hole" in the event due to alignment on 64 bit machines.
-- Steve
> + __field(long, node_size)
> + __field(long, diff_size)
> ),
>
> TP_fast_assign(
> __entry->mm_id = mm_ptr_to_hash(mm);
> __entry->curr = !!(current->mm == mm);
> __entry->member = member;
> - __entry->size = (count << PAGE_SHIFT);
> + __entry->member_size = (member_count << PAGE_SHIFT);
> + __entry->node = node;
> + __entry->node_size = (node_count << PAGE_SHIFT);
> + __entry->diff_size = (diff_count << PAGE_SHIFT);
> ),
>
> - TP_printk("mm_id=%u curr=%d type=%s size=%ldB",
> + TP_printk("mm_id=%u curr=%d type=%s type_size=%ldB node=%d node_size=%ldB diff_size=%ldB",
> __entry->mm_id,
> __entry->curr,
> __print_symbolic(__entry->member, TRACE_MM_PAGES),
> - __entry->size)
> + __entry->member_size,
> + __entry->node,
> + __entry->node_size,
> + __entry->diff_size)
> );
> #endif /* _TRACE_KMEM_H */
>
next prev parent reply other threads:[~2022-07-08 17:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-08 8:21 [PATCH v2 0/5] mm, oom: Introduce per numa node oom for CONSTRAINT_{MEMORY_POLICY,CPUSET} Gang Li
2022-07-08 8:21 ` [PATCH v2 1/5] mm: add a new parameter `node` to `get/add/inc/dec_mm_counter` Gang Li
2022-07-08 8:21 ` [PATCH v2 2/5] mm: add numa_count field for rss_stat Gang Li
2022-07-08 8:21 ` [PATCH v2 3/5] mm: add numa fields for tracepoint rss_stat Gang Li
2022-07-08 17:31 ` Steven Rostedt [this message]
2022-07-08 8:21 ` [PATCH v2 4/5] mm: enable per numa node rss_stat count Gang Li
2022-07-08 8:21 ` [PATCH v2 5/5] mm, oom: enable per numa node oom for CONSTRAINT_{MEMORY_POLICY,CPUSET} Gang Li
2022-07-08 8:54 ` [PATCH v2 0/5] mm, oom: Introduce " Michal Hocko
2022-07-08 9:25 ` Gang Li
2022-07-08 9:37 ` Michal Hocko
2022-07-12 11:12 ` Abel Wu
2022-07-12 13:35 ` Michal Hocko
2022-07-12 15:00 ` Abel Wu
2022-07-18 12:11 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220708133147.20f3d887@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=Liam.Howlett@Oracle.com \
--cc=acme@kernel.org \
--cc=adobriyan@gmail.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=alex.sierra@amd.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=arnd@arndb.de \
--cc=bigeasy@linutronix.de \
--cc=borntraeger@linux.ibm.com \
--cc=brauner@kernel.org \
--cc=ccross@google.com \
--cc=david@redhat.com \
--cc=ebiederm@xmission.com \
--cc=fenghua.yu@intel.com \
--cc=gor@linux.ibm.com \
--cc=haolee.swjtu@gmail.com \
--cc=hca@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=jolsa@kernel.org \
--cc=keescook@chromium.org \
--cc=ligang.bdlg@bytedance.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mark.rutland@arm.com \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=ohoono.kwon@samsung.com \
--cc=peterx@redhat.com \
--cc=peterz@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=shy828301@gmail.com \
--cc=stephen.s.brennan@oracle.com \
--cc=sujiaxun@uniontech.com \
--cc=surenb@google.com \
--cc=svens@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=vasily.averin@linux.dev \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=vvghjk1234@gmail.com \
--cc=willy@infradead.org \
--cc=xianting.tian@linux.alibaba.com \
--cc=xu.xin16@zte.com.cn \
--cc=yang.yang29@zte.com.cn \
--cc=zhengqi.arch@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).