From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Oleg Nesterov <oleg@redhat.com>, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux-mm <linux-mm@kvack.org>, Andi Kleen <andi@firstfloor.org>,
Christoph Hellwig <hch@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Roland McGrath <roland@hack.frob.com>,
Thomas Gleixner <tglx@linutronix.de>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Arnaldo Carvalho de Melo <acme@infradead.org>,
Anton Arapov <anton@redhat.com>,
Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
Jim Keniston <jkenisto@linux.vnet.ibm.com>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH v8 3.2.0-rc5 1/9] uprobes: Install and remove breakpoints.
Date: Fri, 6 Jan 2012 11:44:07 +0530 [thread overview]
Message-ID: <20120106061407.GC14946@linux.vnet.ibm.com> (raw)
In-Reply-To: <1325695788.2697.3.camel@twins>
* Peter Zijlstra <peterz@infradead.org> [2012-01-04 17:49:48]:
> On Fri, 2011-12-16 at 17:58 +0530, Srikar Dronamraju wrote:
> > +static void __unregister_uprobe(struct uprobe *uprobe)
> > +{
> > + if (!register_for_each_vma(uprobe, false))
> > + delete_uprobe(uprobe);
> > +
> > + /* TODO : cant unregister? schedule a worker thread */
> > +}
>
> I was about to suggest we merge it, but we really can't with a hole that
> size..
>
On failure of unregister due to low memory condition:
- uprobe is left in the rbtree. So subsequent probe hits can
still refer the nodes.
- UPROBES_RUN_HANDLER flag still gets reset unconditionally. So
handlers will not run on subsequent probe hits that correspond
to this uprobe.
- consumers for the uprobe is NULL, so mmap_uprobe will not
insert new breakpoints which correspond to this uprobe until
or unless another consumer gets added for the same probe.
- If a new consumer gets added for this probe, we reuse the
uprobe struct.
So in the highly unlikely case of uprobes not being able to unregister
cleanly because of low memory conditions, existing tasks that have this
probe in their address space will incur an extra cost of handling
exceptions.
However scheduling a kworker thread (or removing the underlying
breakpoint if we detect the probe doesnt have UPROBES_RUN_HANDLER flag
set) will reduce this overhead.
Since we are looking at an extra overhead and no change in behaviour,
should this be a reason to stop merging this feature?
--
Thanks and Regards
Srikar
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-01-06 6:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-16 12:27 [PATCH v8 3.2.0-rc5 0/9] uprobes patchset Srikar Dronamraju
2011-12-16 12:28 ` [PATCH v8 3.2.0-rc5 1/9] uprobes: Install and remove breakpoints Srikar Dronamraju
2012-01-04 16:49 ` Peter Zijlstra
2012-01-06 6:14 ` Srikar Dronamraju [this message]
2012-01-06 10:57 ` Peter Zijlstra
2012-01-06 11:08 ` Srikar Dronamraju
2012-01-04 16:51 ` Peter Zijlstra
2012-01-04 17:12 ` Steven Rostedt
2011-12-16 12:28 ` [PATCH v8 3.2.0-rc5 2/9] uprobes: handle breakpoint and signal step exception Srikar Dronamraju
2011-12-16 12:28 ` [PATCH v8 3.2.0-rc5 3/9] uprobes: slot allocation Srikar Dronamraju
2011-12-16 12:28 ` [PATCH v8 3.2.0-rc5 4/9] uprobes: counter to optimize probe hits Srikar Dronamraju
2011-12-16 12:28 ` [PATCH v8 3.2.0-rc5 5/9] tracing: modify is_delete, is_return from ints to bool Srikar Dronamraju
2011-12-16 12:29 ` [PATCH v8 3.2.0-rc5 6/9] tracing: Extract out common code for kprobes/uprobes traceevents Srikar Dronamraju
2011-12-16 12:29 ` [PATCH v8 3.2.0-rc5 7/9] tracing: uprobes trace_event interface Srikar Dronamraju
2011-12-16 12:29 ` [PATCH v8 3.2.0-rc5 8/9] perf: rename target_module to target Srikar Dronamraju
2011-12-16 12:29 ` [PATCH v8 3.2.0-rc5 9/9] perf: perf interface for uprobes Srikar Dronamraju
2012-01-06 10:51 ` Masami Hiramatsu
2012-01-09 11:22 ` Srikar Dronamraju
2012-01-13 1:56 ` Masami Hiramatsu
2012-01-13 5:14 ` Srikar Dronamraju
2012-01-13 14:02 ` Masami Hiramatsu
2012-01-16 14:21 ` [PATCH v9 3.2 " Srikar Dronamraju
2012-01-09 11:24 ` [PATCH v8 3.2.0-rc5 " Srikar Dronamraju
2012-01-12 14:50 ` Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120106061407.GC14946@linux.vnet.ibm.com \
--to=srikar@linux.vnet.ibm.com \
--cc=acme@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=ananth@in.ibm.com \
--cc=andi@firstfloor.org \
--cc=anton@redhat.com \
--cc=hch@infradead.org \
--cc=jkenisto@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=roland@hack.frob.com \
--cc=rostedt@goodmis.org \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).