[PATCH] Reduce hashtable size when using 64kB pages

2009-02-13 Thread Anton Blanchard
At the moment we size the hashtable based on 4kB pages / 2, even on a 64kB kernel. This results in a hashtable that is much larger than it needs to be. Grab the real page size and size the hashtable based on that. Note: this only works on non hypervisor machines. Signed-off-by: Anton Blanchard

[PATCH] Enable hashdist by default on PowerPC

2009-02-17 Thread Anton Blanchard
balanced: Free memory: Node 0: 97.53% Node 1: 98.35% Node 2: 98.33% Node 3: 98.33% For many HPC applications we are limited by the free available memory on the smallest node, so even though the same amount of memory is used the better balancing helps. Signed-off-by: Anton Blanchard --- diff --git a

Re: [PATCH] Enable hashdist by default on PowerPC

2009-02-17 Thread Anton Blanchard
Hi Ben, > You have numbers ? :-) I'm asking mostly because I've been wondering > whether it offsets the 16M pages vs. 4K or 64K pages in term of TLB/ERAT > impact. The speedup is application dependent. Things like linpack usually improve when you throw more memmory at them. The potential slowdo

Re: [PATCH] Enable hashdist by default on PowerPC

2009-02-19 Thread Anton Blanchard
free available memory on the smallest node, so even though the same amount of memory is used the better balancing helps. Since all 64bit NUMA capable architectures should have sufficient vmalloc space, it makes sense to enable it via CONFIG_64BIT. Signed-off-by: Anton Blanchard --- diff --git a

[patch 07/10] powerpc: Randomise the brk region

2009-02-22 Thread Anton Blanchard
1afa9000 00:00 0 [heap] Signed-off-by: Anton Blanchard --- Index: linux-2.6/arch/powerpc/include/asm/elf.h === --- linux-2.6.orig/arch/powerpc/include/asm/elf.h 2009-02-20 16:06:32.000

[patch 01/10] powerpc: Move is_32bit_task

2009-02-22 Thread Anton Blanchard
Move is_32bit_task into asm/thread_info.h, that allows us to test for 32/64bit tasks without an ugly CONFIG_PPC64 ifdef. Signed-off-by: Anton Blanchard --- Index: linux-2.6/arch/powerpc/include/asm/thread_info.h === --- linux-2.6

[patch 09/10] powerpc: Increase stack gap on 64bit binaries

2009-02-22 Thread Anton Blanchard
h the same ~128MB hole as in 32bit. This works because we randomise the stack over a 1GB range. Signed-off-by: Anton Blanchard --- Index: linux-2.6/arch/powerpc/mm/mmap.c === --- linux-2.6.orig/arch/powerpc/mm/mmap.c 2009-02-21

[patch 10/10] powerpc: Randomise PIEs

2009-02-22 Thread Anton Blanchard
Randomise ELF_ET_DYN_BASE, which is used when loading position independent executables. Signed-off-by: Anton Blanchard --- Index: linux-2.6/arch/powerpc/include/asm/elf.h === --- linux-2.6.orig/arch/powerpc/include/asm/elf.h

[patch 04/10] powerpc: Randomise mmap start address

2009-02-22 Thread Anton Blanchard
fffd88ac000-fffd88ad000 rw-p fffd88ac000 00:00 0 fffbc62e000-fffbc62f000 rw-p fffbc62e000 00:00 0 Signed-off-by: Anton Blanchard --- Index: linux-2.6/arch/powerpc/mm/mmap.c === --- linux-2.6.orig/arch/powerpc/mm/mmap.c 2009

[patch 03/10] powerpc: Rearrange mmap.c

2009-02-22 Thread Anton Blanchard
Rearrange mmap.c to better match the x86 version. Signed-off-by: Anton Blanchard --- Index: linux-2.6/arch/powerpc/mm/mmap.c === --- linux-2.6.orig/arch/powerpc/mm/mmap.c 2009-02-20 13:40:26.0 +1100 +++ linux-2.6

[patch 06/10] powerpc: Randomise lower bits of stack address

2009-02-22 Thread Anton Blanchard
re: 80 80 80 80 80 after: 610 490 300 6b0 d80 Signed-off-by: Anton Blanchard --- Index: linux-2.6/arch/powerpc/include/asm/system.h === --- linux-2.6.orig/arch/powerpc/include/asm/system.h2009-02-20 13:39:05.0 +1100

[patch 00/10] PowerPC address space randomisation

