Re: [v2 PATCH 2/2]: pseries: Implement Pseries Processor Idle idle module.

2009-08-26 Thread Peter Zijlstra
On Wed, 2009-08-26 at 16:40 +0530, Arun R Bharadwaj wrote: +void (*pm_idle)(void); +EXPORT_SYMBOL_GPL(pm_idle); Seriously.. this caused plenty problems over on x86 and you're doing the exact same dumb thing? ___ Linuxppc-dev mailing list

Re: [v2 PATCH 2/2]: pseries: Implement Pseries Processor Idle idle module.

2009-08-26 Thread Peter Zijlstra
On Wed, 2009-08-26 at 17:02 +0530, Arun R Bharadwaj wrote: * Peter Zijlstra a.p.zijls...@chello.nl [2009-08-26 13:27:18]: On Wed, 2009-08-26 at 16:40 +0530, Arun R Bharadwaj wrote: +void (*pm_idle)(void); +EXPORT_SYMBOL_GPL(pm_idle); Seriously.. this caused plenty problems over

Re: [PATCH 2/4]: CPUIDLE: Introduce architecture independent cpuidle_pm_idle in drivers/cpuidle/cpuidle.c

2009-08-27 Thread Peter Zijlstra
On Thu, 2009-08-27 at 17:23 +0530, Arun R Bharadwaj wrote: * Arun R Bharadwaj a...@linux.vnet.ibm.com [2009-08-27 17:19:08]: Cpuidle infrastructure assumes pm_idle as the default idle routine. But, ppc_md.power_save is the default idle callback in case of pSeries. So, create a more

Re: [PATCH 2/4]: CPUIDLE: Introduce architecture independent cpuidle_pm_idle in drivers/cpuidle/cpuidle.c

2009-08-28 Thread Peter Zijlstra
On Fri, 2009-08-28 at 10:19 +0530, Arun R Bharadwaj wrote: This only does the job of picking the right idle loop for current latency and power requirement. This is already done in ladder/menu governors under the routines menu_select()/ladder_select(). I'm not sure whats the purpose of it

Re: [PATCH 2/4]: CPUIDLE: Introduce architecture independent cpuidle_pm_idle in drivers/cpuidle/cpuidle.c

2009-08-28 Thread Peter Zijlstra
On Fri, 2009-08-28 at 11:44 +0530, Arun R Bharadwaj wrote: * Peter Zijlstra a.p.zijls...@chello.nl [2009-08-27 14:53:27]: Hi Peter, Ben, I've put the whole thing in a sort of a block diagram. Hope it explains things more clearly

Re: [PATCH 2/4]: CPUIDLE: Introduce architecture independent cpuidle_pm_idle in drivers/cpuidle/cpuidle.c

2009-08-28 Thread Peter Zijlstra
On Fri, 2009-08-28 at 08:48 +0200, Peter Zijlstra wrote: void cpuidle_install_idle_handler(void) { . . cpuidle_pm_idle = cpuidle_idle_call; } All I'm seeing here is a frigging mess. How on earths can something called

Re: [PATCH v2 0/2] cpu: pseries: Offline state framework.

2009-09-01 Thread Peter Zijlstra
On Fri, 2009-08-28 at 15:30 +0530, Gautham R Shenoy wrote: Hi, This is the version 2 of the patch series to provide a cpu-offline framework that enables the administrators choose the state the offline CPU must be put into when multiple such states are exposed by the underlying architecture.

Re: [v4 PATCH 1/5]: cpuidle: Cleanup drivers/cpuidle/cpuidle.c

2009-09-01 Thread Peter Zijlstra
On Tue, 2009-09-01 at 17:08 +0530, Arun R Bharadwaj wrote: * Arun R Bharadwaj a...@linux.vnet.ibm.com [2009-09-01 17:07:04]: Cleanup drivers/cpuidle/cpuidle.c Cpuidle maintains a pm_idle_old void pointer because, currently in x86 there is no clean way of registering and unregistering a

Re: [v4 PATCH 1/5]: cpuidle: Cleanup drivers/cpuidle/cpuidle.c

2009-09-03 Thread Peter Zijlstra
On Thu, 2009-09-03 at 10:12 +0530, Arun R Bharadwaj wrote: OK, that's a start I guess. Best would be to replace all of pm_idle with cpuidle, which is what should have been done from the very start. If cpuidle cannot fully replace the pm_idle functionality, then it needs to fix that.

Re: [PATCH v3 0/3] cpu: pseries: Cpu offline states framework

2009-09-15 Thread Peter Zijlstra
On Tue, 2009-09-15 at 17:36 +0530, Gautham R Shenoy wrote: This patchset contains the offline state driver implemented for pSeries. For pSeries, we define three available_hotplug_states. They are: online: The processor is online. offline: This is the the default behaviour

Re: [PATCH v3 0/3] cpu: pseries: Cpu offline states framework

2009-09-16 Thread Peter Zijlstra
On Wed, 2009-09-16 at 20:58 +0530, Dipankar Sarma wrote: On Tue, Sep 15, 2009 at 02:11:41PM +0200, Peter Zijlstra wrote: On Tue, 2009-09-15 at 17:36 +0530, Gautham R Shenoy wrote: This patchset contains the offline state driver implemented for pSeries. For pSeries, we define three

Re: [PATCH v3 0/3] cpu: pseries: Cpu offline states framework

2009-09-16 Thread Peter Zijlstra
On Wed, 2009-09-16 at 21:54 +0530, Dipankar Sarma wrote: No, for this specific case, latency isn't an issue. The issue is - how do we cede unused vcpus to hypervisor for better energy management ? Yes, it can be done by a hypervisor manager telling the kernel to offline and make a bunch of

Re: [PATCH v3 0/3] cpu: pseries: Cpu offline states framework

2009-09-16 Thread Peter Zijlstra
On Wed, 2009-09-16 at 22:33 +0530, Vaidyanathan Srinivasan wrote: * Peter Zijlstra a.p.zijls...@chello.nl [2009-09-16 18:35:16]: On Wed, 2009-09-16 at 21:54 +0530, Dipankar Sarma wrote: No, for this specific case, latency isn't an issue. The issue is - how do we cede unused vcpus

Re: [v5 RFC PATCH 0/7]: cpuidle/x86/POWER (REDESIGN): Cleanup idle power management code in x86, cleanup drivers/cpuidle/cpuidle.c and introduce cpuidle to POWER.

2009-09-22 Thread Peter Zijlstra
Much better :-) But I'm puzzled by all the per-cpu-ish-ness of the stuff. Why would you need to register things on a per-cpu basis? Also: + list_for_each(pos, per_cpu(cpuidle_devices_list, cpu)) { + temp_dev = container_of(pos, struct cpuidle_device, +

Re: [PATCH v2 0/2] cpu: pseries: Offline state framework.

2009-09-24 Thread Peter Zijlstra
On Thu, 2009-09-24 at 10:48 +1000, Benjamin Herrenschmidt wrote: On Wed, 2009-09-02 at 07:33 +0200, Peter Zijlstra wrote: I'm still thinking this is a bad idea. The OS should only know about online/offline. Use the hypervisor interface to deal with the cpu once its offline

Re: [PATCH v2 0/2] cpu: pseries: Offline state framework.

2009-09-24 Thread Peter Zijlstra
On Thu, 2009-09-24 at 18:38 +1000, Benjamin Herrenschmidt wrote: On Thu, 2009-09-24 at 09:51 +0200, Peter Zijlstra wrote: I don't quite follow your logic here. This is useful for more than just hypervisors. For example, take the HV out of the picture for a moment and imagine that the HW

Re: [v6 PATCH 0/7]: cpuidle/x86/POWER: Cleanup idle power management code in x86, cleanup drivers/cpuidle/cpuidle.c and introduce cpuidle to POWER.

2009-09-25 Thread Peter Zijlstra
On Fri, 2009-09-25 at 12:36 +0530, Vaidyanathan Srinivasan wrote: * Arjan van de Ven ar...@infradead.org [2009-09-24 14:22:28]: On Thu, 24 Sep 2009 10:42:41 +0530 Arun R Bharadwaj a...@linux.vnet.ibm.com wrote: * Arun R Bharadwaj a...@linux.vnet.ibm.com [2009-09-22 16:55:27]:

Re: [PATCH v3 0/3] cpu: pseries: Cpu offline states framework

2009-09-25 Thread Peter Zijlstra
On Thu, 2009-09-24 at 10:51 +1000, Benjamin Herrenschmidt wrote: On Tue, 2009-09-15 at 14:11 +0200, Peter Zijlstra wrote: I still think its a layering violation... its the hypervisor manager that should be bothered in what state an off-lined cpu is in. That's not how our hypervisor works

Re: [v7 PATCH 0/7]: cpuidle/x86/POWER: Cleanup idle power management code in x86, cleanup drivers/cpuidle/cpuidle.c and introduce cpuidle to POWER.

2009-10-06 Thread Peter Zijlstra
On Tue, 2009-10-06 at 22:05 +0530, Arun R Bharadwaj wrote: Also, the per-cpu nature of registration/unregistration of cpuidle has been maintained as ACPI needs this. Right, so can't we ditch that and have acpi default to the lowest common C-state and warn when various cpus report different

Re: [v7 PATCH 0/7]: cpuidle/x86/POWER: Cleanup idle power management code in x86, cleanup drivers/cpuidle/cpuidle.c and introduce cpuidle to POWER.

2009-10-07 Thread Peter Zijlstra
On Wed, 2009-10-07 at 16:56 +0530, Vaidyanathan Srinivasan wrote: * Peter Zijlstra a.p.zijls...@chello.nl [2009-10-06 20:04:39]: On Tue, 2009-10-06 at 22:05 +0530, Arun R Bharadwaj wrote: Also, the per-cpu nature of registration/unregistration of cpuidle has been maintained as ACPI

Re: [v7 PATCH 3/7]: x86: refactor x86 idle power management code and remove all instances of pm_idle.

2009-10-07 Thread Peter Zijlstra
On Tue, 2009-10-06 at 21:01 +0530, Arun R Bharadwaj wrote: +++ linux.trees.git/arch/x86/kernel/process.c @@ -9,6 +9,7 @@ #include linux/pm.h #include linux/clockchips.h #include linux/random.h +#include linux/cpuidle.h #include trace/events/power.h #include asm/system.h #include

Re: [v8 PATCH 2/8]: cpuidle: implement a list based approach to register a set of idle routines.

2009-10-08 Thread Peter Zijlstra
On Thu, 2009-10-08 at 15:20 +0530, Arun R Bharadwaj wrote: * Arun R Bharadwaj a...@linux.vnet.ibm.com [2009-10-08 15:18:28]: Implement a list based registering mechanism for architectures which have multiple sets of idle routines which are to be registered. Currently, in x86 it is done by

