Re: [PATCH v2] uprobes: Use file_inode()

2013-03-20 Thread Srikar Dronamraju
> with uprobe->inode set by uprobe_register(inode), and the caller uses > d_inode. > > Signed-off-by: Oleg Nesterov Looks good to me. Acked-by: Srikar Dronamraju > --- > kernel/events/uprobes.c | 10 +- > 1 files changed, 5 insertions(+), 5 deletions(-) >

Re: [PATCH 3/6] uprobes/tracing: Ensure inode != NULL in create_trace_uprobe()

2013-02-04 Thread Srikar Dronamraju
heck igrab() != NULL as well. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_uprobe.c |6 -- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c >

Re: [PATCH 6/6] uprobes/perf: Always increment trace_uprobe->nhit

2013-02-04 Thread Srikar Dronamraju
,6 +696,7 @@ static int uprobe_dispatcher(struct uprobe_consumer *con, > struct pt_regs *regs) > struct trace_uprobe *tu; > > tu = container_of(con, struct trace_uprobe, consumer); > + tu->nhit++; > > if (tu->flags & TP_FLAG_TRACE) > u

Re: [PATCH 4/6] uprobes/tracing: Introduce is_trace_uprobe_enabled()

2013-02-04 Thread Srikar Dronamraju
_UPROBE. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_probe.h |1 - > kernel/trace/trace_uprobe.c |9 +++-- > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/kernel/trace/trace_probe.h b/k

Re: [PATCH 6/6] uprobes/perf: Always increment trace_uprobe->nhit

2013-02-04 Thread Srikar Dronamraju
* Oleg Nesterov [2013-02-04 16:18:50]: > On 02/04, Srikar Dronamraju wrote: > > > > * Oleg Nesterov [2013-01-31 20:18:32]: > > > > > Move tu->nhit++ from uprobe_trace_func() to uprobe_dispatcher(). > > > > > > ->nhit counts how many time w

Re: [PATCH 5/6] uprobes/tracing: Kill uprobe_trace_consumer, embed uprobe_consumer into trace_uprobe

2013-02-04 Thread Srikar Dronamraju
> - struct uprobe_trace_consumer *utc; > struct trace_uprobe *tu; > > - utc = container_of(con, struct uprobe_trace_consumer, cons); > - tu = utc->tu; > - if (!tu || tu->consumer != utc) > - return 0; > + tu = container_of(con, struct trace_uprobe, consumer); > > if (tu->flags & TP_FLAG_TRACE) > uprobe_trace_func(tu, regs); > -- > 1.5.5.1 > -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 5/6] uprobes/tracing: Kill uprobe_trace_consumer, embed uprobe_consumer into trace_uprobe

2013-02-11 Thread Srikar Dronamraju
efiltering, we need to have ability to > > distinguish consumers. > > Certainly not. Please see the patches I am going to send. > Yeah, Looking at the next patchset made me realize this. thanks -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from this list: send the line

Re: [PATCH 5/6] uprobes/tracing: Kill uprobe_trace_consumer, embed uprobe_consumer into trace_uprobe

2013-02-11 Thread Srikar Dronamraju
other changes only fix the compilation errors. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_uprobe.c | 35 ++- > 1 files changed, 6 insertions(+), 29 deletions(-) > > diff --git a/kernel/trace/t

Re: [PATCH 6/6] uprobes/perf: Always increment trace_uprobe->nhit

2013-02-11 Thread Srikar Dronamraju
; > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_uprobe.c |3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c > index 55cdc14..0a9a8de 100644 >

Re: [PATCH 3/7] uprobes: Introduce uprobe_apply()

2013-02-11 Thread Srikar Dronamraju
nt, uprobe or consumer, even "bool add" should go > away. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > include/linux/uprobes.h |6 ++ > kernel/events/uprobes.c | 39 +++ > 2 files changed

Re: [PATCH 2/7] perf: Introduce hw_perf_event->tp_target and ->tp_list

2013-02-11 Thread Srikar Dronamraju
() holds a reference, or it is > equal to event->ctx->task. So this pointer is always valid until > free_event(). > > Also add the "struct list_head tp_list" into this union. It is not > strictly necessary, but it can simplify the next changes and we can > add it

Re: [PATCH 4/7] uprobes/perf: Teach trace_uprobe/perf code to track the active perf_event's

2013-02-11 Thread Srikar Dronamraju
/CLOSE > and add/del this perf_event to the list. > > We can probably avoid any locking, but lets start with the "obvioulsy > correct" trace_uprobe_filter->rwlock which protects everything. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > ---

Re: [PATCH 5/7] uprobes/perf: Teach trace_uprobe/perf code to pre-filter

2013-02-11 Thread Srikar Dronamraju
l/debug/tracing/uprobe_profile > /lib/libc.so.6 syscall 10 > > This shows that only the target process was punished by int3. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_uprobe.c | 46