2009-02-22 Thread Anton Blanchard
The following set of patches adds randomisation of mmaps, heap and position independent executables, and increases the randomisation applied to the stack on 64bit binaries. -- ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mail

[patch 08/10] powerpc: Ensure random space between stack and mmaps

2009-02-22 Thread Anton Blanchard
: Anton Blanchard --- Index: linux-2.6/arch/powerpc/mm/mmap.c === --- linux-2.6.orig/arch/powerpc/mm/mmap.c 2009-02-22 11:58:54.0 +1100 +++ linux-2.6/arch/powerpc/mm/mmap.c2009-02-22 12:05:01.0 +1100 @@ -46,6

[patch 02/10] powerpc: Use new layout for 64bit binaries

2009-02-22 Thread Anton Blanchard
.9.so 7ffc000-7fff000 rw-p 00028000 08:06 130663 /lib64/ld-2.9.so 7fff000-800 rw-p 7fff000 00:00 0 fc59000-fc6e000 rw-p ffeb000 00:00 0 [stack] Signed-off-by: Anton Blanchard --- Index: linux-2.6/arch/powerpc/mm/m

[patch 05/10] powerpc: More stack randomisation for 64bit binaries

2009-02-22 Thread Anton Blanchard
000 rw-p ffeb000 00:00 0 [stack] fffc719d000-fffc71b2000 rw-p ffeb000 00:00 0 [stack] fffe01af000-fffe01c4000 rw-p ffeb000 00:00 0 [stack] Signed-off-by: Anton Blanchard --- Index: linux-2.6/arch/powerpc/include/a

[PATCH] Enable hashdist by default on 64bit NUMA

2009-02-26 Thread Anton Blanchard
enable it via CONFIG_64BIT. Signed-off-by: Anton Blanchard --- diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 95837bf..0c4d4b7 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h @@ -144,10 +144,10 @@ extern void *alloc_large_system_hash(const char *tablena

powerpc: Enable relay in pseries_defconfig

2009-03-31 Thread Anton Blanchard
Enable relay in pseries config, ppc64_defconfig had it enabled but pseries did not. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index 61b1008..f1889ab 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b

powerpc: Fix ibm,client-architecture comment

2009-03-31 Thread Anton Blanchard
We specify a 64MB RMO, but the comment says 128MB. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 7f1b33d..ddd9561 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -614,7 +614,7

powerpc: Scan for all events in rtasd

2009-03-31 Thread Anton Blanchard
Instead of checking for known events, pass in all 1s so we handle future event types. We were currently missing the IO event type. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h index 0aa0315..01c1233 100644 --- a/arch/powerpc

powerpc: Add dispatch diversion statistics

2009-03-31 Thread Anton Blanchard
PHYP tells us how often a shared processor dispatch changed physical cpus. This can highlight performance problems caused by the hypervisor. Signed-off-by: Anton Blanchard --- Index: linux-2.6/arch/powerpc/include/asm/lppaca.h

[PATCH] powerpc/pseries: Fix xics interrupt affinity

2010-01-04 Thread Anton Blanchard
Commit 57b150cce8e004ddd36330490a68bfb59b7271e9 (irq: only update affinity if ->set_affinity() is sucessfull) broke xics irq affinity. We need to use the cpumask passed in, instead of accessing ->affinity directly. Signed-off-by: Anton Blanchard --- This code needs a rework and a conv

[patch 1/6] powerpc: cpumask_of_node() should handle -1 as a node

2010-01-05 Thread Anton Blanchard
/:00:01.0/local_cpulist 64-65 Change cpumask_of_node to check for -1 and return cpu_all_mask in this case: # cat /sys/devices/pci:00/:00:01.0/local_cpus ,,, # cat /sys/devices/pci:00/:00:01.0/local_cpulist 0-127 Signed-off-by: Anton Blanchard

[PATCH]: powerpc: Fix build breakage due to incorrect location of autoconf.h

2010-01-11 Thread Anton Blanchard
commit ac4c2a3bbe5db5fc570b1d0ee1e474db7cb22585 (zlib: optimize inffast when copying direct from output) referenced include/linux/autoconf.h which is now called include/generated/autoconf.h. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/boot/Makefile

[PATCH] powerpc: Mark some variables in the page fault path __read_mostly

2010-01-12 Thread Anton Blanchard
Using perf to trace L1 dcache misses and dumping data addresses I found a few variables taking a lot of misses. Since they are almost never written, they should go into the __read_mostly section. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/xmon/xmon.c

[PATCH] powerpc: Reduce footprint of irq_stat

2010-01-12 Thread Anton Blanchard
8767938 2944132 1636796 13348866 cbb002 vmlinux.baseline 8767779 2944260 1505724 13217763 c9afe3 vmlinux.irq_cpustat A saving of around 128kB. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/include/asm/hardirq.h

[PATCH] powerpc: Reduce footprint of xics_ipi_struct

2010-01-12 Thread Anton Blanchard
NR_CPUS=1024, this saves quite a lot of memory: textdata bss dec hexfilename 8767779 2944260 1505724 13217763 c9afe3 vmlinux.irq_cpustat 8767555 2813444 1505724 13086723 c7b003 vmlinux.xics A saving of around 128kB. Signed-off-by: Anton Blanchard --- Index

[PATCH] powerpc: Replace per_cpu(, smp_processor_id()) with __get_cpu_var()

2010-01-13 Thread Anton Blanchard
The cputime code has a few places that do per_cpu(, smp_processor_id()). Replace them with __get_cpu_var(). Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/include/asm/cputime.h === --- linux-cpumask.orig/arch

[PATCH 2/5] powerpc: Remove whitespace in irq chip name fields

2010-01-31 Thread Anton Blanchard
Now we use printf style alignment there is no need to manually space these fields. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c === --- linux-cpumask.orig/arch/powerpc

[PATCH 1/5] powerpc: Rework /proc/interrupts

2010-01-31 Thread Anton Blanchard
. On PowerPC we currently omit an interrupt completely if there is no active handler, whereas on x86 it is printed if there is a non zero count. The x86 code also spaces the first column correctly based on nr_irqs. Signed-off-by: Anton Blanchard --- This patch follows on from "powerpc: R

[PATCH 4/5] powerpc: Convert global "BAD" interrupt to per cpu spurious

2010-01-31 Thread Anton Blanchard
spurious. Since they can be a significant cause of OS jitter, we may as well log them per cpu so we know where they are occurring. Signed-off-by: Anton Blanchard --- Again, the short name matches x86 but if people are sufficiently confused by it ("SPU"), then we can think up something el

[PATCH 3/5] powerpc: Add timer, performance monitor and machine check counts to /proc/interrupts

2010-01-31 Thread Anton Blanchard
using the perf tool. Since it's possible to take a completely handled machine check on a System p box it also sounds like a good idea to keep a machine check summary. The event naming matches x86 to keep gratuitous differences to a minimum. Signed-off-by: Anton Blanchard --- If people really

[PATCH 5/5] powerpc: Increase NR_IRQS Kconfig maximum to 32768

2010-01-31 Thread Anton Blanchard
0 0 0 0 17158:319 0 0 0 0 0 25092: 0 0 0 0 0 0 Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/Kc

Re: [PATCH] powerpc: Reduce footprint of irq_stat

2010-01-31 Thread Anton Blanchard
Hi, > > +static inline void ack_bad_irq(unsigned int irq) > > +{ > > + printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq); > > +} > > Looks like some unrelated gunk slipped into this patch :-) We need that to link :) kernel/irq/handle.c: In function ‘handle_bad_irq’: kernel/irq/h

Re: [PATCH] powerpc: Reduce footprint of xics_ipi_struct

2010-01-31 Thread Anton Blanchard
Hi, > > +#if defined(CONFIG_XICS) && defined(CONFIG_SMP) > > + unsigned long xics_ipi; > > +#endif > > } cacheline_aligned irq_cpustat_t; > > This is still a gross abuse of irq_cpustat_t ... Can't we do > a separate DECLARE_PER_CPU_SHARED_ALIGNED(unsigned long, xics_ipi) > inside xics.c i

[PATCH 1/7] powerpc: Reduce footprint of irq_stat

2010-01-31 Thread Anton Blanchard
8767938 2944132 1636796 13348866 cbb002 vmlinux.baseline 8767779 2944260 1505724 13217763 c9afe3 vmlinux.irq_cpustat A saving of around 128kB. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/include/asm/hardirq.h

[PATCH 5/7] powerpc: Add timer, performance monitor and machine check counts to /proc/interrupts

2010-01-31 Thread Anton Blanchard
using the perf tool. Since it's possible to take a completely handled machine check on a System p box it also sounds like a good idea to keep a machine check summary. The event naming matches x86 to keep gratuitous differences to a minimum. Signed-off-by: Anton Blanchard --- If people really

[PATCH 2/7] powerpc: Reduce footprint of xics_ipi_struct