Re: [v8 PATCH 2/8]: cpuidle: implement a list based approach to register a set of idle routines.

2009-10-08 Thread Peter Zijlstra
On Thu, 2009-10-08 at 16:12 +0530, Arun R Bharadwaj wrote: So cpuidle didn't already have a list of idle functions it takes an appropriate one from? No.. As of now, cpuidle supported only one _set_ of idle states that can be registered. So in this one set, it would choose the

Re: [v8 PATCH 2/8]: cpuidle: implement a list based approach to register a set of idle routines.

2009-10-08 Thread Peter Zijlstra
On Thu, 2009-10-08 at 16:31 +0530, Arun R Bharadwaj wrote: * Peter Zijlstra a.p.zijls...@chello.nl [2009-10-08 12:50:33]: On Thu, 2009-10-08 at 16:12 +0530, Arun R Bharadwaj wrote: So cpuidle didn't already have a list of idle functions it takes an appropriate one from

Re: [v8 PATCH 2/8]: cpuidle: implement a list based approach to register a set of idle routines.

2009-10-08 Thread Peter Zijlstra
On Thu, 2009-10-08 at 17:31 +0530, Arun R Bharadwaj wrote: Uhm, no, it would mean ACPI putting its idle routines on the same level as all others. Putting them all on the same level would mean, we need an enable/disable routine to enable only the currently active routines. What's this

Re: [PATCH v5 0/4] pseries: Add cede support for cpu-offline

2009-11-11 Thread Peter Zijlstra
On Fri, 2009-10-30 at 10:52 +0530, Gautham R Shenoy wrote: Gautham R Shenoy (4): pseries: Serialize cpu hotplug operations during deactivate Vs deallocate pseries: Add code to online/offline CPUs of a DLPAR node. pSeries: Add hooks to put the CPU into an appropriate

Re: [PATCH v5 0/4] pseries: Add cede support for cpu-offline

2009-11-11 Thread Peter Zijlstra
On Thu, 2009-11-12 at 08:35 +1100, Benjamin Herrenschmidt wrote: On Wed, 2009-11-11 at 14:25 +0100, Peter Zijlstra wrote: On Fri, 2009-10-30 at 10:52 +0530, Gautham R Shenoy wrote: Gautham R Shenoy (4): pseries: Serialize cpu hotplug operations during deactivate Vs deallocate

Re: [Next] CPU Hotplug test failures on powerpc

2009-12-14 Thread Peter Zijlstra
On Fri, 2009-12-11 at 16:23 +0530, Sachin Sant wrote: While executing cpu_hotplug(from autotest) tests against latest next on a power6 box, the machine locks up. A soft reset shows the following trace cpu 0x0: Vector: 100 (System Reset) at [cc9333d0] pc: c03433d8:

Re: [Next] CPU Hotplug test failures on powerpc

2009-12-14 Thread Peter Zijlstra
On Mon, 2009-12-14 at 16:41 +0530, Sachin Sant wrote: Peter Zijlstra wrote: On Fri, 2009-12-11 at 16:23 +0530, Sachin Sant wrote: While executing cpu_hotplug(from autotest) tests against latest next on a power6 box, the machine locks up. A soft reset shows the following trace cpu

Re: [Next] CPU Hotplug test failures on powerpc

