On 2024/06/22 8:03, Axel Rasmussen wrote: > No objections. Looking back all the way to the first version [1] the > buffers were already percpu, instead of on the stack like this. IOW, > there was no on-list discussion about why this shouldn't go on the > stack. It has been a while, but if memory serves I opted to do it that > way just out of paranoia around putting large buffers on the stack. > But, I agree 256 bytes isn't all that large. > > That v1 patch wasn't all that complex, but then again it didn't deal > with various edge cases properly :) so it has grown significantly more > complex over time. Reconsidering the approach seems reasonable now, > given how much code this removes. > > This change looks straightforwardly correct to me. You can take: > > Reviewed-by: Axel Rasmussen <axelrasmussen@xxxxxxxxxx> Thank you. One question. CONTEXT_COUNT was defined as below. >> -/* >> - * How many contexts our trace events might be called in: normal, softirq, irq, >> - * and NMI. >> - */ >> -#define CONTEXT_COUNT 4 Is there possibility that this function (or in general, trace events) is called from NMI context? If yes, I worry that functions called from get_mm_memcg_path() are not NMI-safe. Original change at https://lkml.kernel.org/r/3e9b2a54-73d4-48cb-a510-d17984c97a45@xxxxxxxxxxxxxxxxxxx was posted due to worrying about NMI safety.