2010-01-31 Thread Anton Blanchard
dec hexfilename 8767779 2944260 1505724 13217763 c9afe3 vmlinux.irq_cpustat 8767555 2813444 1505724 13086723 c7b003 vmlinux.xics A saving of around 128kB. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/platforms/pseries/xics.c

[PATCH 6/7] powerpc: Convert global "BAD" interrupt to per cpu spurious

2010-01-31 Thread Anton Blanchard
spurious. Since they can be a significant cause of OS jitter, we may as well log them per cpu so we know where they are occurring. Signed-off-by: Anton Blanchard --- Again, the short name matches x86 but if people are sufficiently confused by it ("SPU"), then we can think up something el

[PATCH 3/7] powerpc: Rework /proc/interrupts

2010-01-31 Thread Anton Blanchard
. On PowerPC we currently omit an interrupt completely if there is no active handler, whereas on x86 it is printed if there is a non zero count. The x86 code also spaces the first column correctly based on nr_irqs. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/kernel/irq.c

[PATCH 7/7] powerpc: Increase NR_IRQS Kconfig maximum to 32768

2010-01-31 Thread Anton Blanchard
0 0 0 0 17158:319 0 0 0 0 0 25092: 0 0 0 0 0 0 Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/Kc

[PATCH 4/7] powerpc: Remove whitespace in irq chip name fields

2010-01-31 Thread Anton Blanchard
Now we use printf style alignment there is no need to manually space these fields. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c === --- linux-cpumask.orig/arch/powerpc

Re: Stack size protection broken on ppc64

2010-02-05 Thread Anton Blanchard
Hi, > On recent ppc64 kernels, limiting the stack (using 'ulimit -s blah') is > now more restrictive than it was before. On 2.6.31 with 4k pages I > could run 'ulimit -s 16; /usr/bin/test' without a problem. Now with > mainline, even 'ulimit -s 64; /usr/bin/test' gets killed. > > Using 64k pag

powerpc: Reduce differences between pseries and ppc64 defconfigs

2010-02-07 Thread Anton Blanchard
-by: Anton Blanchard --- v2: Enable NUMA on ppc64_defconfig Index: powerpc.git/arch/powerpc/configs/ppc64_defconfig === --- powerpc.git.orig/arch/powerpc/configs/ppc64_defconfig 2010-02-05 14:57:48.889717208 +1100

[PATCH] powerpc: Convert mmu context allocator from idr to ida

2010-02-07 Thread Anton Blanchard
We can use the much more lightweight ida allocator since we don't need the pointer storage idr provides. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/mm/mmu_context_hash64.c === --- powerpc.git.orig

[PATCH] powerpc: Only print clockevent settings once

2010-02-07 Thread Anton Blanchard
The clockevent multiplier and shift is useful information, but we only need to print it once. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/kernel/time.c === --- powerpc.git.orig/arch/powerpc/kernel/time.c

powerpc: Make powerpc_firmware_features __read_mostly

2010-02-07 Thread Anton Blanchard
We use firmware_has_feature quite a lot these days, so it's worth putting powerpc_firmware_features into __read_mostly. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/kernel/firmware.c === --- powerpc.git

[PATCH] powerpc: reformat SD_NODE_INIT to match x86

2010-02-07 Thread Anton Blanchard
Clean up SD_NODE_INITS so we can easily compare it to x86. Similar to the work in 47734f89be0614b5acbd6a532390f9c72f019648 (sched: Clean up topology.h) Signed-off-by: Anton Blanchard --- Index: linux.trees.git/arch/powerpc/include/asm/topology.h

[PATCH] powerpc: Quieten cede latency printk

2010-02-07 Thread Anton Blanchard
The cede latency stuff is relatively new and we don't need to complain about it not working on older firmware. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/platforms/pseries/hotplug-

Re: Stack size protection broken on ppc64

2010-02-07 Thread Anton Blanchard
o 64kB) so it operates better with > 4kB pages. But in the end its probably of little use for the default OVERCOMMIT_GUESS setting, so the main thing is we dont terminate processes incorrectly. Acked-by: Anton Blanchard Anton ___ Linuxppc-dev mai

[PATCH] powerpc: Add last sysfs file and dump of ftrace buffer to oops printout

2010-02-07 Thread Anton Blanchard
) | .vprintk() { 0) 0.488 us|._raw_spin_lock(); 0) 0.572 us|.emit_log_char(); Showing the function graph of a sysrq-c crash. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/kernel/traps.c

Re: [PATCH] Restrict stack space reservation to rlimit

2010-02-07 Thread Anton Blanchard
Hi, > Why do we need page size independent stack size? It seems to have > compatibility breaking risk. I don't think so. The current behaviour is clearly wrong, we dont need a 16x larger stack just because you went from a 4kB to a 64kB base page size. The user application stack usage is the sam

Re: [PATCH] powerpc: Only print clockevent settings once

2010-02-07 Thread Anton Blanchard
Hi Wolfram, > What about printk_once from kernel.h? Thanks for the suggestion! Anton -- The clockevent multiplier and shift is useful information, but we only need to print it once. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/kernel/tim

Re: [PATCH] Restrict stack space reservation to rlimit

2010-02-07 Thread Anton Blanchard
Hi, > I didn't discuss which behavior is better. Michael said he want to apply > his patch to 2.6.32 & 2.6.33. stable tree never accept the breaking > compatibility patch. > > Your answer doesn't explain why can't we wait it until next merge window. > > > btw, personally, I like page size inde

[PATCH] Clear MSR_RI during RTAS calls

2010-02-07 Thread Anton Blanchard
RTAS should never cause an exception but if it does (for example accessing outside our RMO) then we might go a long way through the kernel before oopsing. If we unset MSR_RI we should at least stop things on exception exit. Signed-off-by: Anton Blanchard --- The setting of MSR_RI during RTAS

Re: [PATCH] Clear MSR_RI during RTAS calls

2010-02-07 Thread Anton Blanchard
> The setting of MSR_RI during RTAS calls went in ages ago (2003), and I'm > not sure why. Clearly an exception inside RTAS is fatal since we most likely > have a bad r13. I wrote the r13 comment without thinking :) Regardless I think we want to catch any RTAS exception ASAP. Anton ___

[PATCH] powerpc: Use lwarx hint bit in spinlocks

2010-02-09 Thread Anton Blanchard
| |--36.64%-- .futex_wait_setup which is a good test for this patch. The results (in lock/unlock operations per second) are: before: 1538203 ops/sec after: 2189219 ops/sec An improvement of 42% Signed-off-by: Anton Blanchard --- We've had issues in the past with chips that do the wrong thi

[PATCH 1/6] powerpc: Use lwarx hint in spinlocks

2010-02-10 Thread Anton Blanchard
futex_wait_setup Which is a good test for this patch. The results (in lock/unlock operations per second) are: before: 1538203 ops/sec after: 2189219 ops/sec An improvement of 42% A 32 core POWER7 improves even more: before: 1279529 ops/sec after: 2282076 ops/sec An improvement of 78% Sign

[PATCH 3/6] powerpc: Convert open coded native hashtable bit lock

2010-02-10 Thread Anton Blanchard
Now we have real bit locks use them instead of open coding it. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c index 056d23a..9e1aa4f 100644 --- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c

[PATCH 2/6] powerpc: Use lwarx/ldarx hint in bit locks

2010-02-10 Thread Anton Blanchard
This patch implements the lwarx/ldarx hint bit for bit locks. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/include/asm/asm-compat.h === --- powerpc.git.orig/arch/powerpc/include/asm/asm-compat.h 2010-02

[PATCH 5/6] powerpc: Fix lwsync patching code on 64bit

2010-02-10 Thread Anton Blanchard
do_lwsync_fixups doesn't work on 64bit, we end up writing lwsyncs to the wrong addresses: 0:mon> di c001000bfacc c001000bfacc 7c2004ac lwsync Since the lwsync section has negative offsets we need to use a signed int pointer so we sign extend the value. Signed-off-b

[PATCH 4/6] powerpc: Rename LWSYNC_ON_SMP to PPC_RELEASE_BARRIER, ISYNC_ON_SMP to PPC_ACQUIRE_BARRIER

2010-02-10 Thread Anton Blanchard
For performance reasons we are about to change ISYNC_ON_SMP to sometimes be lwsync. Now that the macro name doesn't make sense, change it and LWSYNC_ON_SMP to better explain what the barriers are doing. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/include/asm/ato

[PATCH 6/6] powerpc: Use lwsync for acquire barrier if CPU supports it

2010-02-10 Thread Anton Blanchard
t the instruction. We were marking POWER3 and RS64 as lwsync capable but in reality they treat it as a full sync (ie slow). Remove the CPU_FTR_LWSYNC bit from these CPUs so they continue to use the faster isync method. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/include/asm/sy

[PATCH] powerpc: Improve 64bit copy_tofrom_user

2010-02-10 Thread Anton Blanchard
read(fd, buf, BUFSIZE, 0) != BUFSIZE) { perror("pread"); exit(1); } } unlink(tmpfile); return 0; } Signed-off-by: Anton Blanchard --- Ind

