+ memcg-add-tracing-for-memcg-stat-updates-v2.patch added to mm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: memcg-add-tracing-for-memcg-stat-updates-v2
has been added to the -mm mm-unstable branch.  Its filename is
     memcg-add-tracing-for-memcg-stat-updates-v2.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/memcg-add-tracing-for-memcg-stat-updates-v2.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Shakeel Butt <shakeel.butt@xxxxxxxxx>
Subject: memcg-add-tracing-for-memcg-stat-updates-v2
Date: Tue, 15 Oct 2024 14:37:21 -0700

use unsigned long type for memcg_rstat_events, per Yosry

Link: https://lkml.kernel.org/r/20241015213721.3804209-1-shakeel.butt@xxxxxxxxx
Signed-off-by: Shakeel Butt <shakeel.butt@xxxxxxxxx>
Acked-by: Roman Gushchin <roman.gushchin@xxxxxxxxx>
Reviewed-by: Yosry Ahmed <yosryahmed@xxxxxxxxxx>
Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Muchun Song <songmuchun@xxxxxxxxxxxxx>
Cc: JP Kobryn <inwardvessel@xxxxxxxxx>
Cc: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/trace/events/memcg.h |   32 +++++++++++++++++++++++++++-----
 1 file changed, 27 insertions(+), 5 deletions(-)

--- a/include/trace/events/memcg.h~memcg-add-tracing-for-memcg-stat-updates-v2
+++ a/include/trace/events/memcg.h
@@ -9,7 +9,7 @@
 #include <linux/tracepoint.h>
 
 
-DECLARE_EVENT_CLASS(memcg_rstat,
+DECLARE_EVENT_CLASS(memcg_rstat_stats,
 
 	TP_PROTO(struct mem_cgroup *memcg, int item, int val),
 
@@ -31,23 +31,45 @@ DECLARE_EVENT_CLASS(memcg_rstat,
 		  __entry->id, __entry->item, __entry->val)
 );
 
-DEFINE_EVENT(memcg_rstat, mod_memcg_state,
+DEFINE_EVENT(memcg_rstat_stats, mod_memcg_state,
 
 	TP_PROTO(struct mem_cgroup *memcg, int item, int val),
 
 	TP_ARGS(memcg, item, val)
 );
 
-DEFINE_EVENT(memcg_rstat, mod_memcg_lruvec_state,
+DEFINE_EVENT(memcg_rstat_stats, mod_memcg_lruvec_state,
 
 	TP_PROTO(struct mem_cgroup *memcg, int item, int val),
 
 	TP_ARGS(memcg, item, val)
 );
 
-DEFINE_EVENT(memcg_rstat, count_memcg_events,
+DECLARE_EVENT_CLASS(memcg_rstat_events,
 
-	TP_PROTO(struct mem_cgroup *memcg, int item, int val),
+	TP_PROTO(struct mem_cgroup *memcg, int item, unsigned long val),
+
+	TP_ARGS(memcg, item, val),
+
+	TP_STRUCT__entry(
+		__field(u64, id)
+		__field(int, item)
+		__field(unsigned long, val)
+	),
+
+	TP_fast_assign(
+		__entry->id = cgroup_id(memcg->css.cgroup);
+		__entry->item = item;
+		__entry->val = val;
+	),
+
+	TP_printk("memcg_id=%llu item=%d val=%lu",
+		  __entry->id, __entry->item, __entry->val)
+);
+
+DEFINE_EVENT(memcg_rstat_events, count_memcg_events,
+
+	TP_PROTO(struct mem_cgroup *memcg, int item, unsigned long val),
 
 	TP_ARGS(memcg, item, val)
 );
_

Patches currently in -mm which might be from shakeel.butt@xxxxxxxxx are

mm-optimize-truncation-of-shadow-entries.patch
mm-optimize-invalidation-of-shadow-entries.patch
mm-truncate-reset-xa_has_values-flag-on-each-iteration.patch
memcg-add-tracing-for-memcg-stat-updates.patch
memcg-add-tracing-for-memcg-stat-updates-v2.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux