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

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

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

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

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

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

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

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

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

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

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

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

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 tom.zanu...@linux.intel.com 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

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 tom.zanu...@linux.intel.com wrote: On Mon, 2015-03-02 at 11:29 -0800, Alexei Starovoitov wrote: On Mon, Mar 2, 2015 at 10:54 AM, Tom Zanussi tom.zanu...@linux.intel.com wrote: The idea would be that instead of getting your individually

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 tom.zanu...@linux.intel.com 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

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 tom.zanu...@linux.intel.com 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

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 tom.zanu...@linux.intel.com wrote: On Mon, 2015-03-02 at 09:58 -0800, Alexei Starovoitov wrote: On Mon, Mar 2, 2015 at 8:46 AM, Tom Zanussi tom.zanu...@linux.intel.com wrote: On Mon, 2015-03-02 at 11:37 -0500, Steven Rostedt wrote: On Mon, 2

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 tom.zanu...@linux.intel.com wrote: On Mon, 2015-03-02 at 10:12 -0800, Alexei Starovoitov wrote: On Mon, Mar 2, 2015 at 10:03 AM, Tom Zanussi tom.zanu...@linux.intel.com wrote: On Mon, 2015-03-02 at 09:58 -0800, Alexei Starovoitov wrote: On Mon,

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 tom.zanu...@linux.intel.com wrote: On Mon, 2015-03-02 at 11:37 -0500, Steven Rostedt wrote: On Mon, 2 Mar 2015 10:01:00 -0600 Tom Zanussi tom.zanu...@linux.intel.com wrote: Add a gfp flag that allows kmalloc() et al to be used in tracing

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 tom.zanu...@linux.intel.com wrote: On Mon, 2015-03-02 at 09:58 -0800, Alexei Starovoitov wrote: On Mon, Mar 2, 2015 at 8:46 AM, Tom Zanussi tom.zanu...@linux.intel.com wrote: On

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 a...@plumgrid.com 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

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 tom.zanu...@linux.intel.com wrote: On Mon, 2015-03-02 at 11:37 -0500, Steven Rostedt wrote: On Mon, 2 Mar 2015 10:01:00 -0600 Tom Zanussi tom.zanu...@linux.intel.com wrote: Add a

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 tom.zanu...@linux.intel.com wrote: On Mon, 2015-03-02 at 10:12 -0800, Alexei Starovoitov wrote: On Mon, Mar 2, 2015 at 10:03 AM, Tom Zanussi tom.zanu...@linux.intel.com wrote: On

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 tom.zanu...@linux.intel.com 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

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 a...@plumgrid.com 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

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 rost...@goodmis.org wrote: On Mon, 2 Mar 2015 11:24:04 -0800 Alexei Starovoitov a...@plumgrid.com wrote: well, percentage of tracepoints called from NMI is tiny comparing to the rest, so assuming nmi context everywhere is very inefficient.

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 rost...@goodmis.org wrote: On Mon, 2 Mar 2015 10:12:32 -0800 Alexei Starovoitov a...@plumgrid.com 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