2009-12-15 Thread Peter Zijlstra
On Tue, 2009-12-15 at 15:14 +0530, Sachin Sant wrote: Benjamin Herrenschmidt wrote: static void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p) { int dest_cpu; const struct cpumask *nodemask = cpumask_of_node(cpu_to_node(dead_cpu)); again: /*

Re: [Next] CPU Hotplug test failures on powerpc

2009-12-15 Thread Peter Zijlstra
Could you try the below? --- init/main.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/init/main.c b/init/main.c index 4051d75..4be7de2 100644 --- a/init/main.c +++ b/init/main.c @@ -369,12 +369,6 @@ static void __init smp_init(void) { unsigned int cpu;

Re: [Next] CPU Hotplug test failures on powerpc

2009-12-15 Thread Peter Zijlstra
On Wed, 2009-12-16 at 11:08 +0530, Sachin Sant wrote: Peter Zijlstra wrote: Could you try the below? No luck. Still the same issue. The mask values don't change. Bugger, that patch did solve a similar problem for a patch I'm working on. Can you maybe add a print of the cpu_active_mask

Re: [Next] CPU Hotplug test failures on powerpc

2009-12-15 Thread Peter Zijlstra
On Wed, 2009-12-16 at 12:24 +0530, Sachin Sant wrote: Xiaotian Feng wrote: On Wed, Dec 16, 2009 at 2:41 PM, Sachin Sant sach...@in.ibm.com wrote: Xiaotian Feng wrote: Does this testcase hotplug cpu 0 off? No, i don't think so. It skips cpu0 during online/offline

Re: next-20090216: slqb

2009-02-17 Thread Peter Zijlstra
On Tue, 2009-02-17 at 13:31 +0200, Pekka Enberg wrote: On Tue, Feb 17, 2009 at 03:55:40AM +0300, Alexey Dobriyan wrote: FYI, on powerpc-64-smp-n-debug-n: mm/slqb.c: In function '__slab_free': mm/slqb.c:1648: error: implicit declaration of function 'slab_free_to_remote' mm/slqb.c: In

Re: [Powerpc / eHEA] Circular dependency with 2.6.29-rc6

2009-02-25 Thread Peter Zijlstra
On Wed, 2009-02-25 at 16:05 +0100, Jan-Bernd Themann wrote: - When open is called for a registered network device, port-port_lock is taken first, then ehea_fw_handles.lock - When open is left these locks are released in a proper way (inverse order) So this has: port-port_lock

Re: [Powerpc / eHEA] Circular dependency with 2.6.29-rc6

2009-02-25 Thread Peter Zijlstra
On Wed, 2009-02-25 at 18:07 +0100, Jan-Bernd Themann wrote: Hi, yes, sorry for the funny wrapping... and thanks for your quick answer! Peter Zijlstra wrote: On Wed, 2009-02-25 at 16:05 +0100, Jan-Bernd Themann wrote: - When open is called for a registered network device, port

Re: [PATCH 1/2 v2] Driver for Freescale 8610 and 5121 DIU

2008-03-20 Thread Peter Zijlstra
comment clarifying the intended usage of __SPIN_LOCK_UNLOCKED() [ for the observant readers; yes this prescribes a usage that is more than strictly needed, it does however enable interesting future uses ] Signed-off-by: Peter Zijlstra [EMAIL PROTECTED] --- diff --git a/include/linux/spinlock_types.h

Re: [NET]: Fix possible dev_deactivate race condition

2007-10-19 Thread Peter Zijlstra
On Fri, 2007-10-19 at 13:36 +0800, Herbert Xu wrote: On Fri, Oct 19, 2007 at 12:20:25PM +0800, Herbert Xu wrote: In fact this bug exists elsewhere too. For example, the network stack does this in net/sched/sch_generic.c: /* Wait for outstanding qdisc_run calls. */

Re: [PATCH 2/2] powerpc: implement arch_scale_smt_power for Power7

2010-01-20 Thread Peter Zijlstra
On Wed, 2010-01-20 at 14:04 -0600, Joel Schopp wrote: On Power7 processors running in SMT4 mode with 2, 3, or 4 idle threads there is performance benefit to idling the higher numbered threads in the core. So this is an actual performance improvement, not only power savings? This patch

Re: [PATCH 2/2] powerpc: implement arch_scale_smt_power for Power7

2010-01-21 Thread Peter Zijlstra
On Wed, 2010-01-20 at 16:44 -0600, Joel Schopp wrote: Care to take Gautham's bugfix patch (patch 1/2) now, since it just fixes a bug? You'll need it if you ever try to make the x86 broken version work. Sure, I'll take that, thanks! ___

Re: [PATCHv3 2/2] powerpc: implement arch_scale_smt_power for Power7

2010-01-29 Thread Peter Zijlstra
On Fri, 2010-01-29 at 12:23 +1100, Benjamin Herrenschmidt wrote: On machine that don't have SMT, I would like to avoid calling arch_scale_smt_power() at all if possible (in addition to not compiling it in if SMT is not enabled in .config). Now, I must say I'm utterly confused by how the

Re: [PATCHv4 2/2] powerpc: implement arch_scale_smt_power for Power7

2010-02-14 Thread Peter Zijlstra
On Fri, 2010-02-05 at 14:57 -0600, Joel Schopp wrote: On Power7 processors running in SMT4 mode with 2, 3, or 4 idle threads there is performance benefit to idling the higher numbered threads in the core. This patch implements arch_scale_smt_power to dynamically update smt thread power

Re: [PATCHv4 2/2] powerpc: implement arch_scale_smt_power for Power7

2010-02-18 Thread Peter Zijlstra
On Thu, 2010-02-18 at 09:20 +1100, Michael Neuling wrote: Suppose for a moment we have 2 threads (hot-unplugged thread 1 and 3, we can construct an equivalent but more complex example for 4 threads), and we have 4 tasks, 3 SCHED_OTHER of equal nice level and 1 SCHED_FIFO, the SCHED_FIFO

Re: [PATCHv4 2/2] powerpc: implement arch_scale_smt_power for Power7

2010-02-18 Thread Peter Zijlstra
On Thu, 2010-02-18 at 14:17 +0100, Peter Zijlstra wrote: There's one fundamental assumption, and one weakness in the implementation. Aside from bugs and the like.. ;-) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https

Re: [PATCHv4 2/2] powerpc: implement arch_scale_smt_power for Power7

2010-02-18 Thread Peter Zijlstra
On Thu, 2010-02-18 at 10:28 -0600, Joel Schopp wrote: There's one fundamental assumption, and one weakness in the implementation. I'm going to guess the weakness is that it doesn't adjust the cpu power so tasks running in SMT1 mode actually get more than they account for? No, but

Re: [PATCHv4 2/2] powerpc: implement arch_scale_smt_power for Power7

2010-02-19 Thread Peter Zijlstra
On Fri, 2010-02-19 at 17:05 +1100, Michael Neuling wrote: include/linux/sched.h |2 +- kernel/sched_fair.c | 61 +-- - 2 files changed, 58 insertions(+), 5 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h

Re: [PATCHv4 2/2] powerpc: implement arch_scale_smt_power for Power7

2010-02-23 Thread Peter Zijlstra
On Tue, 2010-02-23 at 17:08 +1100, Michael Neuling wrote: I have some comments on the code inline but... So when I run this, I don't get processes pulled down to the lower threads. A simple test case of running 1 CPU intensive process at SCHED_OTHER on a machine with 2 way SMT system (a

Re: [PATCHv4 2/2] powerpc: implement arch_scale_smt_power for Power7

2010-02-23 Thread Peter Zijlstra
On Tue, 2010-02-23 at 17:24 +0100, Peter Zijlstra wrote: busiest_cpu = group_first_cpu(sds-busiest); if (cpu_rq(this_cpu)-nr_running || this_cpu busiest_cpu) return 0; Hmm, we could change the bit in find_busiest_group() to: if (idle == CPU_IDLE

Re: [PATCHv4 2/2] powerpc: implement arch_scale_smt_power for Power7

2010-03-02 Thread Peter Zijlstra
On Sat, 2010-02-27 at 21:21 +1100, Michael Neuling wrote: In message 11927.1267010...@neuling.org you wrote: If there's less the group will normally be balanced and we fall out and end up in check_asym_packing(). So what I tried doing with that loop is detect if there's a hole in

Re: 2.6.34-rc3: Badness at kernel/lockdep.c:2706

2010-04-02 Thread Peter Zijlstra
On Fri, 2010-04-02 at 11:33 +0530, Sachin Sant wrote: With 2.6.34-rc3 boot on a Power5 box : loop: module loaded BUG: key 6b6b6b6b6b6b6b6b not in .data! [ cut here ] Badness at kernel/lockdep.c:2706 NIP: c010a0a8 LR: c010a08c CTR: c00704a4

Re: [PATCH 5/5] sched: make fix_small_imbalance work with asymmetric packing

2010-04-13 Thread Peter Zijlstra
On Fri, 2010-04-09 at 16:21 +1000, Michael Neuling wrote: With the asymmetric packing infrastructure, fix_small_imbalance is causing idle higher threads to pull tasks off lower threads. This is being caused by an off-by-one error. Signed-off-by: Michael Neuling mi...@neuling.org ---

Re: [PATCH 1/5] sched: fix capacity calculations for SMT4

2010-04-13 Thread Peter Zijlstra
On Fri, 2010-04-09 at 16:21 +1000, Michael Neuling wrote: When calculating capacity we use the following calculation: capacity = DIV_ROUND_CLOSEST(power, SCHED_LOAD_SCALE); In SMT2, power will be 1178/2 (provided we are not scaling power with freq say) and SCHED_LOAD_SCALE will be

Re: [PATCH 4/5] sched: Mark the balance type for use in need_active_balance()

2010-04-13 Thread Peter Zijlstra
On Fri, 2010-04-09 at 16:21 +1000, Michael Neuling wrote: need_active_balance() gates the asymmetric packing based due to power save logic, but for packing we don't care. This explanation lacks a how/why. So the problem is that need_active_balance() ends up returning false and prevents the

Re: [PATCH 2/5] sched: add asymmetric packing option for sibling domain

2010-04-13 Thread Peter Zijlstra
On Fri, 2010-04-09 at 16:21 +1000, Michael Neuling wrote: Peter: Since this is based mainly off your initial patch, it should have your signed-off-by too, but I didn't want to add without your permission. Can I add it? Of course! :-) This thing does need a better changelog though, and maybe

Re: linux-next: PowerPC WARN_ON_ONCE() after merge of the final tree (tip related)

2010-04-16 Thread Peter Zijlstra
On Thu, 2010-04-15 at 19:15 +0200, Frederic Weisbecker wrote: that looks rather ugly. Why not do a raw: this_cpu_inc(lockdep_stats.redundant_hardirqs_on); which basically open-codes debug_atomic_inc(), but without the warning? Because that would open a race against

Re: [PATCH 1/5] sched: fix capacity calculations for SMT4

2010-04-16 Thread Peter Zijlstra
On Wed, 2010-04-14 at 14:28 +1000, Michael Neuling wrote: Right, so I suspect this will indeed break some things. We initially allowed 0 capacity for when a cpu is consumed by an RT task and there simply isn't much capacity left, in that case you really want to try and move load to

Re: Possible bug with mutex adaptative spinning

2010-04-16 Thread Peter Zijlstra
cases like that, let's just go to sleep. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Peter Zijlstra a.p.zijls...@chello.nl LKML-Reference: 1271212509.13059.135.ca...@pasglop --- kernel/sched.c |8 1 file changed, 4 insertions(+), 4 deletions(-) Index

Re: [PATCH 1/5] sched: fix capacity calculations for SMT4

2010-04-19 Thread Peter Zijlstra
On Mon, 2010-04-19 at 07:34 +1000, Michael Neuling wrote: Are there any numbers available on how much they gain? It might be worth to stick in real numbers instead of this alleged 15%. I get some gain numbers but obviously the workloads makes a huge difference. From a scheduler

Re: [PATCH 1/5] sched: fix capacity calculations for SMT4

2010-05-31 Thread Peter Zijlstra
On Fri, 2010-04-16 at 15:58 +0200, Peter Zijlstra wrote: Hrmm, my brain seems muddled but I might have another solution, let me ponder this for a bit.. Right, so the thing I was thinking about is taking the group capacity into account when determining the capacity for a single cpu. Say

Re: [PATCH 1/5] sched: fix capacity calculations for SMT4

2010-06-03 Thread Peter Zijlstra
On Wed, 2010-06-02 at 04:22 +0530, Vaidyanathan Srinivasan wrote: If the group were a core group, the total would be much higher and we'd likely end up assigning 1 to each before we'd run out of capacity. This is a tricky case because we are depending upon the DIV_ROUND_CLOSEST to decide

Re: [PATCH 2/2][RT] powerpc - Make the irq reverse mapping radix tree lockless

2008-07-25 Thread Peter Zijlstra
On Thu, 2008-07-24 at 14:18 +0200, Sebastien Dugue wrote: On Thu, 24 Jul 2008 21:11:34 +1000 Nick Piggin [EMAIL PROTECTED] wrote: On Thursday 24 July 2008 20:50, Sebastien Dugue wrote: From: Sebastien Dugue [EMAIL PROTECTED] Date: Tue, 22 Jul 2008 11:56:41 +0200 Subject: [PATCH][RT]

Re: 2.6.35-stable/ppc64/p7: suspicious rcu_dereference_check() usage detected during 2.6.35-stable boot

2010-09-16 Thread Peter Zijlstra
On Thu, 2010-09-16 at 11:12 -0400, valdis.kletni...@vt.edu wrote: Ping? I just hit it on 2.6.36-rc4-mmotm0915. Just wanted to make sure the issue hadn't been lost/forgotten. lost,.. thanks! ___ Linuxppc-dev mailing list

Re: 2.6.35-stable/ppc64/p7: suspicious rcu_dereference_check() usage detected during 2.6.35-stable boot

2010-09-16 Thread Peter Zijlstra
it. Signed-off-by: Peter Zijlstra a.p.zijls...@chello.nl --- kernel/sched.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/kernel/sched.c b/kernel/sched.c index bd8b487..6241049 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -5332,7 +5332,19 @@ void __cpuinit

Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc

2008-01-23 Thread Peter Zijlstra
df3d80f5a5c74168be42788364d13cf6c83c7b9c/23fd50450a34f2558070ceabb0bfebc1c9604af5 and b5869ce7f68b233ceb81465a7644be0d9a5f3dbb . Finished bisecting now. And the winner is... 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8 is first bad commit commit 810e95ccd58d91369191aa4ecc9e6d4a10d8d0c8 Author: Peter Zijlstra [EMAIL

Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc

2008-01-23 Thread Peter Zijlstra
Another question, do you have: CONFIG_FAIR_GROUP_SCHED=y if so, does flipping that off have any effect? ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc

2008-01-25 Thread Peter Zijlstra
On Fri, 2008-01-25 at 18:25 +1100, Benjamin Herrenschmidt wrote: On Fri, 2008-01-25 at 18:03 +1100, Benjamin Herrenschmidt wrote: On Fri, 2008-01-25 at 17:54 +1100, Benjamin Herrenschmidt wrote: Here, I do the test of running 4 times the repro-case provided by Michel with nice 19 and

Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc

2008-01-28 Thread Peter Zijlstra
On Sun, 2008-01-27 at 17:13 +0100, Michel Dänzer wrote: In summary, there are two separate problems with similar symptoms, which had me confused at times: * With CONFIG_FAIR_USER_SCHED disabled, there are severe interactivity hickups with a niced CPU hog and top running. This

Re: ppc32: Weird process scheduling behaviour with 2.6.24-rc

2008-01-28 Thread Peter Zijlstra
On Mon, 2008-01-28 at 13:32 +0100, Ingo Molnar wrote: * Peter Zijlstra [EMAIL PROTECTED] wrote: * With CONFIG_FAIR_USER_SCHED disabled, there are severe interactivity hickups with a niced CPU hog and top running. This started with commit

Re: [PATCH v2 2/2] perf tools: Make Power7 events available for perf

2013-07-04 Thread Peter Zijlstra
On Thu, Jul 04, 2013 at 10:52:18PM +1000, Michael Ellerman wrote: I don't think it even needs libpfm4, just some csv files in tools/perf would do the trick. Right; I think Stephane and Jiri are in favour of creating a 'new' project that includes just the event definitions in a plain text format

Re: [PATCH v2 2/2] perf tools: Make Power7 events available for perf

2013-07-09 Thread Peter Zijlstra
On Mon, Jul 08, 2013 at 10:24:34PM -0400, Vince Weaver wrote: So something like they have on ARM? vince@pandaboard:/sys/bus/event_source/devices$ ls -l lrwxrwxrwx 1 root root 0 Jul 8 21:57 ARMv7 Cortex-A9 - ../../../devices/ARMv7 Cortex-A9 lrwxrwxrwx 1 root root 0 Jul 8 21:57

Re: [PATCH 1/9] cpu: Introduce clear_tasks_mm_cpumask() helper

2012-05-01 Thread Peter Zijlstra
: WARN_ON(cpu_online(cpu)); Ought to cure that worry, no? :-) so its not like new tasks will ever get this cpu set in + * their mm mask. -- Peter Zijlstra + * Thus, we may use rcu_read_lock() here, instead of grabbing + * full-fledged tasklist_lock

[RFC][PATCH 5/5] sched: Rewrite the CONFIG_NUMA sched domain support

2012-05-01 Thread Peter Zijlstra
Cc: Thomas Gleixner t...@linutronix.de Cc: Tony Luck tony.l...@intel.com Cc: x...@kernel.org Cc: Dimitri Sivanich sivan...@sgi.com Cc: Greg Pearson greg.pear...@hp.com Cc: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Cc: bob.pi...@oracle.com Cc: chris.ma...@oracle.com Signed-off-by: Peter

Re: [RFC PATCH] sched/numa: do load balance between remote nodes

2012-06-06 Thread Peter Zijlstra
On Wed, 2012-06-06 at 14:52 +0800, Alex Shi wrote: - if (sched_domains_numa_distance[level] REMOTE_DISTANCE) + if (sched_domains_numa_distance[level] RECLAIM_DISTANCE) I actually considered this.. I just felt a little uneasy re-purposing the RECLAIM_DISTANCE for this, but I guess

Re: [PATCH 1/2] uprobes: Pass probed vaddr to arch_uprobe_analyze_insn()

2012-06-06 Thread Peter Zijlstra
On Wed, 2012-06-06 at 14:49 +0530, Ananth N Mavinakayanahalli wrote: +int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, loff_t vaddr) Don't we traditionally use unsigned long to pass vaddrs? ___ Linuxppc-dev mailing list

Re: [PATCH 2/2] [POWERPC] uprobes: powerpc port

2012-06-06 Thread Peter Zijlstra
On Wed, 2012-06-06 at 14:51 +0530, Ananth N Mavinakayanahalli wrote: One TODO in this port compared to x86 is the uprobe abort_xol() logic. x86 depends on the thread_struct.trap_nr (absent in powerpc) to determine if a signal was caused when the uprobed instruction was single-stepped/

Re: Q: a_ops-readpage() struct file

2012-06-13 Thread Peter Zijlstra
On Mon, 2012-06-11 at 21:09 +0200, Oleg Nesterov wrote: Stupid question. I'm afraid the answer is no but I'll ask anyway. Is it safe to pass filp == NULL to mapping-readpage()? In fact I do not understand why it needs struct file* and I do not see any example of actual usage. Looking at

Re: [RFC PATCH 09/10] POWERPC: smp: remove call to ipi_call_lock()/ipi_call_unlock()

2012-06-16 Thread Peter Zijlstra
On Sat, 2012-06-16 at 09:32 -0700, Paul E. McKenney wrote: However, there is an effort to get rid of stop_machine() from the CPU-down path... So something else will be needed. Elsewhere in this thread I mentioned we could do a synchronize_sched(). I think that covers most of what stop-machine

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-16 Thread Peter Zijlstra
On Thu, 2012-08-16 at 14:23 +1000, Michael Neuling wrote: On this second syscall, fetch_bp_busy_slots() sets slots.pinned to be 1, despite there being no breakpoint on this CPU. This is because the call the task_bp_pinned, checks all CPUs, rather than just the current CPU. POWER7 only has

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-16 Thread Peter Zijlstra
On Thu, 2012-08-16 at 21:17 +1000, Michael Neuling wrote: Peter, On this second syscall, fetch_bp_busy_slots() sets slots.pinned to be 1, despite there being no breakpoint on this CPU. This is because the call the task_bp_pinned, checks all CPUs, rather than just the current CPU.

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-16 Thread Peter Zijlstra
On Fri, 2012-08-17 at 00:02 +1000, Michael Ellerman wrote: You do want to guarantee that the task will always be subject to the breakpoint, even if it moves cpus. So is there any way to guarantee that other than reserving a breakpoint slot on every cpu ahead of time? That's not how regular

Re: [PATCH v2 00/14] Add support for parameterized events from sysfs

2014-08-15 Thread Peter Zijlstra
On Fri, Aug 15, 2014 at 12:26:09AM -0700, Sukadev Bhattiprolu wrote: include/linux/perf_event.h | 10 + kernel/events/core.c | 8 + Those are patches 9 and 12 iirc, no objection to that. I've not had time to actually think about the

Re: [PATCH 1/2] sched: Add helper for task stack page overrun checking

2014-09-04 Thread Peter Zijlstra
On Thu, Sep 04, 2014 at 03:50:23PM +0100, Aaron Tomlin wrote: @@ -537,8 +535,8 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig) printk(KERN_ALERT Faulting instruction address: 0x%08lx\n, regs-nip); - stackend = end_of_stack(current); -

Re: [PATCH 2/2] sched: BUG when stack end location is over written

2014-09-04 Thread Peter Zijlstra
On Thu, Sep 04, 2014 at 03:50:24PM +0100, Aaron Tomlin wrote: Currently in the event of a stack overrun a call to schedule() does not check for this type of corruption. This corruption is often silent and can go unnoticed. However once the corrupted region is examined at a later stage, the

Re: bit fields data tearing

2014-09-05 Thread Peter Zijlstra
On Fri, Sep 05, 2014 at 11:31:09AM -0700, Paul E. McKenney wrote: compiler: Allow 1- and 2-byte smp_load_acquire() and smp_store_release() CPUs without single-byte and double-byte loads and stores place some interesting requirements on concurrent code. For example (adapted from Peter

Re: [PATCH v3 0/3] sched: Always check the integrity of the canary

2014-09-11 Thread Peter Zijlstra
What's with the threading all versions together? Please don't do that -- also don't post a new version just for this though. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v4 01/10] tools/perf: support parsing parameterized events

2014-10-01 Thread Peter Zijlstra
On Wed, Oct 01, 2014 at 11:06:27AM +0200, Jiri Olsa wrote: On Thu, Sep 25, 2014 at 07:25:20PM -0700, Sukadev Bhattiprolu wrote: Jiri Olsa [jo...@redhat.com] wrote: | On Wed, Sep 24, 2014 at 12:27:15PM -0700, Sukadev Bhattiprolu wrote: | From: Cody P Schafer c...@linux.vnet.ibm.com |

Re: Invalid perf_branch_entry.to entries question

2013-05-08 Thread Peter Zijlstra
On Tue, May 07, 2013 at 11:35:28AM +1000, Michael Neuling wrote: Peter Stephane, We are plumbing the POWER8 Branch History Rolling Buffer (BHRB) into struct perf_branch_entry. Sometimes on POWER8 we may not be able to fill out the to address. Just because I'm curious.. however does

Re: Invalid perf_branch_entry.to entries question

2013-05-10 Thread Peter Zijlstra
On Thu, May 09, 2013 at 08:39:15AM +1000, Michael Neuling wrote: Just because I'm curious.. however does that happen? Surely the CPU knows where next to fetch instructions? For computed gotos (ie. branch to a register value), the hardware gives you the from and to address in the branch

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-16 Thread Peter Zijlstra
On Thu, May 16, 2013 at 08:15:17PM +1000, Michael Neuling wrote: Peter, BTW PowerPC also has the ability to filter on conditional branches. Any chance we could add something like the follow to perf also? I don't see an immediate problem with that except that we on x86 need to implement

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-16 Thread Peter Zijlstra
On Thu, May 16, 2013 at 02:16:10PM +0300, Michael S. Tsirkin wrote: There are several ways to make sure might_fault calling function does not sleep. One is to use it on kernel or otherwise locked memory - apparently nfs/sunrpc does this. As noted by Ingo, this is handled by the migh_fault()

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Peter Zijlstra
On Thu, May 16, 2013 at 05:36:11PM +0200, Stephane Eranian wrote: On Thu, May 16, 2013 at 1:16 PM, Peter Zijlstra pet...@infradead.org wrote: On Thu, May 16, 2013 at 08:15:17PM +1000, Michael Neuling wrote: Peter, BTW PowerPC also has the ability to filter on conditional branches. Any

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Peter Zijlstra
On Fri, May 17, 2013 at 09:32:08PM +1000, Michael Neuling wrote: Peter Zijlstra pet...@infradead.org wrote: Wouldn't it be mostly conditional branches that are the primary control flow and can get predicted wrong? I mean, I'm sure someone will miss-predict an unconditional branch but its

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-21 Thread Peter Zijlstra
On Sun, May 19, 2013 at 07:40:09PM +0300, Michael S. Tsirkin wrote: OK I get it. So let me correct myself. The simple code that does something like this under a spinlock: preempt_disable pagefault_disable error = copy_to_user pagefault_enable

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-21 Thread Peter Zijlstra
On Sun, May 19, 2013 at 12:35:26PM +0300, Michael S. Tsirkin wrote: --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -198,7 +198,6 @@ void might_fault(void); #else static inline void might_fault(void) { - might_sleep(); This removes potential resched points

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-21 Thread Peter Zijlstra
On Sun, May 19, 2013 at 12:35:26PM +0300, Michael S. Tsirkin wrote: On Thu, May 16, 2013 at 08:40:41PM +0200, Peter Zijlstra wrote: On Thu, May 16, 2013 at 02:16:10PM +0300, Michael S. Tsirkin wrote: There are several ways to make sure might_fault calling function does not sleep. One

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-21 Thread Peter Zijlstra
On Tue, May 21, 2013 at 03:41:35PM +1000, Michael Neuling wrote: Peter Zijlstra pet...@infradead.org wrote: Can we add your signed-off-by on this? We are cleaning up our series for conditional branches and would like to add this as part of the post. Sure, but its completely untested.. I

Re: [PATCH 2/5] powerpc, perf: Enable conditional branch filter for POWER8

2013-05-22 Thread Peter Zijlstra
On Wed, May 22, 2013 at 11:52:38AM +0530, Anshuman Khandual wrote: Enables conditional branch filter support for POWER8 utilizing MMCRA register based filter and also invalidates a BHRB branch filter combination involving conditional branches. Signed-off-by: Anshuman Khandual

Re: [PATCH v2 10/10] kernel: might_fault does not imply might_sleep

2013-05-22 Thread Peter Zijlstra
On Wed, May 22, 2013 at 12:47:09PM +0300, Michael S. Tsirkin wrote: +static inline bool __can_fault(void) +{ + /* +* Some code (nfs/sunrpc) uses socket ops on kernel memory while +* holding the mmap_sem, this is safe because kernel memory doesn't +* get paged out,

Re: [PATCH v2 00/10] uaccess: better might_sleep/might_fault behavior

2013-05-22 Thread Peter Zijlstra
On Wed, May 22, 2013 at 11:25:36AM +0200, Arnd Bergmann wrote: Calling might_fault() for every __get_user/__put_user is rather expensive because it turns what should be a single instruction (plus fixup) into an external function call. We could hide it all behind CONFIG_DEBUG_ATOMIC_SLEEP just

Re: [PATCH v2 00/10] uaccess: better might_sleep/might_fault behavior

2013-05-22 Thread Peter Zijlstra
On Wed, May 22, 2013 at 02:07:29PM +0300, Michael S. Tsirkin wrote: On Wed, May 22, 2013 at 12:19:16PM +0200, Peter Zijlstra wrote: On Wed, May 22, 2013 at 11:25:36AM +0200, Arnd Bergmann wrote: Calling might_fault() for every __get_user/__put_user is rather expensive because it turns

  1   2   3   4   5   6   7   8   >