Re: [PATCH 6/7] uprobes/perf: Teach trace_uprobe/perf code to use UPROBE_HANDLER_REMOVE

2013-02-11 Thread Srikar Dronamraju
/lib/libc.so.6 syscall 11 > > The child process hits this int3 only once and does unapply_uprobe(). > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_uprobe.c | 21 ++--- > 1 files c

Re: [PATCH 7/7] uprobes/perf: Avoid uprobe_apply() whenever possible

2013-02-11 Thread Srikar Dronamraju
on't > think TRACE_REG_PERF_OPEN can hit the dying task too often. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_uprobe.c | 42 -- > 1 files changed, 36 insertions(+), 6 deletio

Re: [PATCH 1/4] uprobes/tracing: Kill the pointless task_pt_regs() calls

2013-04-04 Thread Srikar Dronamraju
* Oleg Nesterov [2013-03-29 19:15:40]: > uprobe_trace_func() and uprobe_perf_func() do not need task_pt_regs(), > we already have "struct pt_regs *regs". > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju Adding Masami in the cc. > --- > kernel

Re: [PATCH 2/4] uprobes/tracing: Kill the pointless seq_print_ip_sym() call

2013-04-04 Thread Srikar Dronamraju
* Oleg Nesterov [2013-03-29 19:15:43]: > seq_print_ip_sym(ip) in print_uprobe_event() is pointless, > kallsyms_lookup(ip) can not resolve a user-space address. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_uprobe.c |8 +

Re: [PATCH 3/4] uprobes/tracing: Kill the pointless local_save_flags/preempt_count calls

2013-04-04 Thread Srikar Dronamraju
* Oleg Nesterov [2013-03-29 19:15:45]: > uprobe_trace_func() is never called with irqs or preemption > disabled, no need to ask preempt_count() or local_save_flags(). > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju Adding Masami in the Cc. > --- > kernel/tr

Re: [PATCH 4/4] uprobes/tracing: generalize struct uprobe_trace_entry_head

2013-04-04 Thread Srikar Dronamraju
pport for ret-probes. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju Also copying Masami. > --- > kernel/trace/trace.h|5 --- > kernel/trace/trace_uprobe.c | 61 -- > 2 files changed, 35 insertions(+), 31 d

Re: [GIT PULL] uprobes: pre-filtering

2013-01-24 Thread Srikar Dronamraju
s to be the right place to do this. tu->call.filter would have the post filtering data utc->filter needs to be set to the pre-filtering handler. The other alternative is to extend the current abi and pass the prefilter option. Should we extend the abi for userspace tracing is obviously deba

Re: [PATCH 1/4] uprobes: Fix dentry/mount leak in create_trace_uprobe()

2013-01-28 Thread Srikar Dronamraju
* Oleg Nesterov [2013-01-27 20:48:33]: > create_trace_uprobe() does kern_path() to find ->d_inode, but forgets > to do path_put(). We can do this right after igrab(). > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_uprobe.c |

Re: [PATCH 2/4] uprobes: Fully initialize uprobe_trace_consumer before uprobe_register()

