Re: [PATCH 2/3] uprobes: Introduce uprobe_is_active()

2013-01-03 Thread Srikar Dronamraju
it was already called. We use > RB_CLEAR_NODE() to mark uprobe "inactive", then RB_EMPTY_NODE() can > be used to detect this case. > > RB_EMPTY_NODE() is not used directly, we add the trivial helper for > the next change. > > Signed-off-by: Oleg Nesterov Acked-by:

Re: [PATCH 3/3] uprobes: Kill uprobes_mutex[], separate alloc_uprobe() and __uprobe_register()

2013-01-03 Thread Srikar Dronamraju
active() > and retries if it hits this very unlikely race. uprobes_mutex[] is > no longer needed and can be removed. > > There is another reason for this change, prepare_uprobe() should be > folded into alloc_uprobe() and we do not want to hold the extra locks > around read_mapping_p

Re: [PATCH 1/2] uprobes: Rationalize the usage of filter_chain()

2013-01-03 Thread Srikar Dronamraju
umer_rwsem, but I don't think it makes sense to optimize this and > introduce filter_chain_lockless(). > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/events/uprobes.c | 44 +--- > 1 files changed, 21 insertions

Re: [PATCH 2/2] uprobes: Reintroduce uprobe_consumer->filter()

2013-01-03 Thread Srikar Dronamraju
_mutex. > > See the previous discussion at http://marc.info/?t=13521422972 > Perhaps we should pass more arguments, vma/vaddr? > > Note: this patch obviously can't help to filter out the child created > by fork(), this will be addressed later. > > Signed-off-

Re: [PATCH 1/2] uprobes/x86: Change __skip_sstep() to actually skip the whole insn

2013-01-03 Thread Srikar Dronamraju
; Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > arch/x86/kernel/uprobes.c |5 - > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c > index c71025b..4e33a35 100644 > --- a/arch/x86/

Re: [PATCH 0/6] Basic scheduler support for automatic NUMA balancing

2013-07-01 Thread Srikar Dronamraju
35 23170.23 88049 835 numa02 57.18 87.31 2390.11 10804 3 numa02_SMT 44.78 26.48 944.28 1314 7 numa01 1711.91 421.49 77728.30 224185 2103 numa01_THREAD_ALLOC 452.09 430.88 22271.38 83418 2035 numa02 57.97 126.86 2354.34 8991 135 numa02_SMT 49.19 34.99 914.35 1308 22 > -- > Mel Gorman > SUSE

Re: [PATCH 6/8] sched: Reschedule task on preferred NUMA node once selected

2013-07-02 Thread Srikar Dronamraju
> A preferred node is selected based on the node the most NUMA hinting > faults was incurred on. There is no guarantee that the task is running > on that node at the time so this patch rescheules the task to run on > the most idle CPU of the selected node when selected. This avoids > waiting for th

Re: [PATCH 06/13] sched: Reschedule task on preferred NUMA node once selected

2013-07-04 Thread Srikar Dronamraju
> + /* Do not preempt a task running on its preferred node > */ > + struct rq *rq = cpu_rq(i); > + raw_spin_lock_irq(&rq->lock); Not sure why we need this spin_lock? Cant this be done in a rcu block instead? -- Thanks and Regards Srikar D

Re: [PATCH 11/13] sched: Check current->mm before allocating NUMA faults

2013-07-04 Thread Srikar Dronamraju
address space is quickly skipped. >*/ > - if (pages <= 0 && nr_pte_updates) > + if (nr_pte_updates) > + pages -= (end - start) >> PAGE_SHIFT; > + > + st

Re: [PATCH 13/13] sched: Account for the number of preferred tasks running on a node when selecting a preferred node