[PATCH] powerpc: pair loads and stores in copy_4k_page

2010-02-10 Thread Anton Blanchard
(after.tv_sec - before.tv_sec) * NSEC_PER_SEC + (after.tv_nsec - before.tv_nsec)); return 0; } static void __exit copypage_exit(void) { } module_init(copypage_init) module_exit(copypage_exit) MODULE_LICENSE("GPL"); MODULE_AUTHOR("Anton Blanchard");

[PATCH] powerpc: Don't clear larx reservation on system call exit

2010-02-14 Thread Anton Blanchard
test is the private futex wake system call and that improves 5%. This is a decent speedup on an important system call for threaded applications. Signed-off-by: Anton Blanchard --- If my previous patches didn't worry you then this one is sure to. Getting this wrong will make someone&#

Re: [PATCH] powerpc: Don't clear larx reservation on system call exit

2010-02-14 Thread Anton Blanchard
Hi Ben, > Well, the main issue here is leaking kernel reservations into userspace, > and thus the question of whether it is a big deal or not. There's also > an issue I can see with signals. > > The risk with kernel reservations leaking into userspace is a problem on > some processors that do n

Re: [PATCH 1/6] powerpc: Use lwarx hint in spinlocks

2010-02-17 Thread Anton Blanchard
Hi Nick, > Cool. How does it go when there are significant amount of instructions > between the lock and the unlock? A real(ish) workload, like dbench on > ramdisk (which should hit the dcache lock). Good question, I'll see if we can see a difference on dbench. Anton __

Re: [PATCH 6/6] powerpc: Use lwsync for acquire barrier if CPU supports it

2010-02-17 Thread Anton Blanchard
Hi Nick, > Ah, good to see this one come back. I also tested tbench over localhost > btw which actually did show some speedup on the G5. > > BTW. this was the last thing left: > http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg29738.html > > Don't know if you took a look at that a

[PATCH] powerpc: Call ibm,os-term if the ibm,extended-os-term is present

2010-02-18 Thread Anton Blanchard
igure-kernel-dump call." This patch checks for the ibm,extended-os-term property and calls ibm,os-term if it exists. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/kernel/rtas.c === --- linux-cpumask.orig/ar

[PATCH] powerpc: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim

2010-02-18 Thread Anton Blanchard
ode. The patch below sets a smaller value for RECLAIM_DISTANCE and thus enables zone reclaim. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/include/asm/topology.h === --- powerpc.git.orig/arch/powerpc/include/

Re: [PATCH] powerpc: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim

2010-02-18 Thread Anton Blanchard
Hi, > The patch below sets a smaller value for RECLAIM_DISTANCE and thus enables > zone reclaim. FYI even with this enabled I could trip it up pretty easily with a multi threaded application. I tried running stream across all threads in node 0. The machine looks like: node 0 cpus: 0 1 2 3 4 5 6

Re: [PATCH] powerpc: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim

2010-02-22 Thread Anton Blanchard
Hi Balbir, > A reclaim distance of 10 implies a ratio of 1, that means we'll always > do zone_reclaim() to free page cache and slab cache before moving on > to another node? I want to make an effort to reclaim local pagecache before ever going off node. As an example, a completely off node stre

Re: [PATCH] powerpc: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim

2010-02-22 Thread Anton Blanchard
Hi Mel, > You're pretty much on the button here. Only one thread at a time enters > zone_reclaim. The others back off and try the next zone in the zonelist > instead. I'm not sure what the original intention was but most likely it > was to prevent too many parallel reclaimers in the same zone po

powerpc: bump SECTION_SIZE_BITS from 16MB to 256MB

2010-02-25 Thread Anton Blanchard
/0xd4 I assume there are some O(n^2) issues in sysfs as we add all the memory nodes. Bumping SECTION_SIZE_BITS to 256 MB drops the time to about 10 seconds and results in a much smaller /sys. Signed-off-by: Anton Blanchard --- --- linux-2.6.33/arch/powerpc/include/asm/sparsemem.h~ 2010-02-2

Re: [PATCH] powerpc/85xx: Make sure lwarx hint isn't set on ppc32

2010-03-13 Thread Anton Blanchard
Hi, > e500v1/v2 based chips will treat any reserved field being set in an > opcode as illegal. Thus always setting the hint in the opcode is > a bad idea. > > Anton should be kept away from the powerpc opcode map. Nasty bug! I promise never to touch the opcode map again :)

hvc_console breakage

2010-03-20 Thread Anton Blanchard
Hi, I haven't tracked down why, but e74d098c66543d0731de62eb747ccd5b636a6f4c (hvc_console: Fix race between hvc_close and hvc_remove) is causing my PowerPC box to hang during boot, right when init starts. Anton ___ Linuxppc-dev mailing list Linuxppc-de

ppc64 sys_ipc breakage in 2.6.34-rc2

2010-03-21 Thread Anton Blanchard
). Signed-off-by: Anton Blanchard -- I assume the function prototypes for the other IPC methods would cause us to sign or zero extend second where appropriate (avoiding any security issues). Come to think of it, the syscall wrappers for each method should do that for us as well. diff --git a/ipc

Re: ppc64 sys_ipc breakage in 2.6.34-rc2

2010-03-22 Thread Anton Blanchard
Hi, > > ipc/syscall.c:17: error: conflicting types for ‘sys_ipc’ > > include/linux/syscalls.h:691: note: previous declaration of ‘sys_ipc’ was > > here > > Hmm. Right you are. Why don't I see this? (I already applied the patch) > > Ahh. Because this only triggers with __ARCH_WANT_SYS_IPC. But

Re: [PATCH 4/7] hvc_console: Fix race between hvc_close and hvc_remove

2010-03-25 Thread Anton Blanchard
Hi, > And this suggests that hvc_kick() is called before hvc_task is > initialised, ie, before hvc_init() is called. > > Does this help? Looks good, tests OK on my POWER5 box. Thanks! Tested-by: Anton Blanchard > diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_co

Re: [PATCH 4/7] hvc_console: Fix race between hvc_close and hvc_remove

2010-04-06 Thread Anton Blanchard
; Since the outside kref get/put balance we only do a single kref_put when count reaches 0. The patch below changes things to call tty_kref_put once for every hvc_close call, and with that my machine boots fine. Signed-off-by: Anton Blanchard --- diff --git a/drivers/char/hvc_console.c b/driv

[PATCH] powerpc: Add form 1 NUMA affinity

2010-04-07 Thread Anton Blanchard
the client architecture, and if we see "1" in the ibm,associativity-form property firmware supports form 1 affinity and we should look at the first field in the ibm,associativity-reference-points array. If not we use the second field as we always have. Signed-off-by: Anton Blanchard

[patch 00/15] PowerPC cpumask patches

2010-04-26 Thread Anton Blanchard
This is a first attempt at converting PowerPC across to the new cpumask API. I need to audit the GFP_ flags of alloc_cpumask_var. There are also a few areas still to be done: cell, xmon, kexec, crashdump and the cputhreads code Anton ___ Linuxppc-dev

[patch 01/15] powerpc: cpumask: Use cpu_online_mask

2010-04-26 Thread Anton Blanchard
Change &cpu_online_map to cpu_online_mask. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/platforms/pasemi/cpufreq.c === --- linux-cpumask.orig/arch/powerpc/platforms/pasemi/cpufreq.c 2010-04-08 1

[patch 02/15] powerpc: cpumask: Convert rtasd to new cpumask API

2010-04-26 Thread Anton Blanchard
Use cpumask_first, cpumask_next in rtasd code. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/kernel/rtasd.c === --- linux-cpumask.orig/arch/powerpc/kernel/rtasd.c 2010-04-08 19:46:04.419206665 +1000

[patch 03/15] powerpc: cpumask: Convert smp_cpus_done to new cpumask API

2010-04-26 Thread Anton Blanchard
Use the new cpumask_* functions and dynamically allocate the cpumask in smp_cpus_done. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/kernel/smp.c === --- linux-cpumask.orig/arch/powerpc/kernel/smp.c

[patch 04/15] powerpc: cpumask: Convert fixup_irqs to new cpumask API

2010-04-26 Thread Anton Blanchard
Use new cpumask_* functions, and dynamically allocate cpumask in fixup_irqs. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/kernel/irq.c === --- linux-cpumask.orig/arch/powerpc/kernel/irq.c2010-04-08

[patch 05/15] powerpc: cpumask: Convert iseries SMP code to new cpumask API

2010-04-26 Thread Anton Blanchard
Use new cpumask functions in iseries SMP startup code. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/platforms/iseries/smp.c === --- linux-cpumask.orig/arch/powerpc/platforms/iseries/smp.c 2010-04-08 19

[patch 06/15] powerpc: cpumask: Convert pseries SMP code to new cpumask API