2013-01-28 Thread Srikar Dronamraju
kfree(utc); > - return ret; > } > > - tu->flags |= flag; > - utc->tu = tu; > - tu->consumer = utc; > - > - return 0; > + return ret; > } > > static void probe_event_disable(struct trace_uprobe *tu, int fla

Re: [GIT PULL] uprobes: pre-filtering

2013-01-28 Thread Srikar Dronamraju
* Oleg Nesterov [2013-01-25 17:17:28]: > On 01/25, Ingo Molnar wrote: > > > > * Srikar Dronamraju wrote: > > > > > The other alternative is to extend the current abi and pass > > > the prefilter option. Should we extend the abi for userspace > > >

Re: [PATCH] sched: Skip looking at skip if next or last is set

2013-02-21 Thread Srikar Dronamraju
* Peter Zijlstra [2013-02-20 09:46:25]: > On Mon, 2013-02-18 at 18:31 +0530, Srikar Dronamraju wrote: > > pick_next_entity() prefers next, then last. However code checks if the > > left entity can be skipped even if next / last is set. > > > > Check if left entity sho

mm: trivial: Remove duplicate declaration for migrate_misplaced_page

2013-03-14 Thread Srikar Dronamraju
Just noticied that e14808b49 added a duplicate extern declaration for migrate_misplaced_page() Signed-off-by: Srikar Dronamraju --- diff --git a/include/linux/migrate.h b/include/linux/migrate.h index a405d3dc..086bd33 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h

Re: [RFC][PATCH] Improving directed yield scalability for PLE handler

2012-09-11 Thread Srikar Dronamraju
> > > @@ -4323,6 +4340,10 @@ bool __sched yield_to(struct task_struct *p, > > bool preempt) > > > rq = this_rq(); > > > > > > again: > > > + /* optimistic test to avoid taking locks */ > > > + if (!__yield_to_candidate(curr, p)) > > > + goto out_irq; > > > + > > So add

Re: [PATCH 6/7] uprobes: Xol should send SIGTRAP if X86_EFLAGS_TF was set

2012-09-12 Thread Srikar Dronamraju
d? or are there other problems? > But this needs more changes, handle_swbp() does the same and this is > equally wrong. send_sigtrap() is arch specific and defined for only few archs. we would have to force. But these are not related to the patch. > > Signed-off-by: Oleg Nesterov Ack

Re: [PATCH 7/7] uprobes: Make arch_uprobe_task->saved_trap_nr "unsigned int"

2012-09-12 Thread Srikar Dronamraju
* Oleg Nesterov [2012-09-03 17:26:20]: > Make arch_uprobe_task->saved_trap_nr "unsigned int" and move it down > after ->saved_scratch_register, this changes sizeof() from 24 to 16. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > arc

Re: [PATCH 0/7] uprobes: single-step fixes

2012-09-12 Thread Srikar Dronamraju
* Oleg Nesterov [2012-09-08 19:06:01]: > On 09/03, Oleg Nesterov wrote: > > > > Sebastian, I changed your patches a bit: > > > > 1/7: > > > > - Change the subject and update the changelog. In particular, > > s/utrace/uprobes/. I am wondering where this typo came from

Re: [PATCH 8/7] uprobes: Fix arch_uprobe_disable_step() && UTASK_SSTEP_TRAPPED interaction

2012-09-12 Thread Srikar Dronamraju
when we move it into > arch_uprobe_post_xol() and arch_uprobe_abort_xol(). > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju note: I also think this should be merged into 6/7 patch if possible -- thanks and regards Srikar > --- > arch/x86/kernel/uprobes.c |

Re: [PATCH] uprobes: don't put NULL pointer in uprobe_register()

2012-09-12 Thread Srikar Dronamraju
* Sebastian Andrzej Siewior [2012-08-30 19:26:22]: > alloc_uprobe() might return a NULL pointer, put_uprobe() can't deal with > this. > > Signed-off-by: Sebastian Andrzej Siewior Acked-by: Srikar Dronamraju > --- > kernel/events/uprobes.c |3 ++- > 1 file c

Re: [PATCH 1/3] uprobes: uprobes_treelock should not disable irqs

2012-09-14 Thread Srikar Dronamraju
* Oleg Nesterov [2012-08-19 18:40:37]: > Nobody plays with uprobes_tree/uprobes_treelock in interrupt context, > no need to disable irqs. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/events/uprobes.c | 21 - >

Re: [PATCH 2/3] uprobes: introduce MMF_RECALC_UPROBES

2012-09-14 Thread Srikar Dronamraju
robe_dup_vma(), to set MMF_HAS_UPROBES > only if the new mm actually has uprobes, but I don't think this > makes sense. > > The next patch will use this flag to clear MMF_HAS_UPROBES. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > include/li

Re: [PATCH 3/3] uprobes: teach find_active_uprobe() to clear MMF_HAS_UPROBES

2012-09-14 Thread Srikar Dronamraju
(vma, vma->vm_start, vma->vm_end)) Should we set the MMF_RECALC_UPROBES here? Its harmless but my thought was if we indeed saw a uprobe that was already deleted, then the next time we hit a non uprobe breakpoint in the same process context, we will not come here because MMF_RECALC_UPROBES

Re: [PATCH 0/3] uprobes: teach uprobes to clear MMF_HAS_UPROBES

2012-09-14 Thread Srikar Dronamraju
* Oleg Nesterov [2012-08-19 18:40:08]: > Hello. > > On top of "kill uprobes_state->count, add MMF_HAS_UPROBES" > series. > > Once again, I am not sure we really need this (except 1/3). > Perhaps we could remove uprobe_munmap() instead and forget > about the false-positive MMF_HAS_UPROBES's. >

Re: [PATCH 00/33] AutoNUMA27

2012-10-23 Thread Srikar Dronamraju
* Andrea Arcangeli [2012-10-14 06:57:16]: > I'll release an autonuma29 behaving like 28fast if there are no > surprises. The new algorithm change in 28fast will also save memory > once I rewrite it properly. > Here are my results of specjbb2005 on a 2 node box (Still on autonuma27, but plan to

Re: [PATCH 1/4] uprobes/powerpc: Don't clear TIF_UPROBE in do_notify_resume()

2012-11-01 Thread Srikar Dronamraju
> Subject: [PATCH 1/4] uprobes/powerpc: Don't clear TIF_UPROBE in > do_notify_resume() > > Cleanup. No need to clear TIF_UPROBE, uprobe_notify_resume() does this. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > arch/powerpc/kernel/si

Re: [PATCH 2/4] uprobes/powerpc: Do not use arch_uprobe_*_step() helpers

2012-11-01 Thread Srikar Dronamraju
; fixes. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > arch/powerpc/kernel/uprobes.c |6 ++ > kernel/events/uprobes.c |2 -- > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/kernel/uprobes.c b/arch

Re: [PATCH 4/4] uprobes: Kill arch_uprobe_enable/disable_step() hooks

2012-11-02 Thread Srikar Dronamraju
* Oleg Nesterov [2012-10-28 18:39:36]: > Kill arch_uprobe_enable/disable_step() hooks, they do nothing and > nobody needs them. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > include/linux/uprobes.h |2 -- > kernel/events/uprobes.c | 10

Re: [PATCH 3/4] uprobes/x86: Cleanup the single-stepping code

2012-11-02 Thread Srikar Dronamraju
; > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > arch/x86/kernel/uprobes.c | 54 +++- > 1 files changed, 19 insertions(+), 35 deletions(-) > > diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c >

Re: [PATCH 00/31] numa/core patches

2012-11-05 Thread Srikar Dronamraju
Hey Peter, Here are results on 2node and 8node machine while running the autonuma benchmark. On 2 node, 12 core 24GB KernelVersion: 3.7.0-rc3

Re: [PATCH] uprobes: teach build_probe_list() to consider the range

2012-07-25 Thread Srikar Dronamraju
tmp_list) into build_probe_list(). > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 3/4] uprobes: rename vma_address() and make it return "unsigned long"

2012-07-25 Thread Srikar Dronamraju
a_address(), rename it to >offset_to_vaddr(), this matches vaddr_to_offset(). > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org Mo

Re: [PATCH 2/4] uprobes: fix register_for_each_vma()->vma_address() check

2012-07-25 Thread Srikar Dronamraju
more clean/understandable and now we can change vma_address(). > > 3. While at it, remove the unnecessary type-cast. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [PATCH 4/4] uprobes: __replace_page() needs munlock_vma_page()

2012-07-25 Thread Srikar Dronamraju
27;t really > matter but looks a bit better. > > Signed-off-by: Oleg Nesterov One thing I wanted to check is, should we mlock the new page, i.e the replacing page. It may not a good idea to mlock the new page because then we can end up adding too many pages to the unevictable list.

Re: [PATCH 3/4] uprobes: rename vma_address() and make it return "unsigned long"

2012-07-26 Thread Srikar Dronamraju
* Oleg Nesterov [2012-07-26 12:28:12]: > On 07/26, Srikar Dronamraju wrote: > > > > * Oleg Nesterov [2012-07-12 19:10:22]: > > > > > 1. vma_address() returns loff_t, this looks confusing and this is > > >unnecessary after the previous change. Make

Re: [PATCH v3 2/2] powerpc: Uprobes port to powerpc

2012-07-27 Thread Srikar Dronamraju
0.01% automount libc-2.12.so [.] malloc > > Patch applies on the current master branch of Linus' tree (bdc0077af). > The trap_nr addition patch is a prereq. > > Signed-off-by: Ananth N Mavinakayanahalli Acked-by: Srikar Dronamraju -- To unsubscribe from

Re: [PATCH] uprobes: don't enable/disable signle step if the user did it

2012-07-30 Thread Srikar Dronamraju
* Oleg Nesterov [2012-07-30 16:16:38]: > On 07/30, Ananth N Mavinakayanahalli wrote: > > > > On Thu, Jul 26, 2012 at 05:20:43PM +0200, Sebastian Andrzej Siewior wrote: > > > If someone is using single stepping over uprobe brackpoint then after > > > we pass the uprobe single step, single stepping

Re: [PATCH] uprobes: mmap_region() corrupts mm->mm_rb if uprobe_mmap() fails

2012-07-30 Thread Srikar Dronamraju
> > If mmap_region()->uprobe_mmap() fails, unmap_and_free_vma path > does unmap_region() but does not remove the soon-to-be-freed vma > from rb tree (actually there are more problems). > > Perhaps we could do do_munmap() + return in this case, but in fact > it is simply wrong to abort if uprobe_m

Re: [PATCH 1/3] uprobes: Change write_opcode() to use FOLL_FORCE

2012-09-25 Thread Srikar Dronamraju
ister, see the next patch. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/events/uprobes.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c > index 14c2e99..fa1

Re: [PATCH 2/3] uprobes: Change valid_vma() to demand VM_MAYEXEC rather than VM_EXEC

2012-09-25 Thread Srikar Dronamraju
> No need to check VM_MAYREAD, it is always set. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/events/uprobes.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c >

Re: [PATCH 3/3] uprobes: Restrict valid_vma(false) to skip VM_SHARED

2012-09-25 Thread Srikar Dronamraju
te understand how unregister can confuse the probed application. > Signed-off-by: Oleg Nesterov The changes look good. Acked-by: Srikar Dronamraju > --- > kernel/events/uprobes.c | 13 - > 1 files changed, 4 insertions(+), 9 deletions(-) > > diff --git a/kernel/e

possible recursive locking in numasched code

2012-09-25 Thread Srikar Dronamraju
rq->lock. Not a clean approach as in we end up calling a sched/fair.c defined function in sched/core.c explicitly. The below patch tries to implement 4th approach. --- From: Srikar Dronamraju Date: Tue, 25 Sep 2012 02:37:55 -0700 Subject: [PATCH] Dont call task_tick_numa while holdi

Re: [QUESTION] Can uprobe_event support @ADDR, $retval, offs(FETCHARG)?

2012-09-25 Thread Srikar Dronamraju
Hi Hyeoncheol, > uprobe_event only supports %REG arguments. I think that memory fetch, > return value fetch, memory dereference functions in > kernel/trace/trace_probe.c are good for uprobe_event. Yes, these will be good to have and is listed as todo. > So with a little > modification of parse_p

Re: [QUESTION] Can uprobe_event support @ADDR, $retval, offs(FETCHARG)?

2012-09-25 Thread Srikar Dronamraju
ng data thats not paged out. Most times the data that is requested tends to the hot data. We could look at supporting data that is paged out later. > > BTW, if we can support offs(FETCHARGS), $stack and $stackN > are also available. ;) > -- Thanks and Regards Srikar Dronamraju -- To uns

Re: [PATCH 1/4] uprobes/powerpc: Don't clear TIF_UPROBE in do_notify_resume()

2012-10-28 Thread Srikar Dronamraju
* Ananth N Mavinakayanahalli [2012-10-29 10:57:07]: > On Sun, Oct 28, 2012 at 06:39:25PM +0100, Oleg Nesterov wrote: > > Hi Oleg, > > > Cleanup. No need to clear TIF_UPROBE, do_notify_resume() does this. > > > > Signed-off-by: Oleg Nesterov > > --- > > arch/powerpc/kernel/signal.c |4 +--

Re: [PATCH] uprobes: Fix utask->depth accounting in handle_trampoline()

2013-09-11 Thread Srikar Dronamraju
khail Kulemin > Reported-by: Hemant Kumar Shaw Acked-by: Srikar Dronamraju Mikhail Kulemin has verified that this fix works for him. > --- > kernel/events/uprobes.c |4 +--- > 1 files changed, 1 insertions(+), 3 deletions(-) > > diff --git a/kernel/events/uprobes.c

Re: [PATCH] UPROBES: Remove useless __weak attribute

2013-10-10 Thread Srikar Dronamraju
will try to call arch_uprobe_skip_sstep() > somehwere in Stupidhistan leading to a system crash. We rather want a > proper link error so remove arch_uprobe_skip_sstep(). > > Signed-off-by: Ralf Baechle > Acked-by: Srikar Dronamraju Will be nice to have another arch(mips) suppo

Re: [PATCH v4 1/3] sched: Reduce overestimating rq->avg_idle

2013-09-01 Thread Srikar Dronamraju
_idle by always updating it with the > function call to update_avg() first. Then, if avg_idle exceeds the max, we set > it to the max. > > Signed-off-by: Jason Low > Reviewed-by: Rik van Riel Reviewed-by: Srikar Dronamraju > --- -- To unsubscribe from this list: send the line

Re: [PATCH v4 2/3] sched: Consider max cost of idle balance per sched domain

2013-09-01 Thread Srikar Dronamraju
domain_cost *= 2; sd->max_newidle_lb_cost += domain_cost; sd->max_newidle_lb_cost /= 2; Maybe the name could then change to avg_newidle_lb_cost. > + > + curr_cost += dom

Re: [PATCH 1/7] uprobes: Introduce arch_uprobe_enable/disable_step()

2012-09-07 Thread Srikar Dronamraju
oks later. > > Signed-off-by: Sebastian Andrzej Siewior > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > include/linux/uprobes.h |2 ++ > kernel/events/uprobes.c | 14 -- > 2 files changed, 14 insertions(+), 2 deletions(-) > > dif

Re: [PATCH 2/7] uprobes: x86: Implement x86 specific arch_uprobe_*_step

2012-09-07 Thread Srikar Dronamraju
GS_TF. And otoh nit: s/itsel/itself > we leak TIF_SINGLESTEP (set by enable) if the probed insn is "popf". > See the next patches, we need the changes in arch/x86/kernel/step.c > first. > > Signed-off-by: Sebastian Andrzej Siewior > Signed-off-by: Oleg Nesterov A

Re: [PATCH 3/7] ptrace: Introduce set_task_blockstep() helper