2013-07-04 Thread Srikar Dronamraju
> static void task_numa_placement(struct task_struct *p) > { > int seq, nid, max_nid = 0; > @@ -897,7 +924,7 @@ static void task_numa_placement(struct task_struct *p) > > /* Find maximum private faults */ > faults = p->numa_faults[task_faults_idx(nid, 1)]; > -

Re: [PATCH RFC WIP] Process weights based scheduling for better consolidation

2013-07-04 Thread Srikar Dronamraju
ving the tasks. This code also adds iterations logic to the regular move task logic to further consolidate tasks while performing the regular load balancing. Not-yet-signed-off-by: Srikar Dronamraju --- fs/exec.c|4 + include/linux/migrate.h |1 - include/linux/mm_types.

Re: [PATCH RFC WIP] Process weights based scheduling for better consolidation

2013-07-05 Thread Srikar Dronamraju
* Peter Zijlstra [2013-07-05 12:16:54]: > On Thu, Jul 04, 2013 at 11:32:27PM +0530, Srikar Dronamraju wrote: > > Here is an approach to look at numa balanced scheduling from a non numa > > fault > > angle. This approach uses process weights instead of faults as a basis

Re: [PATCH 6/8] sched: Reschedule task on preferred NUMA node once selected

2013-07-05 Thread Srikar Dronamraju
* Peter Zijlstra [2013-07-02 20:17:32]: > On Tue, Jul 02, 2013 at 05:36:55PM +0530, Srikar Dronamraju wrote: > > Here, moving tasks this way doesnt update the schedstats at all. > > Do you actually use schedstats? > Yes, I do use schedstats. Are there any plans to obsole

Re: [PATCH 1/2 v3] tracing/uprobes: Support ftrace_event_file base multibuffer

2013-06-27 Thread Srikar Dronamraju
same uprobe concurrently. > (Perhaps this will be fix in future, kprobe dont't have this > limitation now) > > Signed-off-by: zhangwei(Jovi) > Cc: Masami Hiramatsu > Cc: Frederic Weisbecker > Cc: Oleg Nesterov > Cc: Srikar Dronamraju > --- > kernel/trac

Re: [PATCH 2/8] sched: Track NUMA hinting faults on per-node basis

2013-06-27 Thread Srikar Dronamraju
id task_numa_free(struct task_struct *p) > +{ > +} > +#endif /* CONFIG_NUMA_BALANCING */ > + > #ifdef CONFIG_SMP > > #define rcu_dereference_check_sched_domain(p) \ > -- > 1.8.1.4 > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in >

Re: [PATCH 3/8] sched: Select a preferred node with the most numa hinting faults

2013-06-27 Thread Srikar Dronamraju
NUMA_BALANCING > -extern void sched_setnuma(struct task_struct *p, int node, int shared); > +extern void sched_setnuma(struct task_struct *p, int nid); > static inline void task_numa_free(struct task_struct *p) > { > kfree(p->numa_faults); > -- > 1.8.1.4 > > --

Re: [PATCH 4/8] sched: Update NUMA hinting faults once per scan

2013-06-27 Thread Srikar Dronamraju
igrated */ > - p->numa_faults[node] += pages << migrated; > + p->numa_faults_buffer[node] += pages << migrated; > } > > static void reset_ptenuma_scan(struct task_struct *p) > -- > 1.8.1.4 > > -- > To unsubscribe, send a message with 'unsub

Re: [PATCH 7/8] sched: Split accounting of NUMA hinting faults that pass two-stage filter

2013-06-28 Thread Srikar Dronamraju
* migrated to. >*/ > curr_nid = local_nid; > + last_nid = page_nid_last(page); > target_nid = numa_migrate_prep(page, vma, addr, > page_to_nid(page)); > if (target

Re: [PATCH 5/8] sched: Favour moving tasks towards the preferred node

2013-06-28 Thread Srikar Dronamraju
.c > @@ -393,6 +393,13 @@ static struct ctl_table kern_table[] = { > .mode = 0644, > .proc_handler = proc_dointvec, > }, > + { > + .procname = "numa_balancing_settle_count", > + .data

Re: [PATCH 5/8] sched: Favour moving tasks towards the preferred node

2013-06-28 Thread Srikar Dronamraju
G_SCHEDSTATS schedstat_inc(env->sd, lb_hot_gained[env->idle]); schedstat_inc(p, se.statistics.nr_forced_migrations); #endif return 1; } schedstat_inc(p, se.statistics.nr_failed_migrations

Re: [PATCH 7/8] sched: Split accounting of NUMA hinting faults that pass two-stage filter

2013-06-28 Thread Srikar Dronamraju
eferred. No? > > Well no; not if there's only 5 shared pages but 1024 private pages. Yes, agree, but should we try to give the shared pages some additional weightage? -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-ker

Re: [PATCH 3/8] sched: Select a preferred node with the most numa hinting faults

2013-06-28 Thread Srikar Dronamraju
state on exec(). I > think we want to do that if we're going to think about inheriting stuff. > > Agree, if we inherit the preferred node, we would have to reset on exec. Since we have to reset the numa_faults also on exec, the reset of preferred node can go in task_numa_free --

Re: [PATCH 0/6] Basic scheduler support for automatic NUMA balancing

2013-06-28 Thread Srikar Dronamraju
+ higher system + higher user time. We see more context switches and more page migrations too. -- 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/8] sched: Favour moving tasks towards the preferred node

2013-06-28 Thread Srikar Dronamraju
oves_locality(), I think should be called within the tsk_cache_hot check. Do you have issues with the above snippet that I posted earlier? > tsk_cache_hot = task_hot(p, env->src_rq->clock_task, env->sd); > if (!tsk_cache_hot) > > -- > Mel Gorman > SUSE Labs > -- 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/8] sched: Favour moving tasks towards the preferred node

2013-06-28 Thread Srikar Dronamraju
schedstat_inc(env->sd, lb_hot_gained[env->idle]); > schedstat_inc(p, se.statistics.nr_forced_migrations); > } > #endif > return 1; > } Yes, this looks fine to me. > -- 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 0/6] Basic scheduler support for automatic NUMA balancing

2013-06-30 Thread Srikar Dronamraju
* Srikar Dronamraju [2013-06-28 19:24:22]: > * Mel Gorman [2013-06-26 15:37:59]: > > > It's several months overdue and everything was quiet after 3.8 came out > > but I recently had a chance to revisit automatic NUMA balancing for a few > > days. I looked a

Re: [PATCH 5/5] uprobes: Change write_opcode() to use copy_*page()

2013-03-26 Thread Srikar Dronamraju
* Oleg Nesterov [2013-03-24 19:21:25]: > Change write_opcode() to use copy_highpage() + copy_to_page() > and simplify the code. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/events/uprobes.c | 12 ++-- > 1 files changed

Re: [PATCH 1/5] uprobes: Turn copy_opcode() into copy_from_page()

2013-03-26 Thread Srikar Dronamraju
* Oleg Nesterov [2013-03-24 19:21:10]: > No functional changes. Rename copy_opcode() into copy_from_page() and > add the new "int len" argument to make it more more generic for the > new users. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --

Re: [PATCH 3/5] uprobes: Kill the unnecesary filp != NULL check in __copy_insn()

2013-03-26 Thread Srikar Dronamraju
* Oleg Nesterov [2013-03-24 19:21:18]: > __copy_insn(filp) can only be called after valid_vma() returns T, > vma->vm_file passed as "filp" can not be NULL. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/events/uprobes.c |

Re: [PATCH 2/5] uprobes: Change __copy_insn() to use copy_from_page()

2013-03-26 Thread Srikar Dronamraju
* Oleg Nesterov [2013-03-24 19:21:15]: > Change __copy_insn() to use copy_from_page() and simplify the code. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/events/uprobes.c | 13 ++--- > 1 files changed, 2 insertions(+), 11 dele

Re: [PATCH 4/5] uprobes: Introduce copy_to_page()

2013-03-26 Thread Srikar Dronamraju
* Oleg Nesterov [2013-03-24 19:21:22]: > Extract the kmap_atomic/memcpy/kunmap_atomic code from > xol_get_insn_slot() into the new simple helper, copy_to_page(). > It will have more users soon. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > ke

Re: [PATCH v2 1/4] uprobes: add trap variant helper

2013-03-26 Thread Srikar Dronamraju
where the trap notification came in > for an address without a uprobe. See [1] for a more detailed explanation. > > [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2013-March/104771.html > > This change was suggested by Oleg Nesterov. > > Signed-off-by: Ananth N Mavinakay

Re: [PATCH v2 3/4] uprobes/powerpc: teach uprobes to ignore gdb breakpoints

2013-03-26 Thread Srikar Dronamraju
understand that the trap was inserted > by some other entity and a SIGTRAP needs to be delivered. > > Teach uprobes to ignore breakpoints that do not belong to it. > > Signed-off-by: Ananth N Mavinakayanahalli Acked-by: Srikar Dronamraju > --- > arch/powerpc/kernel/uprobes.

Re: [PATCH v2 4/4] uprobes/powerpc: remove additional trap instruction check

2013-03-26 Thread Srikar Dronamraju
t; - * existing breakpoint instruction underneath > - */ > - if (is_trap(auprobe->ainsn)) > - return -ENOTSUPP; > return 0; > } > -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kerne

Re: [PATCH v2 2/4] uprobes: refuse uprobe on trap variants

2013-03-26 Thread Srikar Dronamraju
* Ananth N Mavinakayanahalli [2013-03-22 20:47:58]: > From: Ananth N Mavinakayanahalli > > Refuse to place a uprobe if a trap variant already exists in the > file copy at the address. > > Signed-off-by: Ananth N Mavinakayanahalli Acked-by: Srikar Dronamraju >

Re: [PATCH 0/18] Basic scheduler support for automatic NUMA balancing V5

2013-07-16 Thread Srikar Dronamraju
node. -- 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/

[RFC PATCH 00/10] Improve numa scheduling by consolidating tasks

2013-07-30 Thread Srikar Dronamraju
:35.3243.9238.64 3.35 44.76% TODOs: 1. Use task loads for numa weights 2. Use numa faults as secondary key while moving threads Andrea Arcangeli (1): x86, mm: Prevent gcc to re-read the pagetables Srikar Dronamraju (9): sched: Introduce per node numa weights sched: U

[RFC PATCH 02/10] sched: Use numa weights while migrating tasks

2013-07-30 Thread Srikar Dronamraju
While migrating a task, check if moving it improves consolidation. However make sure that such a movement doesnt offset fairness or create imbalance in the nodes. Signed-off-by: Srikar Dronamraju --- include/linux/sched.h |1 + kernel/sched/core.c |1 + kernel/sched/fair.c | 80

[RFC PATCH 01/10] sched: Introduce per node numa weights

2013-07-30 Thread Srikar Dronamraju
: Srikar Dronamraju --- fs/exec.c|5 + include/linux/mm_types.h |1 + kernel/fork.c| 10 +++--- kernel/sched/fair.c | 34 ++ 4 files changed, 47 insertions(+), 3 deletions(-) diff --git a/fs/exec.c b/fs/exec.c index

[RFC PATCH 03/10] sched: Select a better task to pull across node using iterations

2013-07-30 Thread Srikar Dronamraju
ff-by: Srikar Dronamraju --- kernel/sched/fair.c | 48 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 3df7f76..8fcbf96 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3

[RFC PATCH 07/10] sched: Pass hint to active balancer about the task to be chosen

2013-07-30 Thread Srikar Dronamraju
some other task that may or may not provide consolidation. Signed-off-by: Srikar Dronamraju --- kernel/sched/fair.c | 20 +++- kernel/sched/sched.h |3 +++ 2 files changed, 22 insertions(+), 1 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index

[RFC PATCH 06/10] sched: Limit migrations from a node

2013-07-30 Thread Srikar Dronamraju
tions. With this counter, if a source node (that acts as a node with least numa affinity for a address-space) has enough requests to relinquish tasks, then we choose a node with the next least number of affinity threads for a address-space. Signed-off-by: Srikar Dronamraju --- fs/e

[RFC PATCH 05/10] sched: Extend idle balancing to look for consolidation of tasks

2013-07-30 Thread Srikar Dronamraju
as a catalyst/opportunity for the other node to pull its node affine tasks. TODO: current checks that look at nr_running should be modified to look at task loads instead. Signed-off-by: Srikar Dronamraju --- kernel/sched/fair.c | 156 +++ 1 files

[RFC PATCH 04/10] sched: Move active_load_balance_cpu_stop to a new helper function

2013-07-30 Thread Srikar Dronamraju
Due to the way active_load_balance_cpu gets called and the parameters passed to it, the active_load_balance_cpu_stop call gets split into multiple lines. Instead move it into a separate helper function. this is a cleanup change. No functional changes. Signed-off-by: Srikar Dronamraju

[RFC PATCH 08/10] sched: Prevent a task from migrating immediately after an active balance

2013-07-30 Thread Srikar Dronamraju
the slight imbalance created because of previous migration (instead of actually trying to pull a task that might lead to more consolidation) Signed-off-by: Srikar Dronamraju --- include/linux/sched.h |1 + kernel/sched/core.c |1 + kernel/sched/fair.c |9 + 3 files changed

[RFC PATCH 10/10] x86, mm: Prevent gcc to re-read the pagetables

2013-07-30 Thread Srikar Dronamraju
se. [ This patch was picked up from the AutoNUMA tree. Also stayed in Ingo Molnar's Numa tree for a while.] Originally-by: Andrea Arcangeli Signed-off-by: Srikar Dronamraju --- Ingo, Andrea, Please let me know if I can add your signed-off-by. --- arch/x86/mm/gup.c | 23 ++

[RFC PATCH 09/10] sched: Choose a runqueue that has lesser local affinity tasks

2013-07-30 Thread Srikar Dronamraju
. Signed-off-by: Srikar Dronamraju --- include/linux/sched.h |2 + kernel/sched/fair.c | 82 +++-- kernel/sched/sched.h |1 + 3 files changed, 82 insertions(+), 3 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index

Re: [RFC PATCH 00/10] Improve numa scheduling by consolidating tasks

2013-07-30 Thread Srikar Dronamraju
* Peter Zijlstra [2013-07-30 10:20:01]: > On Tue, Jul 30, 2013 at 10:17:55AM +0200, Peter Zijlstra wrote: > > On Tue, Jul 30, 2013 at 01:18:15PM +0530, Srikar Dronamraju wrote: > > > Here is an approach that looks to consolidate workloads across nodes. > > > Th

Re: [RFC PATCH 00/10] Improve numa scheduling by consolidating tasks

2013-07-30 Thread Srikar Dronamraju
* Peter Zijlstra [2013-07-30 10:20:01]: > On Tue, Jul 30, 2013 at 10:17:55AM +0200, Peter Zijlstra wrote: > > On Tue, Jul 30, 2013 at 01:18:15PM +0530, Srikar Dronamraju wrote: > > > Here is an approach that looks to consolidate workloads across nodes. > > > Th

Re: [RFC PATCH 00/10] Improve numa scheduling by consolidating tasks

2013-07-30 Thread Srikar Dronamraju
* Peter Zijlstra [2013-07-30 11:10:21]: > On Tue, Jul 30, 2013 at 02:33:45PM +0530, Srikar Dronamraju wrote: > > * Peter Zijlstra [2013-07-30 10:20:01]: > > > > > On Tue, Jul 30, 2013 at 10:17:55AM +0200, Peter Zijlstra wrote: > > > > On Tue, Jul 30, 2013 at

Re: [PATCH 08/18] sched: Reschedule task on preferred NUMA node once selected

2013-07-31 Thread Srikar Dronamraju
cpu. This would avoid us trying to select a cpu whose load is low but which cannot run this task. > -- > Mel Gorman > SUSE Labs > -- 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: [RFC PATCH 00/10] Improve numa scheduling by consolidating tasks

2013-07-31 Thread Srikar Dronamraju
h numa balancing. -- 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: [RFC PATCH 00/10] Improve numa scheduling by consolidating tasks

2013-07-31 Thread Srikar Dronamraju
* Peter Zijlstra [2013-07-30 11:33:21]: > On Tue, Jul 30, 2013 at 02:45:43PM +0530, Srikar Dronamraju wrote: > > > Can you please suggest workloads that I could try which might showcase > > why you hate pure process based approach? > > 2 processes, 1 sysvshm segme

Re: [RFC PATCH 00/10] Improve numa scheduling by consolidating tasks

2013-07-31 Thread Srikar Dronamraju
* Peter Zijlstra [2013-07-31 17:09:23]: > On Tue, Jul 30, 2013 at 03:16:50PM +0530, Srikar Dronamraju wrote: > > I am not against fault and fault based handling is very much needed. > > I have listed that this approach is complementary to numa faults that > > Mel is propo

Re: [PATCH 08/18] sched: Reschedule task on preferred NUMA node once selected

2013-07-31 Thread Srikar Dronamraju
* Mel Gorman [2013-07-15 16:20:10]: > A preferred node is selected based on the node the most NUMA hinting > faults was incurred on. There is no guarantee that the task is running > on that node at the time so this patch rescheules the task to run on > the most idle CPU of the selected node when

Re: [PATCH 18/18] sched: Swap tasks when reschuling if a CPU on a target node is imbalanced

2013-07-31 Thread Srikar Dronamraju
> @@ -904,6 +908,8 @@ static int task_numa_find_cpu(struct task_struct *p, int > nid) > src_eff_load *= src_load + effective_load(tg, src_cpu, -weight, > -weight); > > for_each_cpu(cpu, cpumask_of_node(nid)) { > + struct task_struct *swap_candidate = NULL; > + >

Re: [PATCH 17/18] sched: Retry migration of tasks to CPU on a preferred node

2013-07-31 Thread Srikar Dronamraju
once every five seconds. > > Signed-off-by: Mel Gorman -- 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

Re: [PATCH 16/18] sched: Avoid overloading CPUs on a preferred NUMA node

2013-08-01 Thread Srikar Dronamraju
alanced = (dst_eff_load <= src_eff_load); > + if (!balanced) > + continue; > + Okay same case as above, the cpu could be lightly loaded, but the destination node could be heavier than the source node. No? > + if (dst_load < min_load) { &

Re: [RFC] sched: Limit idle_balance() when it is being used too frequently

2013-07-18 Thread Srikar Dronamraju
balanced. find_busiest_queue() is under rcu. So where and how are we getting these performance gains? Is it that tasks are getting woken up and queued while the cpu is doing newly idle load balance? Or is it that the regular CPU_IDLE balancing which follows idle_balance() does a more aggressive b

Re: [RFC] sched: Limit idle_balance() when it is being used too frequently

2013-07-18 Thread Srikar Dronamraju
hts reversed > -- > 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/ -- Th

Re: [RFC] sched: Limit idle_balance() when it is being used too frequently

2013-07-18 Thread Srikar Dronamraju
* Peter Zijlstra [2013-07-18 14:35:31]: > On Thu, Jul 18, 2013 at 05:45:46PM +0530, Srikar Dronamraju wrote: > > We take locks if and only if we see imbalance and want to pull the > > tasks. > > However if the newly idle balance is not finding an imbalance then this &g

Re: [RFC PATCH v2] sched: Limit idle_balance()

2013-07-22 Thread Srikar Dronamraju
+1th idle balance and reset the counter. Also reset the counter on every successful idle load balance. I am not sure whats a reasonable value for n can be, but may be we could try with n=3. Also have we checked the performance after adjusting the sched_migration_cost tunable? I guess, if we increase

Re: [RFC PATCH v2] sched: Limit idle_balance()

2013-07-23 Thread Srikar Dronamraju
I think people understand that migration_cost depends on the hardware/application and thats why they kept it as a tunable. But is there something that we can look from the hardware and the application behaviour to set a migration cost? May be doing this just complicates stuff then necessary. -- Thank

Re: [PATCH] sched: Give idle_balance() a break when it does not move tasks.

2013-08-12 Thread Srikar Dronamraju
nce = jiffies + (HZ / 100); > } Looks reasonable. However should we do this per sd and not per rq. i.e move the next_newidle_balance to sched_domain. So if we find a load_balance in newly_idle context that wasn't successful, we skip load_balance for that sd in the next newly idle balance. --

Re: [PATCH 3/6] uprobes/tracing: Make uprobe_{trace,perf}_print() uretprobe-friendly

2013-04-07 Thread Srikar Dronamraju
* Oleg Nesterov [2013-04-01 18:08:51]: > Change uprobe_trace_print() and uprobe_perf_print() to check > is_ret_probe() and fill ring_buffer_event accordingly. > > Also change uprobe_trace_func() and uprobe_perf_func() to not > _print() if is_ret_probe() is true. Note that we keep ->handler() > n

Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-07 Thread Srikar Dronamraju
* Anton Arapov [2013-04-03 18:00:36]: > Uretprobe handlers are invoked when the trampoline is hit, on completion the > trampoline is replaced with the saved return address and the uretprobe > instance > deleted. > > v1 changes: > * pass bp_vaddr to ret_handler() > * simplify handle_uretprobe()

Re: [PATCH v1 1/9] uretprobes: Introduce uprobe_consumer->ret_handler()

2013-04-07 Thread Srikar Dronamraju
#x27;TODO' cap that will be removed once return probes be implemented. > * introduce ->ret_handler(). > > Signed-off-by: Anton Arapov Acked-by: Srikar Dronamraju > --- > include/linux/uprobes.h | 3 +++ > kernel/events/uprobes.c | 17 ++--- > 2 files c

Re: [PATCH v1 2/9] uretprobes: Reserve the first slot in xol_vma for trampoline

2013-04-07 Thread Srikar Dronamraju
es > confusion and eases the debug experience in case ->vaddr > notion will be changed. > > v1 changes: > * rework get_trampoline_vaddr() helper. > * init xol_area->slot_count. > > Signed-off-by: Anton Arapov Acked-by: Srikar Dronamraju (one small che

Re: [PATCH v1 3/9] uretprobes/x86: Hijack return address

2013-04-07 Thread Srikar Dronamraju
> * style fixup > RFCv2 changes: > * remove ->doomed flag, kill task immediately > > Signed-off-by: Anton Arapov Acked-by: Srikar Dronamraju > --- > arch/x86/include/asm/uprobes.h | 1 + > arch/x86/kernel/uprobes.c | 29 + > 2 file

Re: [PATCH v1 4/9] uretprobes/ppc: Hijack return address

2013-04-07 Thread Srikar Dronamraju
* Anton Arapov [2013-04-03 18:00:34]: > Hijack the return address and replace it with a trampoline address. > PowerPC implementation. > > Signed-off-by: Anton Arapov Acked-by: Srikar Dronamraju > --- > arch/powerpc/include/asm/uprobes.h | 1 + > arch/powerpc/kerne

Re: [PATCH v1 5/9] uretprobes: Return probe entry, prepare_uretprobe()

2013-04-07 Thread Srikar Dronamraju
in prepare_uretprobe() > and put_uprobe() in a following patch in handle_uretprobe(). > > RFCv2 changes: > * get rid of ->return_consumers member from struct uprobe, introduce > ret_handler() in consumer. > > Signed-off-by: Anton Arapov Acked-by: Srikar Dronamraju &g

Re: [PATCH v1 7/9] uretprobes: Limit the depth of return probe nestedness

2013-04-07 Thread Srikar Dronamraju
h more sophisticated solution that > remove this depth limitation. It is not easy task and lays beyond > this patchset. > > Signed-off-by: Anton Arapov Acked-by: Srikar Dronamraju > --- > include/linux/uprobes.h | 3 +++ > kernel/events/uprobes.c | 11 +++ > 2 files

Re: [PATCH v1 8/9] uretprobes: Remove -ENOSYS as return probes implemented

2013-04-07 Thread Srikar Dronamraju
* Anton Arapov [2013-04-03 18:00:38]: > Enclose return probes implementation. > > Signed-off-by: Anton Arapov > --- Acked-by: Srikar Dronamraju > kernel/events/uprobes.c | 4 > 1 file changed, 4 deletions(-) > > diff --git a/kernel/events/uprobes.c b/kernel/

Re: [PATCH v1 9/9] uretprobes: Documentation update

2013-04-07 Thread Srikar Dronamraju
* Anton Arapov [2013-04-03 18:00:39]: > add the uretprobe syntax and update an example > > Signed-off-by: Anton Arapov > --- Acked-by: Srikar Dronamraju > Documentation/trace/uprobetracer.txt | 114 > --- > 1 file changed, 67 insert

Re: [PATCH 1/6] uprobes/tracing: Introduce uprobe_{trace,perf}_print() helpers

2013-04-07 Thread Srikar Dronamraju
anges. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_uprobe.c | 29 - > 1 files changed, 20 insertions(+), 9 deletions(-) > > diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c

Re: [PATCH 2/6] uprobes/tracing: Introduce is_ret_probe() and uretprobe_dispatcher()

2013-04-07 Thread Srikar Dronamraju
alled and is_ret_probe(tu) is false too. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_uprobe.c | 42 -- > 1 files changed, 40 insertions(+), 2 deletions(-) > > diff --git a/kernel/trace/t

Re: [PATCH 4/6] uprobes/tracing: Make register_uprobe_event() paths uretprobe-friendly

2013-04-07 Thread Srikar Dronamraju
* Oleg Nesterov [2013-04-01 18:08:54]: > Change uprobe_event_define_fields(), and __set_print_fmt() to check > is_ret_probe() and use the appropriate format/fields. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/tra

Re: [PATCH 5/6] uprobes/tracing: Make seq_printf() code uretprobe-friendly

2013-04-07 Thread Srikar Dronamraju
* Oleg Nesterov [2013-04-01 18:08:57]: > Change probes_seq_show() and print_uprobe_event() to check > is_ret_probe() and print the correct data. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_uprobe.c | 17 + >

Re: [PATCH 6/6] uprobes/tracing: Change create_trace_uprobe() to support uretprobes

2013-04-07 Thread Srikar Dronamraju
* Oleg Nesterov [2013-04-01 18:09:00]: > Finally change create_trace_uprobe() to check if argv[0][0] == 'r' > and pass the correct "is_ret" to alloc_trace_uprobe(). > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/

[PATCH 0/2] Simple concepts extracted from tip/numa/core.

2013-05-01 Thread Srikar Dronamraju
+++--- mm/mmzone.c | 14 mm/page_alloc.c |4 +- 11 files changed, 120 insertions(+), 64 deletions(-) -- Thanks and Regards Srikar -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe

[PATCH 1/2] numa: Track last pid accessing a page.

2013-05-01 Thread Srikar Dronamraju
From: Srikar Dronamraju Date: Tue, 30 Apr 2013 01:18:08 -0500 Subject: [PATCH 1/2] numa: Track last pid accessing a page. This change is mostly extracted from ff2a9f9: numa, mm, sched: Implement last-CPU+PID hash tracking from tip/numa/core. We rely on the page::last_nid field (embedded in

[PATCH 2/2] x86, mm: Prevent gcc to re-read the pagetables

2013-05-01 Thread Srikar Dronamraju
here, so this problem is potentially more likely to show up in practice. ] Signed-off-by: Ingo Molnar [ mostly unchanged except rebase to 3.9 ] Signed-off-by: Srikar Dronamraju --- arch/x86/mm/gup.c | 23 --- mm/memory.c |2 +- 2 files changed, 21 insertions(+),

Re: [PATCH 0/2] Simple concepts extracted from tip/numa/core.

2013-05-08 Thread Srikar Dronamraju
hre is at least one stability issue and I'm not keen on the > large increase in system CPU cost and number of pages being migrated as > a result of the patch when there is no co-operation with the scheduler > to make processes a bit stickier on a node once memory has been mig

Re: [PATCH 1/1] uprobes/tracing: Don't pass addr=ip to perf_trace_buf_submit()

2013-04-13 Thread Srikar Dronamraju
g Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_uprobe.c |8 +++- > 1 files changed, 3 insertions(+), 5 deletions(-) > > diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c > index 2d08bea..37ccb72 100644 > --- a/kernel/trace/trace_up

Re: [PATCH 3/6] uprobes/tracing: Make uprobe_{trace,perf}_print() uretprobe-friendly

2013-04-13 Thread Srikar Dronamraju
* Oleg Nesterov [2013-04-09 15:33:33]: > On 04/07, Srikar Dronamraju wrote: > > > > * Oleg Nesterov [2013-04-01 18:08:51]: > > > > > diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c > > > index e91a354..db2718a 100644 > > &g

Re: [PATCH v2 4/7] uprobes/tracing: Make uprobe_{trace,perf}_print() uretprobe-friendly

2013-04-13 Thread Srikar Dronamraju
keep ->handler() > nontrivial even for uretprobe, we need this for filtering and for > other potential extensions. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > Tested-by: Anton Arapov > --- > kernel/trace/trace_uprobe.c | 34 ++

Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-13 Thread Srikar Dronamraju
; > TODO: handle_trampoline() assumes that ->return_instances is always valid. > We should teach it to handle longjmp() which can invalidate the pending > return_instance's. This is nontrivial, we will try to do this in a separate > series. > > Signed-off-by: Anton Arapov

Can we avoid sched:sched_migrate_task event being called twice from sched_fork()

2013-03-08 Thread Srikar Dronamraju
ace_sched_migrate_task() in set_task_cpu() to where the perf sw migrations are accounted. -- Thanks and Regards Srikar -8<------ >From ac9df9bca38ce22c16f1e9b7949015c14257772c Mon Sep 17 00:00:00 2001 From: Srikar Dronamraju Date:

Re: [PATCH] Fix segfault in perf probe

2013-03-12 Thread Srikar Dronamraju
* Ananth N Mavinakayanahalli [2013-03-12 14:32:17]: > From: Ananth N Mavinakayanahalli > > Fix segfault in perf probe due to a bug introduced by commit d8639f068 > (perf tools: Stop using 'self' in strlist). > > > Signed-off-by: Ananth N Mavinakayanahall

[PATCH] uprobes: Ignore unsupported instructions in uprobe_mmap

2012-08-02 Thread Srikar Dronamraju
ted instruction is wrong. Hence change uprobe_mmap() to ignore unsupported instructions. Oleg Nesterov analyzed the root cause of this problem. While at it, add a missing put_uprobe() in the path where uprobe_mmap() races with uprobe_unregister(). Reported-by: William Cohen Signed-off-by: Sri

Re: [PATCH] uprobes: Ignore unsupported instructions in uprobe_mmap

2012-08-02 Thread Srikar Dronamraju
> > uprobe_mmap()->install_breakpoint() can fail if the probed insn is not > > supported > > But there are other reasons why it can fail, > > > However failing mmap_region()/do_fork() because of a probe on an > > unsupported instruction is wrong. > > Srikar, I strongly, absolutely disagree. Plea

Re: [PATCH] uprobes: Ignore unsupported instructions in uprobe_mmap

2012-08-02 Thread Srikar Dronamraju
* Oleg Nesterov [2012-08-02 16:17:57]: > Forgot to mention... > > On 08/02, Srikar Dronamraju wrote: > > > > While at it, add a missing put_uprobe() in the path where uprobe_mmap() > > races with uprobe_unregister(). > > ... > > @@ -1051,8 +1051,10 @@ int

Re: [PATCH] uprobes: Ignore unsupported instructions in uprobe_mmap

2012-08-02 Thread Srikar Dronamraju
* Oleg Nesterov [2012-08-02 19:53:12]: > On 08/02, Srikar Dronamraju wrote: > > > > * Oleg Nesterov [2012-08-02 16:17:57]: > > > > > Forgot to mention... > > > > > > On 08/02, Srikar Dronamraju wrote: > > > > > > > &g

Re: [PATCH] uprobes: Ignore unsupported instructions in uprobe_mmap

2012-08-03 Thread Srikar Dronamraju
> OK, lets start with dup_mmap: > > // retval == 0 > > if (file && uprobe_mmap(tmp)) > goto out; > > out: > up_write(&mm->mmap_sem); > flush_tlb_mm(oldmm); > up_write(&oldmm->mmap_sem); >

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

2012-08-03 Thread Srikar Dronamraju
no reason if it wins > the race and does install_breakpoint() first. > > Change mmap_region() and dup_mmap() to ignore the error code from > uprobe_mmap(). > > Reported-by: William Cohen > Signed-off-by: Oleg Nesterov > Cc: # v3.5 After discussions with Oleg, its very cl

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

2012-08-22 Thread Srikar Dronamraju
> > These seem to be duplicated in kprobes.h, can we consolidate them. > > > +struct arch_uprobe { > > + u8 insn[MAX_UINSN_BYTES]; > > +}; > > Why not uprobe_opcode_t insn ? > insn is updated/accessed in the arch independent code. Size of uprobe_opcode_t could be different for different

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

2012-08-23 Thread Srikar Dronamraju
* Oleg Nesterov [2012-08-23 11:02:09]: > On 08/23, Benjamin Herrenschmidt wrote: > > > > On Thu, 2012-08-23 at 11:02 +0530, Srikar Dronamraju wrote: > > > > > > > > > > insn is updated/accessed in the arch independent code. Size of > > >

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

2012-08-23 Thread Srikar Dronamraju
* Benjamin Herrenschmidt [2012-08-23 20:06:18]: > On Thu, 2012-08-23 at 11:02 +0530, Srikar Dronamraju wrote: > > > > > > > insn is updated/accessed in the arch independent code. Size of > > uprobe_opcode_t could be different for different archs. > > uprobe

Re: [PATCH 3/5] uprobes: Fix UPROBE_SKIP_SSTEP checks in handle_swbp()

2012-09-17 Thread Srikar Dronamraju
* Oleg Nesterov [2012-09-15 17:01:20]: > On 09/15, Ananth N Mavinakayanahalli wrote: > > > > On Fri, Sep 14, 2012 at 07:15:57PM +0200, Oleg Nesterov wrote: > > > > > > Note: probably we should rename "skip" to "emulate" and I think > > > that "clear UPROBE_SKIP_SSTEP" should be moved to arch_can_

Re: [PATCH 1/5] uprobes: Do not leak UTASK_BP_HIT if find_active_uprobe() fails

2012-09-20 Thread Srikar Dronamraju
ask) { > utask = add_utask(); > /* Cannot allocate; re-execute the instruction. */ 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/

<    1   2   3   4   5   6   7   8   9   >