2010-04-26 Thread Anton Blanchard
Use new cpumask functions in pseries SMP startup code. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/platforms/pseries/smp.c === --- linux-cpumask.orig/arch/powerpc/platforms/pseries/smp.c 2010-04-08 19

[patch 07/15] powerpc: cpumask: Convert xics driver to new cpumask API

2010-04-26 Thread Anton Blanchard
Use the new cpumask API and add some comments to clarify how get_irq_server works. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/platforms/pseries/xics.c === --- linux-cpumask.orig/arch/powerpc/platforms

[patch 08/15] powerpc: cpumask: Refactor /proc/cpuinfo code

2010-04-26 Thread Anton Blanchard
This separates the per cpu output from the summary output at the end of the file, making it easier to convert to the new cpumask API in a subsequent patch. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/kernel/setup-common.c

[patch 09/15] powerpc: cpumask: Convert /proc/cpuinfo to new cpumask API

2010-04-26 Thread Anton Blanchard
Use new cpumask API in /proc/cpuinfo code. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/kernel/setup-common.c === --- linux-cpumask.orig/arch/powerpc/kernel/setup-common.c 2010-04-22 13:03

[patch 10/15] powerpc: cpumask: Dynamically allocate cpu_sibling_map and cpu_core_map cpumasks

2010-04-26 Thread Anton Blanchard
lable (smp_prepare_cpus), similar to x86. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/include/asm/smp.h === --- linux-cpumask.orig/arch/powerpc/include/asm/smp.h 2010-04-22 13:03:14.635445670 +1000 +++ linux-cpumask

[patch 11/15] powerpc: cpumask: Convert hotplug-cpu code to new cpumask API

2010-04-26 Thread Anton Blanchard
Convert hotplug-cpu code to new cpumask API. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/platforms/pseries/hotplug-cpu.c === --- linux-cpumask.orig/arch/powerpc/platforms/pseries/hotplug-cpu.c 2010-04

[patch 12/15] powerpc: cpumask: Convert NUMA code to new cpumask API

2010-04-26 Thread Anton Blanchard
Convert NUMA code to new cpumask API. We shift the node to cpumask setup code until after we complete bootmem allocation so we can dynamically allocate the cpumasks. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/include/asm/mmzone.h

[patch 13/15] powerpc: cpumask: Update some comments

2010-04-26 Thread Anton Blanchard
Since the *_map cpumask variants are deprecated, change the comments to instead refer to *_mask. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/kernel/setup-common.c === --- linux-cpumask.orig/arch/powerpc

[patch 14/15] powerpc: cpumask: Convert mpic driver to new cpumask API

2010-04-26 Thread Anton Blanchard
to take a cpumask. This allows us to clean up the mess in smp_mpic_message_pass. Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/sysdev/mpic.c === --- linux-cpumask.orig/arch/powerpc/sysdev/mpic.c 2010-04-22

[patch 15/15] powerpc: cpumask: Add DEBUG_PER_CPU_MAPS option

2010-04-26 Thread Anton Blanchard
Enable the DEBUG_PER_CPU_MAPS option so we can look for problems with cpumasks . Signed-off-by: Anton Blanchard --- Index: linux-cpumask/arch/powerpc/Kconfig.debug === --- linux-cpumask.orig/arch/powerpc/Kconfig.debug 2010-04

PowerPC ftrace function trace optimisation

2010-04-28 Thread Anton Blanchard
Hi, Alan Modra pointed out that he added an option to PowerPC gcc years ago specifically for us to do lightweight mcount profiling. The normal PowerPC gcc mcount stuff forces a stack spill and gets itself tangled up in the function prolog, making it impossible to nop out easily: # gcc -pg: 000

[PATCH 1/3] powerpc: Set a smaller value for RECLAIM_DISTANCE to enable zone reclaim

2010-04-29 Thread Anton Blanchard
ode. The patch below sets a smaller value for RECLAIM_DISTANCE and thus enables zone reclaim. Signed-off-by: Anton Blanchard --- Index: powerpc.git/arch/powerpc/include/asm/topology.h === --- powerpc.git.orig/arch/powerpc/include/

[PATCH 2/3] powerpc: Add form 1 NUMA affinity

2010-04-29 Thread Anton Blanchard
the client architecture, and if we see "1" in the ibm,associativity-form property firmware supports form 1 affinity and we should look at the first field in the ibm,associativity-reference-points array. If not we use the second field as we always have. Signed-off-by: Anton Blanchard

<    4   5   6   7   8   9   10   11   12   13   >