2012-09-07 Thread Srikar Dronamraju
* Oleg Nesterov [2012-09-03 17:26:06]: > No functional changes, preparation for the next fix and for uprobes > single-step fixes. > > Move the code playing with TIF_BLOCKSTEP/DEBUGCTLMSR_BTF into the > new helper, set_task_blockstep(). > > Signed-off-by: Oleg Nester

Re: [PATCH 5/7] uprobes: Do not (ab)use TIF_SINGLESTEP/user_*_single_step() for single-stepping

2012-09-07 Thread Srikar Dronamraju
lly minor) > problem. A probed "pushf" insn can see the wrong X86_EFLAGS_TF set by > uprobes. Perhaps we should change _disable to update the stack, or > teach arch_uprobe_skip_sstep() to emulate this insn. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju &g

Re: [PATCH 4/7] ptrace: Partly fix set_task_blockstep()->update_debugctlmsr() logic

2012-09-07 Thread Srikar Dronamraju
* Oleg Nesterov [2012-09-03 17:26:09]: > Afaics the usage of update_debugctlmsr() and TIF_BLOCKSTEP in > step.c was always very wrong. > > 1. update_debugctlmsr() was simply unneeded. The child sleeps >TASK_TRACED, __switch_to_xtra(next_p => child) should notice >TIF_BLOCKSTEP and set/cl

Re: [PATCH 5/7] uprobes: Do not (ab)use TIF_SINGLESTEP/user_*_single_step() for single-stepping

2012-09-08 Thread Srikar Dronamraju
* Oleg Nesterov [2012-09-07 17:50:57]: > On 09/07, Srikar Dronamraju wrote: > > > > Acked-by: Srikar Dronamraju > > Thanks! > > (and thanks, I'll fix the typo in 2/7 you pointed out) > > > > void arch_uprobe_enable_step(struct arch_uprobe *

Re: [RFC][PATCH] Improving directed yield scalability for PLE handler

2012-09-08 Thread Srikar Dronamraju
> > signed-off-by: Andrew Theurer > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index fbf1fd0..c767915 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -4844,6 +4844,9 @@ bool __sched yield_to(struct task_struct *p, bool > preempt) > > again: > p_rq = ta

Re: [RFC][PATCH] Improving directed yield scalability for PLE handler

2012-09-10 Thread Srikar Dronamraju
* Peter Zijlstra [2012-09-10 18:03:55]: > On Mon, 2012-09-10 at 08:16 -0500, Andrew Theurer wrote: > > > > @@ -4856,8 +4859,6 @@ again: > > > > if (curr->sched_class != p->sched_class) > > > > goto out; > > > > > > > > - if (task_running(p_rq, p) || p->state) > > > > -

Re: [PATCH 1/4] uprobes: Kill set_swbp()->is_swbp_at_addr()

2012-10-05 Thread Srikar Dronamraju
nsn() which is similar to set_swbp() > in this respect. So the only caller will be handle_swbp() and we > can make its semantics clear. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: [PATCH 2/4] uprobes: Introduce copy_opcode(), kill read_opcode()

2012-10-05 Thread Srikar Dronamraju
ial, fold it into its single >caller, is_swbp_at_addr(). > > 3. Remove "auprobe" argument from write_opcode(), it is not used >since f403072c6. > > Signed-off-by: Oleg Nesterov > --- Acked-by: Srikar Dronamraju -- To unsubscribe from this list: send the line

Re: [PATCH 4/4] uprobes: Simplify is_swbp_at_addr(), remove stale comments

2012-10-06 Thread Srikar Dronamraju
> Signed-off-by: Oleg Nesterov > --- Acked-by: Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 3/4] uprobes: Kill set_orig_insn()->is_swbp_at_addr()

2012-10-06 Thread Srikar Dronamraju
f is_swbp_at_addr(), > we can change its semantics. > > Signed-off-by: Oleg Nesterov > --- Acked-by: Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 1/7] uprobes/x86: Only rep+nop can be emulated correctly

2012-10-06 Thread Srikar Dronamraju
d handle_swbp(). > > Remove these additional checks. If we want to implement this > correctly we need to know the full insn length to update ->ip. > > rep* + nop is fine even without updating ->ip. > > Signed-off-by: Oleg Nesterov > --- Acked-by: Srikar Dronamraju

Re: [PATCH 2/7] uprobes: Don't return success if alloc_uprobe() fails

2012-10-06 Thread Srikar Dronamraju
* Oleg Nesterov [2012-09-30 21:42:01]: > If alloc_uprobe() fails uprobe_register() should return ENOMEM, not 0. > > Signed-off-by: Oleg Nesterov > --- Acked-by: Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [PATCH 3/7] uprobes: Do not delete uprobe if uprobe_unregister() fails

2012-10-06 Thread Srikar Dronamraju
from >write_opcode(). > > 3. Change register_for_each_vma(is_register => false) to remove >as much breakpoints as possible but return non-zero if >remove_breakpoint() fails at least once. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju -- To uns

Re: [PATCH 4/7] uprobes: Fix handle_swbp() vs unregister() + register() race

2012-10-06 Thread Srikar Dronamraju
* Oleg Nesterov [2012-09-30 21:42:11]: > Strictly speaking this race was added by me in 56bb4cf6. However > I think that this bug is just another indication that we should > move copy_insn/uprobe_analyze_insn code from install_breakpoint() > to uprobe_register(), there are a lot of other reasons

Re: [PATCH 5/7] uprobes: Introduce uprobe_copy_insn()

2012-10-06 Thread Srikar Dronamraju
* Oleg Nesterov [2012-09-30 21:42:17]: > Preparation. Extract the copy_insn/arch_uprobe_analyze_insn code > from install_breakpoint() into the new helper, uprobe_copy_insn(). > > And move uprobe->flags defines from uprobes.h to uprobes.c, nobody > else can use them anyway. > > Signed-off-by: Ol

Re: [PATCH 6/7] uprobes: Fix uprobe_copy_insn() race with itself

2012-10-06 Thread Srikar Dronamraju
and register not being a performance path, Can we use a single mutex instead of a per-uprobe mutex. Acked-by: Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http:/

Re: [PATCH 7/7] uprobes: Fix the racy uprobe->flags manipulation

2012-10-06 Thread Srikar Dronamraju
ROBE_SKIP_SSTEP. > > Change this code to use bitops. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.

Re: [PATCH 4/7] uprobes: Fix handle_swbp() vs unregister() + register() race

2012-10-06 Thread Srikar Dronamraju
"bool restart"? Lets keep it as is for now. Acked-by: Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 5/7] uprobes: Introduce uprobe_copy_insn()

2012-10-06 Thread Srikar Dronamraju
he patch again. Yeah prepare_uprobe() looks good for me. Acked-by: Srikar Dronamraju > > == > [PATCH 5/7] uprobes: Introduce uprobe_copy_insn() > > Preparation. Extract the copy_insn/arch_uprobe_analy

Re: [PATCH 4/7] uprobes: Fix handle_swbp() vs unregister() + register() race

2012-10-07 Thread Srikar Dronamraju
* Oleg Nesterov [2012-10-06 20:53:37]: > On 10/06, Srikar Dronamraju wrote: > > > > > > > > for the future changes... (say, we can remove bp if consumers do not > > > want to trace this task). Not sure it makes sense to change it right > > > now. &g

Re: [PATCH 5/7] uprobes: Introduce uprobe_copy_insn()

2012-10-07 Thread Srikar Dronamraju
* Oleg Nesterov [2012-10-06 20:59:49]: > On 10/06, Srikar Dronamraju wrote: > > > > Yeah prepare_uprobe() looks good for me. > > > > Acked-by: Srikar Dronamraju > > OK, renamed. > > The next patches updated accordinly, I hope I can keep your acks. Y

Re: [PATCH 2/9] uprobes: check for single step support

2012-10-17 Thread Srikar Dronamraju
* Rabin Vincent [2012-10-14 21:23:06]: > Check for single step support before calling user_enable_single_step(), > since user_enable_single_step() just BUG()s if support does not exist. > Needed by ARM. > > Signed-off-by: Rabin Vincent > --- > kernel/events/uprobes.c |3 ++- > 1 file chang

Re: [PATCH 3/9] uprobes: allow ignoring of probe hits

2012-10-17 Thread Srikar Dronamraju
> static struct uprobe *find_active_uprobe(unsigned long bp_vaddr, int > *is_swbp) > { > struct mm_struct *mm = current->mm; > @@ -1469,6 +1474,7 @@ static void handle_swbp(struct pt_regs *regs) > struct uprobe *uprobe; > unsigned long bp_vaddr; > int uninitialized_var(is

Re: [PATCH 4/9] uprobes: allow arch access to xol slot

2012-10-17 Thread Srikar Dronamraju
* Rabin Vincent [2012-10-14 21:23:08]: > Allow arches to customize how the instruction is filled into the xol > slot. ARM will use this to insert an undefined instruction after the > real instruction in order to simulate a single step of the instruction > without hardware support. > > Signed-of

Re: [PATCH 2/2] uprobes: Use brw_mutex to fix register/unregister vs dup_mmap() race

2012-10-18 Thread Srikar Dronamraju
re is no way to detect > this if uprobe goes away. > > So this patch simply adds brw_start/end_read() around dup_mmap(), and > brw_start/end_write() into register_for_each_vma(). > > This adds 2 new hooks into dup_mmap() but we can kill uprobe_dup_mmap() > and fold it into up

Re: [PATCH 5/9] uprobes: allow arch-specific initialization

2012-10-18 Thread Srikar Dronamraju
* Rabin Vincent [2012-10-14 21:23:09]: > Add a weak function for any architecture-specific initialization. ARM > will use this to register the handlers for the undefined instructions it > uses to implement uprobes. > > Signed-off-by: Rabin Vincent > --- > include/linux/uprobes.h |1 + > k

Re: [PATCH 00/45] Automatic NUMA Balancing V7

2012-12-07 Thread Srikar Dronamraju
Got a chance to run autonuma-benchmark on a 8 node, 64 core machine. the results are as below. (for each kernel I ran 5 iterations of autonuma-benchmark) KernelVersion: 3.7.0-rc3-mainline_v37rc7() Testcase: Min Max Avg numa01: 156

Re: [PATCH 00/49] Automatic NUMA Balancing v10

2012-12-09 Thread Srikar Dronamraju
> > Either way, last night I applied a patch on top of latest tip/master to > remove the nr_cpus_allowed check so that numacore would be enabled again > and tested that. In some places it has indeed much improved. In others > it is still regressing badly and in two case, it's corrupting memory --

Re: [PATCH 1/7] uprobes: Move __set_bit(UPROBE_SKIP_SSTEP) into alloc_uprobe()

2012-12-09 Thread Srikar Dronamraju
> Cosmetic. __set_bit(UPROBE_SKIP_SSTEP) is the part of initialization, > it is not clear why it is set in insert_uprobe(). > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/events/uprobes.c |5 ++--- > 1 files changed, 2 insertions(+), 3 d

Re: [PATCH 2/7] uprobes: Kill the "uprobe != NULL" check in uprobe_unregister()

2012-12-09 Thread Srikar Dronamraju
* Oleg Nesterov [2012-11-23 21:28:02]: > Trivial. uprobe can't be NULL after mutex_unlock(), it was already used. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/events/uprobes.c |3 +-- > 1 files changed, 1 insertions(+), 2 deletio

Re: [PATCH 3/7] uprobes: Kill the pointless inode/uc checks in register/unregister

2012-12-09 Thread Srikar Dronamraju
* Oleg Nesterov [2012-11-23 21:28:06]: > register/unregister verifies that inode/uc != NULL. For what? > This really looks like "hide the potential problem", the caller > should pass the valid data. > Agree that users should pass valid data. I do understand that we expect the users to be knowle

Re: [PATCH 00/49] Automatic NUMA Balancing v10

2012-12-09 Thread Srikar Dronamraju
* Srikar Dronamraju [2012-12-10 10:37:10]: > > > > Either way, last night I applied a patch on top of latest tip/master to > > remove the nr_cpus_allowed check so that numacore would be enabled again > > and tested that. In some places it has indeed much improved. I

Re: [PATCH 00/45] Automatic NUMA Balancing V7

2012-12-10 Thread Srikar Dronamraju
> > > > Got a chance to run autonuma-benchmark on a 8 node, 64 core machine. > > the results are as below. (for each kernel I ran 5 iterations of > > autonuma-benchmark) > > > > Thanks, a test of v10 would also be appreciated. The differences between > V7 and V10 are small but do include a chan

Re: [PATCH 4/7] uprobes: Kill uprobe_consumer->filter()

2012-12-10 Thread Srikar Dronamraju
t skip uc->handler(). > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > include/linux/uprobes.h |5 - > kernel/events/uprobes.c |6 ++ > kernel/trace/trace_uprobe.c |1 - > 3 files changed, 2 insertions(+), 10 deletions(-) > >

Re: [PATCH 5/7] uprobes: Introduce filter_chain()

2012-12-10 Thread Srikar Dronamraju
) to call this helper too. Currently this is > pointless because remove_breakpoint() is only called when the last > consumer goes away, but we will change this. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/events/uprobes.c | 24 ++

Re: [PATCH 00/49] Automatic NUMA Balancing v10

2012-12-10 Thread Srikar Dronamraju
Hi Mel, Ingo, Here are the results of running autonumabenchmark on a 64 core, 8 node machine. Has six 32GB nodes and two 64 GB nodes. KernelVersion: 3.7.0-rc8 Testcase: Min Max Avg numa01: 1475.37 1615.39 1555.24

Re: [PATCH v2 1/1] uprobes: Use percpu_rw_semaphore to fix register/unregister vs dup_mmap() race

2012-11-14 Thread Srikar Dronamraju
kill uprobe_dup_mmap() > and fold it into uprobe_end_dup_mmap(). > Acked-by: Srikar Dronamraju > Reported-by: Srikar Dronamraju > Signed-off-by: Oleg Nesterov > --- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message t

Re: uprobes && pre-filtering

2012-11-06 Thread Srikar Dronamraju
> Hello. > > There is a known (and by design) problem with uprobes. They act > systemwide, there is no pre-filtering. Just some random thoughts > to provoke the discussion. > > - I think that the current uprobe_consumer->filter(task) should die. > > It buys nothing. It is called right before -

  1   2   3   4   5   6   7   8   9   >