[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130822124212.328c09c7@gandalf.local.home>
Date: Thu, 22 Aug 2013 12:42:12 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Namhyung Kim <namhyung@...nel.org>,
Namhyung Kim <namhyung.kim@....com>,
Hyeoncheol Lee <cheol.lee@....com>,
LKML <linux-kernel@...r.kernel.org>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
Oleg Nesterov <oleg@...hat.com>,
"zhangwei(Jovi)" <jovi.zhangwei@...wei.com>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: [PATCH 10/13] tracing/uprobes: Fetch args before reserving a
ring buffer
On Fri, 09 Aug 2013 18:56:54 +0900
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com> wrote:
> (2013/08/09 17:45), Namhyung Kim wrote:
> > From: Namhyung Kim <namhyung.kim@....com>
> >
> > Fetching from user space should be done in a non-atomic context. So
> > use a temporary buffer and copy its content to the ring buffer
> > atomically.
> >
> > While at it, use __get_data_size() and store_trace_args() to reduce
> > code duplication.
>
> I just concern using kmalloc() in the event handler. For fetching user
> memory which can be swapped out, that is true. But most of the cases,
> we can presume that it exists on the physical memory.
>
What about creating a per cpu buffer when uprobes are registered, and
delete them when they are finished? Basically what trace_printk() does
if it detects that there are users of trace_printk() in the kernel.
Note, it does not deallocate them when finished, as it is never
finished until reboot ;-)
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists