Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Alexei Starovoitov
On Mon, Mar 2, 2015 at 2:04 PM, Tom Zanussi wrote: > On Mon, 2015-03-02 at 11:29 -0800, Alexei Starovoitov wrote: >> On Mon, Mar 2, 2015 at 10:54 AM, Tom Zanussi >> wrote: >> >> > >> >> > The idea would be that instead of getting your individually kmalloc'ed >> >> > elements on-demand from kmallo

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Tom Zanussi
On Mon, 2015-03-02 at 11:29 -0800, Alexei Starovoitov wrote: > On Mon, Mar 2, 2015 at 10:54 AM, Tom Zanussi > wrote: > >> > > >> > The idea would be that instead of getting your individually kmalloc'ed > >> > elements on-demand from kmalloc while in the handler, you'd get them > >> > from a pool y

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Alexei Starovoitov
On Mon, Mar 2, 2015 at 11:33 AM, Steven Rostedt wrote: > On Mon, 2 Mar 2015 11:24:04 -0800 > Alexei Starovoitov wrote: > >> well, percentage of tracepoints called from NMI is tiny >> comparing to the rest, so assuming nmi context >> everywhere is very inefficient. >> Like we can use pre-allocated

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Steven Rostedt
On Mon, 2 Mar 2015 11:24:04 -0800 Alexei Starovoitov wrote: > well, percentage of tracepoints called from NMI is tiny > comparing to the rest, so assuming nmi context > everywhere is very inefficient. > Like we can use pre-allocated pool of map entries when > tracepoint is called from NMI, but w

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Alexei Starovoitov
On Mon, Mar 2, 2015 at 10:54 AM, Tom Zanussi wrote: >> > >> > The idea would be that instead of getting your individually kmalloc'ed >> > elements on-demand from kmalloc while in the handler, you'd get them >> > from a pool you've pre-allocated when you set up the table. This could >> > be from a

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Alexei Starovoitov
On Mon, Mar 2, 2015 at 10:43 AM, Steven Rostedt wrote: > On Mon, 2 Mar 2015 10:12:32 -0800 > Alexei Starovoitov wrote: > >> I'm not sure what would be the meaning of hash map that has all >> elements pre-allocated... >> As I'm reading your cover letter, I agree, we need to find a way >> to call k

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Tom Zanussi
On Mon, 2015-03-02 at 10:40 -0800, Alexei Starovoitov wrote: > On Mon, Mar 2, 2015 at 10:25 AM, Tom Zanussi > wrote: > > On Mon, 2015-03-02 at 10:12 -0800, Alexei Starovoitov wrote: > >> On Mon, Mar 2, 2015 at 10:03 AM, Tom Zanussi > >> wrote: > >> > On Mon, 2015-03-02 at 09:58 -0800, Alexei Star

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Steven Rostedt
On Mon, 2 Mar 2015 10:12:32 -0800 Alexei Starovoitov wrote: > I'm not sure what would be the meaning of hash map that has all > elements pre-allocated... > As I'm reading your cover letter, I agree, we need to find a way > to call kmalloc_notrace-like from tracepoints. > Not sure that patch 8 sty

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Alexei Starovoitov
On Mon, Mar 2, 2015 at 10:25 AM, Tom Zanussi wrote: > On Mon, 2015-03-02 at 10:12 -0800, Alexei Starovoitov wrote: >> On Mon, Mar 2, 2015 at 10:03 AM, Tom Zanussi >> wrote: >> > On Mon, 2015-03-02 at 09:58 -0800, Alexei Starovoitov wrote: >> >> On Mon, Mar 2, 2015 at 8:46 AM, Tom Zanussi >> >>

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Tom Zanussi
On Mon, 2015-03-02 at 10:12 -0800, Alexei Starovoitov wrote: > On Mon, Mar 2, 2015 at 10:03 AM, Tom Zanussi > wrote: > > On Mon, 2015-03-02 at 09:58 -0800, Alexei Starovoitov wrote: > >> On Mon, Mar 2, 2015 at 8:46 AM, Tom Zanussi > >> wrote: > >> > On Mon, 2015-03-02 at 11:37 -0500, Steven Rost

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Alexei Starovoitov
On Mon, Mar 2, 2015 at 10:03 AM, Tom Zanussi wrote: > On Mon, 2015-03-02 at 09:58 -0800, Alexei Starovoitov wrote: >> On Mon, Mar 2, 2015 at 8:46 AM, Tom Zanussi >> wrote: >> > On Mon, 2015-03-02 at 11:37 -0500, Steven Rostedt wrote: >> >> On Mon, 2 Mar 2015 10:01:00 -0600 >> >> Tom Zanussi wr

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Tom Zanussi
On Mon, 2015-03-02 at 09:58 -0800, Alexei Starovoitov wrote: > On Mon, Mar 2, 2015 at 8:46 AM, Tom Zanussi > wrote: > > On Mon, 2015-03-02 at 11:37 -0500, Steven Rostedt wrote: > >> On Mon, 2 Mar 2015 10:01:00 -0600 > >> Tom Zanussi wrote: > >> > >> > Add a gfp flag that allows kmalloc() et al

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Alexei Starovoitov
On Mon, Mar 2, 2015 at 8:46 AM, Tom Zanussi wrote: > On Mon, 2015-03-02 at 11:37 -0500, Steven Rostedt wrote: >> On Mon, 2 Mar 2015 10:01:00 -0600 >> Tom Zanussi wrote: >> >> > Add a gfp flag that allows kmalloc() et al to be used in tracing >> > functions. >> > >> > The problem with using kmall

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Tom Zanussi
On Mon, 2015-03-02 at 11:37 -0500, Steven Rostedt wrote: > On Mon, 2 Mar 2015 10:01:00 -0600 > Tom Zanussi wrote: > > > Add a gfp flag that allows kmalloc() et al to be used in tracing > > functions. > > > > The problem with using kmalloc for tracing is that the tracing > > subsystem should be

Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Steven Rostedt
On Mon, 2 Mar 2015 10:01:00 -0600 Tom Zanussi wrote: > Add a gfp flag that allows kmalloc() et al to be used in tracing > functions. > > The problem with using kmalloc for tracing is that the tracing > subsystem should be able to trace kmalloc itself, which it can't do > directly because of pat

[PATCH 07/15] mm: Add ___GFP_NOTRACE

2015-03-02 Thread Tom Zanussi
Add a gfp flag that allows kmalloc() et al to be used in tracing functions. The problem with using kmalloc for tracing is that the tracing subsystem should be able to trace kmalloc itself, which it can't do directly because of paths like kmalloc()->trace_kmalloc()->kmalloc() or kmalloc()->trace_mm