On Thu, Sep 18, 2025 at 6:52 AM Lorenzo Stoakes lorenzo.stoakes@oracle.com wrote:
On Thu, Sep 18, 2025 at 02:42:16PM +0100, Lorenzo Stoakes wrote:
On Mon, Sep 15, 2025 at 09:36:38AM -0700, Kalesh Singh wrote:
Needed observability on in field devices can be collected with minimal overhead and can be toggled on and off. Event driven telemetry can be done with tracepoint BPF programs.
The process comm is provided for aggregation across devices and tgid is to enable per-process aggregation per device.
This allows for observing the distribution of such problems in the field, to deduce if there are legitimate bugs or if a bump to the limit is warranted.
It's not really a bug though is it? It's somebody running out of resources.
I'm not sure how useful this is really. But I'm open to being convinced!
I also wonder if this is better as a statistic? You'd figure out it was a problem that way too right?
Cc: Andrew Morton akpm@linux-foundation.org Cc: David Hildenbrand david@redhat.com Cc: "Liam R. Howlett" Liam.Howlett@oracle.com Cc: Lorenzo Stoakes lorenzo.stoakes@oracle.com Cc: Mike Rapoport rppt@kernel.org Cc: Minchan Kim minchan@kernel.org Cc: Pedro Falcato pfalcato@suse.de Signed-off-by: Kalesh Singh kaleshsingh@google.com
This breaks the VMA tests, please make sure to always check them:
cc -I../shared -I. -I../../include -I../../arch/x86/include -I../../../lib -g -Og -Wall -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined -c -o vma.o vma.c In file included from vma.c:33: ../../../mm/vma.c:10:10: fatal error: trace/events/vma.h: No such file or directory 10 | #include <trace/events/vma.h> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [<builtin>: vma.o] Error 1
Trivial build fix:
----8<---- From fe4c30abbd302ccc628ec92381ac10cea31c6d85 Mon Sep 17 00:00:00 2001 From: Lorenzo Stoakes lorenzo.stoakes@oracle.com Date: Thu, 18 Sep 2025 14:47:10 +0100 Subject: [PATCH] fix
Signed-off-by: Lorenzo Stoakes lorenzo.stoakes@oracle.com
mm/vma.c | 2 -- mm/vma_internal.h | 2 ++ tools/testing/vma/vma_internal.h | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/mm/vma.c b/mm/vma.c index 26046b28cdda..a11d29a2ddc0 100644 --- a/mm/vma.c +++ b/mm/vma.c @@ -7,8 +7,6 @@ #include "vma_internal.h" #include "vma.h"
-#include <trace/events/vma.h>
struct mmap_state { struct mm_struct *mm; struct vma_iterator *vmi; diff --git a/mm/vma_internal.h b/mm/vma_internal.h index 2f05735ff190..2f5ba679f43d 100644 --- a/mm/vma_internal.h +++ b/mm/vma_internal.h @@ -47,6 +47,8 @@ #include <linux/uprobes.h> #include <linux/userfaultfd_k.h>
+#include <trace/events/vma.h>
#include <asm/current.h> #include <asm/tlb.h>
diff --git a/tools/testing/vma/vma_internal.h b/tools/testing/vma/vma_internal.h index 07f4108c5e4c..c08c91861b9a 100644 --- a/tools/testing/vma/vma_internal.h +++ b/tools/testing/vma/vma_internal.h @@ -1661,4 +1661,8 @@ static inline void vma_count_dec(struct mm_struct *mm) vma_count_sub(mm, 1); }
+static void trace_max_vma_count_exceeded(struct task_struct *task) +{ +}
#endif /* __MM_VMA_INTERNAL_H */
I made a point to build and run your tests, seems I forgot to actually test it with this last patch.
Thanks for the fix.
--Kalesh
-- 2.51.0