Re: [PATCH] trace : use kvmalloc instead of kmalloc

2020-07-30 Thread Zhaoyang Huang
On Thu, Jul 30, 2020 at 9:58 PM Steven Rostedt wrote: > > On Thu, 30 Jul 2020 19:04:12 +0800 > Zhaoyang Huang wrote: > > > High order memory stuff within trace could introduce OOM, use kvmalloc > > instead. > > > > Please find the bellowing for the call stack we run across in an android > > sys

Re: [PATCH] trace : use kvmalloc instead of kmalloc

2020-07-30 Thread Steven Rostedt
This is also the second version of the patch. Please add a v2 to the subject, otherwise it gets confusing to know which one to pull in. "[PATCH v2] ..." -- Steve On Thu, 30 Jul 2020 19:04:12 +0800 Zhaoyang Huang wrote: > High order memory stuff within trace could introduce OOM, use kvmallo

Re: [PATCH] trace : use kvmalloc instead of kmalloc

2020-07-30 Thread Steven Rostedt
On Thu, 30 Jul 2020 19:04:12 +0800 Zhaoyang Huang wrote: > High order memory stuff within trace could introduce OOM, use kvmalloc > instead. > > Please find the bellowing for the call stack we run across in an android > system. The scenario happens when traced_probes is woken up to get a large

[PATCH] trace : use kvmalloc instead of kmalloc

2020-07-30 Thread Zhaoyang Huang
High order memory stuff within trace could introduce OOM, use kvmalloc instead. Please find the bellowing for the call stack we run across in an android system. The scenario happens when traced_probes is woken up to get a large quantity of trace even if free memory is even higher than watermark_

Re: [PATCH] trace : use kvmalloc instead of kmalloc

2020-07-30 Thread Michal Hocko
On Wed 29-07-20 19:48:29, Zhaoyang Huang wrote: > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c > index ca1ee65..d4eb7ea 100644 > --- a/kernel/trace/trace.c > +++ b/kernel/trace/trace.c > @@ -6891,7 +6891,7 @@ static int tracing_buffers_open(struct inode *inode, > struct file *filp) >

[PATCH] trace : use kvmalloc instead of kmalloc

2020-07-29 Thread Zhaoyang Huang
High order memory stuff within trace could introduce OOM, use kvmalloc instead. Please find the bellowing for the call stack we run across in an android system. The scenario happens when traced_probes is woken up to get a large quantity of trace even if free memory is even higher than watermark_

[PATCH] trace : use kvmalloc instead of kmalloc

2020-07-29 Thread Zhaoyang Huang
High order memory stuff within trace could introduce OOM, use kvmalloc instead. traced_probes invoked oom-killer: gfp_mask=0x140c0c0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null), order=2, oom_score_adj=-1 traced_probes cpuset=system-background mems_allowed=0 CPU: 3 PID: 588 Comm: traced_