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

2009-09-15 Thread Balbir Singh
* Peter Zijlstra [2009-09-15 14:11:41]: > 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.

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 Balbir Singh
able BIOS with recovery BIOS built in, can't we just print out a big far warning, asking users of such systems to go back to their vendors and ask for updates or find the updates and apply them? Does the OS have to do the heavy lifting and allow users to live with buggy BIOS's. When y

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 Balbir Singh
* Vaidy [2009-10-07 16:56:48]: > * Peter Zijlstra [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 needs this. > > > > Right, so can't we ditch

Re: [v8 PATCH 0/8]: cpuidle: Cleanup cpuidle/ Introduce cpuidle to POWER

2009-10-12 Thread Balbir Singh
* Arun R B [2009-10-08 15:18:28]: > Hi > > Please consider this for inclusion into the testing tree. > > This patchset introduces cpuidle infrastructure to POWER, prototyping > for pSeries, and also does a major refactoring of current x86 idle > power management and a cleanup of cpuidle infrast

Re: [v8 PATCH 1/8]: cpuidle: cleanup drivers/cpuidle/cpuidle.c

2009-10-12 Thread Balbir Singh
* Arun R B [2009-10-08 15:19:42]: > * Arun R Bharadwaj [2009-10-08 15:18:28]: > > This patch cleans up drivers/cpuidle/cpuidle.c > Earlier cpuidle assumed pm_idle as the default idle loop. Break that > assumption and make it more generic. cpuidle_idle_call() which is the > main idle loop of cpu

Re: [PATCH] powerpc: Quieten cede latency printk

2010-02-08 Thread Balbir Singh
On Mon, Feb 8, 2010 at 5:22 AM, Anton Blanchard wrote: > > 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 Acked-by: Balbir Singh Seems like a reasonable change. CC'

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

2010-02-19 Thread Balbir Singh
limited to avoid tossing too many page cache pages. > That is interesting, I always thought it was to try and free page cache first. For example with zone->min_unmapped_pages, if zone_pagecache_reclaimable is greater than unmapped pages, we start reclaim the cached pages first. The min_unmapp

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

2010-02-19 Thread Balbir Singh
s we'll always do zone_reclaim() to free page cache and slab cache before moving on to another node? Balbir Singh. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2010-02-19 Thread Balbir Singh
* Christoph Lameter [2010-02-19 09:51:12]: > On Fri, 19 Feb 2010, Balbir Singh wrote: > > > >> 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 >

Re: [BUGFIX][PATCH] memcg: avoid use cmpxchg in swap cgroup maintainance (Was Re: 34-rc1-git3 build failure with CGROUP_MEM_RES_CTLR_SWAP=y

2010-03-14 Thread Balbir Singh
xchg and xchg. > Then, we should use spinlock rather than that. > > How about this ? Nishimura-san, could you consider something better ? > We need a quick fix. > Looks good to me Acked-by: Balbir Singh -- Three Cheers, Balbir ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 0/8] De-couple sysfs memory directories from memory sections

2010-09-23 Thread Balbir Singh
* Nathan Fontenot [2010-09-22 09:15:43]: > This set of patches decouples the concept that a single memory > section corresponds to a single directory in > /sys/devices/system/memory/. On systems > with large amounts of memory (1+ TB) there are performance issues > related to creating the large

Re: [PATCH 0/3] cpu: idle state framework for offline CPUs.

2009-08-16 Thread Balbir Singh
* Dipankar Sarma [2009-08-16 23:56:29]: > On Fri, Aug 14, 2009 at 01:30:21PM +0200, Pavel Machek wrote: > > > > > > It depends on the hypervisor implementation. On pseries (powerpc) > > > hypervisor, for example, they are different. By offlining a vcpu > > > (and in turn shutting a cpu), you wil

Build breakage on powerpc with 2.6.24-rc6-mm1

2007-12-23 Thread Balbir Singh
/net] Error 2 make: *** [drivers] Error 2 Here's a patch, compile tested to fix the compilation problem Remove unused variable rc and fix a typo, veth_port_type was called veth_port_typeq Signed-off-by: Balbir Singh <[EMAIL PROTECTED]> --- drivers/net/iseries_veth.c |4 ++-- 1 f

SCSI errors on powerpc with 2.6.24-rc6-mm1

2007-12-23 Thread Balbir Singh
0 -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: SCSI errors on powerpc with 2.6.24-rc6-mm1

2007-12-26 Thread Balbir Singh
FUJITA Tomonori wrote: > On Mon, 24 Dec 2007 10:18:50 +0530 > Balbir Singh <[EMAIL PROTECTED]> wrote: > [snip] > > I might break the IOMMU code. Can you reproduce it easily? If so, > reverting my IOMMU patches (I've attached a patch to revert them) fix > the pr

Re: SCSI errors on powerpc with 2.6.24-rc6-mm1

2007-12-26 Thread Balbir Singh
FUJITA Tomonori wrote: > On Thu, 27 Dec 2007 10:08:25 +0530 > Balbir Singh <[EMAIL PROTECTED]> wrote: > >> FUJITA Tomonori wrote: >>> On Mon, 24 Dec 2007 10:18:50 +0530 >>> Balbir Singh <[EMAIL PROTECTED]> wrote: >>> >> [snip] >>

Re: SCSI errors on powerpc with 2.6.24-rc6-mm1

2007-12-27 Thread Balbir Singh
); > if (index != -1) { > - index = (index + align_mask) & ~align_mask; > if (is_span_boundary(index, nr, shift, boundary_size)) { > /* we could do more effectively */ > start = index + 1; Th

Re: SCSI errors on powerpc with 2.6.24-rc6-mm1

2007-12-31 Thread Balbir Singh
FUJITA Tomonori wrote: > > Oops, it's for -mm. > Hi, I just tested this patch and it works fine for me so far. Tested-by: Balbir Singh <[EMAIL PROTECTED]> -- Warm Regards, Balbir Singh Linux Technology Cent

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-18 Thread Balbir Singh
* Michael Ellerman <[EMAIL PROTECTED]> [2008-01-18 16:44:58]: > On Fri, 2008-01-18 at 16:34 +1100, Michael Ellerman wrote: > > On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote: > > > Changelog > > > > > > 1. Get rid

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-18 Thread Balbir Singh
* Michael Ellerman <[EMAIL PROTECTED]> [2008-01-18 16:55:03]: > On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote: > > Here's a dumb simple implementation of fake NUMA nodes for PowerPC. Fake > > NUMA nodes can be specified using the following command line option >

Re: 2.6.24-rc8-mm1 Kernel oops will running kernbench

2008-01-18 Thread Balbir Singh
it-powerpc.patch out of the series and try reproducing the oops. > Kamalesh, I thought I saw Paul's request for trying without git-powerpc.patch (it's in a separate email). -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-18 Thread Balbir Singh
* Michael Ellerman <[EMAIL PROTECTED]> [2008-01-18 16:34:53]: > On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote: > > Changelog > > > > 1. Get rid of the constant 5 (based on comments from > > [EMAIL PROTECTED]) >

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-25 Thread Balbir Singh
ch provides a fix for the problem found by Michael Ellerman <[EMAIL PROTECTED]> while using fake NUMA nodes on a cell box. The code modifies node id iff (as in if and only if) fake NUMA nodes are created. Signed-off-by: Balbir Singh <[EMAIL PROTECTED]> --- arch/powerpc/mm/numa.c |

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-27 Thread Balbir Singh
* Paul Mackerras <[EMAIL PROTECTED]> [2008-01-27 22:55:43]: > Balbir Singh writes: > > > Here's a better and more complete fix for the problem. Could you > > please see if it works for you? I tested it on a real NUMA box and it > > seemed to work fine ther

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-28 Thread Balbir Singh
* Nish Aravamudan <[EMAIL PROTECTED]> [2008-01-27 12:22:54]: > On 1/27/08, Balbir Singh <[EMAIL PROTECTED]> wrote: > > * Paul Mackerras <[EMAIL PROTECTED]> [2008-01-27 22:55:43]: > > > > > Balbir Singh writes: > > > > > > > H

[PATCH powerpc] Fake NUMA emulation for PowerPC (Take 3)

2008-01-28 Thread Balbir Singh
* Paul Mackerras <[EMAIL PROTECTED]> [2008-01-27 22:55:43]: > Balbir Singh writes: > > > Here's a better and more complete fix for the problem. Could you > > please see if it works for you? I tested it on a real NUMA box and it > > seemed to work fine ther

Re: [PATCH powerpc] Fake NUMA emulation for PowerPC (Take 3)

2008-01-29 Thread Balbir Singh
do not inherit the earth from our ancestors, > we borrow it from our children. - S.M.A.R.T Person -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

[PATCH powerpc] Fake NUMA emulation for PowerPC (Take 4)

2008-01-31 Thread Balbir Singh
node boundaries, we need to set the new node online. Signed-off-by: Balbir Singh <[EMAIL PROTECTED]> --- arch/powerpc/mm/numa.c | 66 ++--- 1 file changed, 63 insertions(+), 3 deletions(-) diff -puN arch/powerpc/mm/numa.c~fakenumappc arch/powerpc

Build failure with 2.6.24-mm1

2008-02-04 Thread Balbir Singh
* Balbir Singh <[EMAIL PROTECTED]> [2008-02-04 15:35:09]: I just saw the following build failure on a power machine. In file included from include/acpi/platform/acenv.h:140, from include/acpi/acpi.h:54, from include/acpi/acpi_bus.h:31,

Re: [PATCH] taskstats scaled time cleanup

2007-10-24 Thread Balbir Singh
lt;[EMAIL PROTECTED]> Looks good to me Acked-by: Balbir Singh <[EMAIL PROTECTED]> -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH] Restore deterministic CPU accounting on powerpc

2007-11-03 Thread Balbir Singh
; > + } else { > + account_system_time(p, HARDIRQ_OFFSET, jiffies_to_cputime(1)); > + account_system_time_scaled(p, jiffies_to_cputime(1)); > + } > +} > +#endif > + Hi, Paul, So, scaled accounting will not be available if CONFIG_VIRT_CPU_ACCOUNTING is defined? Am

Re: [PATCH] Restore deterministic CPU accounting on powerpc

2007-11-03 Thread Balbir Singh
Paul Mackerras wrote: > Balbir Singh writes: > >> So, scaled accounting will not be available if >> CONFIG_VIRT_CPU_ACCOUNTING is defined? Am I reading this correctly > > No, what makes you think that? If VIRT_CPU_ACCOUNTING=y it is the > responsibility of the arc

Re: 2.6.24-rc1-git15 Kernel build fails on powerpc - Unrecognized opcode: `dssall'

2007-11-06 Thread Balbir Singh
On Nov 6, 2007 4:04 PM, Kamalesh Babulal <[EMAIL PROTECTED]> wrote: > Hi, > > The build fails on the power6 machine while compiling 2.6.24-rc1-git15 kernel, > with randconfig, > > CHK include/linux/compile.h > AS arch/powerpc/kernel/swsusp_32.o > arch/powerpc/kernel/swsusp_32.S: Assemb

Re: 2.6.24-rc1-git15 Kernel build fails on powerpc - Unrecognized opcode: `dssall'

2007-11-06 Thread Balbir Singh
[arch/powerpc/kernel/swsusp_32.o] Error 1 > make: *** [arch/powerpc/kernel] Error 2 > I looked at your .config and now your build. It looks like you select CONFIG_4xx (I see -Wa,-m405) and compile swsusp_32.S. The compiler/toolchain does not enable altivec instructions for CONFIG_4xx. If CONFIG_H

Re: [PATCH] fix scaled time accounting possible divide by zero

2007-11-19 Thread Balbir Singh
Michael Neuling wrote: > This fixes a problem noticed by Balbir Singh > > Signed-off-by: Michael Neuling <[EMAIL PROTECTED]> > --- > Paulus: can we send this up for 2.6.24? > > arch/powerpc/kernel/time.c |5 +++-- > 1 file changed, 3 insertions(+), 2 dele

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
David Rientjes wrote: > On Sat, 8 Dec 2007, Balbir Singh wrote: > >> Yes, they all appear on node 0. We could have tweaks to distribute CPU's >> as well. >> > > You're going to want to distribute the cpu's based on how they match up > physically

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
David Rientjes wrote: > On Sat, 8 Dec 2007, Balbir Singh wrote: > >> To be able to test the memory controller under NUMA, I use fake NUMA >> nodes. x86-64 has a similar feature, the code I have here is the >> simplest I could come up with for PowerPC. >> > >

[PATCH] Fake NUMA emulation for PowerPC (Take 2)

2007-12-07 Thread Balbir Singh
Comments are as always welcome! Signed-off-by: Balbir Singh <[EMAIL PROTECTED]> --- arch/powerpc/mm/numa.c | 59 - 1 file changed, 54 insertions(+), 5 deletions(-) diff -puN arch/powerpc/mm/numa.c~ppc-fake-numa-easy arch/powerpc/mm/numa.c ---

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Nathan Lynch wrote: > Hi Balbir- > > Balbir Singh wrote: >> >> Here's a dumb simple implementation of fake NUMA nodes for PowerPC. Fake >> NUMA nodes can be specified using the following command line option >> >> numa=fake= >> >> no

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Arnd Bergmann wrote: > On Friday 07 December 2007, Balbir Singh wrote: >> Balbir Singh wrote: >>> Geert Uytterhoeven wrote: >>>> On Sat, 8 Dec 2007, Balbir Singh wrote: >>>>> + if (strstr(p, "fake=")) >>>>> + cmdl

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Balbir Singh wrote: > Geert Uytterhoeven wrote: >> On Sat, 8 Dec 2007, Balbir Singh wrote: >>> + if (strstr(p, "fake=")) >>> + cmdline = p + 5;/* 5 is faster than strlen("fake=") */ >> Really? My gcc is smart enough to r

[PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Comments are as always welcome! Signed-off-by: Balbir Singh <[EMAIL PROTECTED]> --- arch/powerpc/mm/numa.c | 55 - 1 file changed, 50 insertions(+), 5 deletions(-) diff -puN arch/powerpc/mm/numa.c~ppc-fake-numa-easy arch/powerpc/mm/numa.c ---

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Arnd Bergmann wrote: > On Friday 07 December 2007, Balbir Singh wrote: >> Here's a dumb simple implementation of fake NUMA nodes for PowerPC. Fake >> NUMA nodes can be specified using the following command line option >> >> numa=fake= >> >> node rang

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Kumar Gala wrote: > > On Dec 7, 2007, at 4:12 PM, Balbir Singh wrote: > >> Kumar Gala wrote: >>> >>> On Dec 7, 2007, at 3:35 PM, Balbir Singh wrote: >>> >>>> Olof Johansson wrote: >>>>> Hi, >>>>> >>>

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Geert Uytterhoeven wrote: > On Sat, 8 Dec 2007, Balbir Singh wrote: >> +if (strstr(p, "fake=")) >> +cmdline = p + 5;/* 5 is faster than strlen("fake=") */ > > Really? My gcc is smart enough to replace the `strlen("fake="

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Olof Johansson wrote: > Hi, > > On Sat, Dec 08, 2007 at 02:44:25AM +0530, Balbir Singh wrote: > >> Comments are as always welcome! > > Care to explain what this is useful for? (Not saying it's a stupid idea, > just wondering what the reason for doing it is).

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Kumar Gala wrote: > > On Dec 7, 2007, at 3:35 PM, Balbir Singh wrote: > >> Olof Johansson wrote: >>> Hi, >>> >>> On Sat, Dec 08, 2007 at 02:44:25AM +0530, Balbir Singh wrote: >>> >>>> Comments are as always welcome! >>> >

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-09 Thread Balbir Singh
Pavel Machek wrote: > On Sat 2007-12-08 09:52:06, Balbir Singh wrote: >> David Rientjes wrote: >>> On Sat, 8 Dec 2007, Balbir Singh wrote: >>> >>>> To be able to test the memory controller under NUMA, I use fake NUMA >>>> nodes. x86-64

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2007-12-10 Thread Balbir Singh
Balbir Singh wrote: > Changelog > > 1. Get rid of the constant 5 (based on comments from > [EMAIL PROTECTED]) > 2. Implement suggestions from Olof Johannson > 3. Check if cmdline is NULL in fake_numa_create_new_node() > > Tested with ad

Re: Patches added to for-2.6.25 and master branches of powerpc.git

2007-12-11 Thread Balbir Singh
On Dec 11, 2007 10:59 AM, Paul Mackerras <[EMAIL PROTECTED]> wrote: [snip] Hi, Paul, Any chance we could get in "Fake NUMA nodes patch" at http://lkml.org/lkml/2007/12/7/294? Should I get it into -mm first? It was acked by Olof at http://lkml.org/lkml/2007/12/10/247. Than

Re: [PATCH 1/2] Add scaled time to taskstats based process accounting

2007-08-16 Thread Balbir Singh
t_add_tsk(struct taskstats *sta > rcu_read_unlock(); > stats->ac_utime = cputime_to_msecs(tsk->utime) * USEC_PER_MSEC; > stats->ac_stime = cputime_to_msecs(tsk->stime) * USEC_PER_MSEC; > + stats->ac_utimescaled = > + cputime_to_msecs(tsk->utimescaled) * USEC_PER_MSEC; > + stats->ac_stimescaled = > + cputime_to_msecs(tsk->stimescaled) * USEC_PER_MSEC; > stats->ac_minflt = tsk->min_flt; > stats->ac_majflt = tsk->maj_flt; > -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH 2/2] [POWERPC] Add scaled time accounting

2007-08-16 Thread Balbir Singh
include/asm-powerpc/paca.h > +++ linux-2.6-ozlabs/include/asm-powerpc/paca.h > @@ -103,6 +103,9 @@ struct paca_struct { > u64 user_time; /* accumulated usermode TB ticks */ > u64 system_time;/* accumulated system TB ticks */ > u64 startpurr; /* PURR/TB value snapshot */ > + u64 startspurr; /* SPURR value snapshot */ > + u64 purrdelta; /* FIXME: document */ > + u64 spurrdelta; /* FIXME: document */ > }; > > extern struct paca_struct paca[]; -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

Machine automagically reboots with 2.6.23-rc2-mm2

2007-08-16 Thread Balbir Singh
LIFO batch:0 HighMem zone: 0 pages, LIFO batch:0 [boot]0015 Setup Done Built 1 zonelists -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL # # Automatically generated make config: don't edit # Linux kernel version: 2.6.23-rc2-mm2 # Thu Aug 1

Re: Machine automagically reboots with 2.6.23-rc2-mm2

2007-08-16 Thread Balbir Singh
l stack on secondary CPUs when starting the > CPU. This isn't a major problem, since an appropriate entry will > be created on demand, but this fixes that also for consistency. > > Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]> > Thanks

Re: [PATCH 1/2] Add scaled time to taskstats based process accounting

2007-08-16 Thread Balbir Singh
other calls to account_(user|system)_time are in arch code. > So the assumption here is that we ran at full frequency during this time, is my understanding correct? -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH 1/2] Add scaled time to taskstats based process accounting

2007-08-17 Thread Balbir Singh
t;> __u64 write_char; /* bytes written */ >> __u64 read_syscalls; /* read syscalls */ >> __u64 write_syscalls; /* write syscalls */ >> + >> +/* time accounting for SMT machines */ >> +__u64 ac_utimescaled;

Re: [PATCH 1/2] Add scaled time to taskstats based process accounting

2007-08-19 Thread Balbir Singh
nd can be exploited by other architectures. The powerpc port is complete and I think the implementation would provide a good reference for other implementations to follow. -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL ___

Badness seen on 2.6.26-rc2 with lockdep enabled

2008-05-14 Thread Balbir Singh
enabled at (29): [] .trace_hardirqs_on+0x1c/0x3 0 hardirqs last disabled at (30): [] .trace_hardirqs_off+0x1c/0x 30 softirqs last enabled at (28): [] .__do_softirq+0x180/0x1a8 softirqs last disabled at (21): [] .call_do_softirq+0x14/0x24 -- Warm Regards, Balbir Singh Linux T

Re: [PATCH v11 0/6] KASAN for powerpc64 radix

2021-03-19 Thread Balbir Singh
. Both 64k and 4k pages work. Running as a KVM host works, but > nothing in arch/powerpc/kvm is instrumented. It's also potentially a bit > fragile - if any real mode code paths call out to instrumented code, things > will go boom. > The last time I checked, the changes for real mode, made the code hard to review/maintain. I am happy to see that we've decided to leave that off the table for now, reviewing the series Balbir Singh.

Re: [PATCH v11 1/6] kasan: allow an architecture to disable inline instrumentation

2021-03-19 Thread Balbir Singh
VE_ARCH_KASAN_HW_TAGS > config HAVE_ARCH_KASAN_VMALLOC > bool > > +config ARCH_DISABLE_KASAN_INLINE > + def_bool n > + Some comments on what arch's want to disable kasan inline would be helpful and why. Balbir Singh.

Re: [PATCH v11 6/6] powerpc: Book3S 64-bit outline-only KASAN support

2021-03-19 Thread Balbir Singh
ny code that runs with translations off after > booting. Take this approach for now and require outline instrumentation. > > Previous attempts allowed inline instrumentation. However, they came with > some unfortunate restrictions: only physically contiguous memory could be > used and

Re: [PATCH v11 6/6] powerpc: Book3S 64-bit outline-only KASAN support

2021-03-21 Thread Balbir Singh
we start at c00e... > >> + */ > >> + > > > > assuming we have > > #define VMEMMAP_END R_VMEMMAP_END > > and ditto for hash we probably need > > > > BUILD_BUG_ON(VMEMMAP_END + KASAN_SHADOW_OFFSET != KASAN_SHADOW_END); > > Sorry, I'm not sure what this is supposed to be testing? In what > situation would this trigger? > I am bit concerned that we have hard coded (IIR) 0xa80e... in the config, any changes to VMEMMAP_END, KASAN_SHADOW_OFFSET/END should be guarded. Balbir Singh.

Re: [PATCH v15 0/4] KASAN core changes for ppc64 radix KASAN

2021-06-17 Thread Balbir Singh
cture to disable inline instrumentation > kasan: allow architectures to provide an outline readiness check > mm: define default MAX_PTRS_PER_* in include/pgtable.h > kasan: use MAX_PTRS_PER_* for early shadow tables > The series seems reasonable Reviewed-by: Balbir Singh

Re: [PATCH v5 05/15] livepatch/powerpc: add TIF_PATCH_PENDING thread flag

2017-03-06 Thread Balbir Singh
s the kernel. > > The bit is included in the _TIF_USER_WORK_MASK macro so that > do_notify_resume() and klp_update_patch_state() get called when the bit > is set. > > Signed-off-by: Josh Poimboeuf > Reviewed-by: Petr Mladek > Reviewed-by: Miroslav Benes > Reviewed-by: Kamal

Re: [PATCH v5 01/15] stacktrace/x86: add function for detecting reliable stack traces

2017-03-06 Thread Balbir Singh
t; Signed-off-by: Josh Poimboeuf > --- Could you comment on why we need a reliable trace for live-patching? Are we in any way reliant on the stack trace to patch something broken? Thanks, Balbir Singh.

Re: [PATCH] selftests/powerpc: Replace stxvx and lxvx with their equivalent instruction

2017-03-07 Thread Balbir Singh
to not use the extended mnemonic. These tests only perform register comparisons the big endian only byte ordering for stxvd2x and lxvd2x does not impact the test. Signed-off-by: Cyril Bur --- Acked-by: Balbir Singh

Re: [PATCH v5 01/15] stacktrace/x86: add function for detecting reliable stack traces

2017-03-08 Thread Balbir Singh
On Tue, 2017-03-07 at 10:12 -0600, Josh Poimboeuf wrote: > On Tue, Mar 07, 2017 at 05:50:55PM +1100, Balbir Singh wrote: > > On Mon, 2017-02-13 at 19:42 -0600, Josh Poimboeuf wrote: > > > For live patching and possibly other use cases, a stack trace is only > > > usefu

Re: [PATCH kernel] powerpc/iommu: Do not call PageTransHuge() on tail pages

2017-04-02 Thread Balbir Singh
s reasonable to me. I suspect the checks can be simplified and we can support split and move of THP in the future. For now, looks good Acked-by: Balbir Singh

Re: [PATCH V2] powerpc/hugetlb: Add ABI defines for supported HugeTLB page sizes

2017-04-04 Thread Balbir Singh
_MMAN_H */ We may want to call out what MMU supports what size, so that an error can be interpreted from the header file comments. Reviewed-by: Balbir Singh

[PATCH] powerpc/kconfig: Turn CONFIG_RELOCATABLE on

2017-04-05 Thread Balbir Singh
Most distros will want it on by default and I've missed turning it on during developer testing. Having it on ensures we are testing our patches with the config enabled. Signed-off-by: Balbir Singh --- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/Kc

Re: [RFC] [PATCH] Trace TLBIE's

2017-04-05 Thread Balbir Singh
On Thu, 2017-04-06 at 16:03 +1000, Michael Ellerman wrote: > Alistair Popple writes: > > > On Wed, 23 Nov 2016 10:40:36 PM Balbir Singh wrote: > > > > > > > But overall I guess it's OK. We'd want to do a quick benchmark to make > > > > su

[RFC][PATCH] powerpc/syscalls/trace: Fix mmap in syscalls_trace

2017-04-10 Thread Balbir Singh
syscall_exit_mmap is not. A side-effect of this change is that the return type has changed from unsigned long to long. Signed-off-by: Balbir Singh --- arch/powerpc/include/asm/syscalls.h | 4 ++-- arch/powerpc/kernel/syscalls.c | 16 2 files changed, 10 insertions(+), 10 deletions

[PATCH 1/2] powerpc/tracing: Trace TLBIE(L)

2017-04-10 Thread Balbir Singh
0 prs=0 r=0 ... qemu-system-ppc-5371 [016] 1412.369519: tlbie: tlbie with lpid 0, local 1, rb=67bd8900174c11c1, rs=0, ric=0 prs=0 r=0 qemu-system-ppc-5377 [056] 1421.687262: tlbie: tlbie with lpid 1, local 0, rb=5f04edffa00c11c1, rs=1, ric=0 prs=0 r=0 Signed-off-by: Balbir Singh

Re: [PATCH 1/2] powerpc/tracing: Trace TLBIE(L)

2017-04-11 Thread Balbir Singh
On Tue, 2017-04-11 at 15:23 +1000, Balbir Singh wrote: > Just a quick patch to trace tlbie(l)'s. The idea being that it can be > enabled when we suspect corruption or when we need to see if we are doing > the right thing during flush. I think the format can be enhanced to > make

Re: [PATCH kernel v2] powerpc/iommu: Do not call PageTransHuge() on tail pages

2017-04-11 Thread Balbir Singh
: PPC: Book3S HV: Migrate pinned pages out of CMA") > Cc: sta...@vger.kernel.org # v4.9+ > Signed-off-by: Alexey Kardashevskiy > Acked-by: Balbir Singh > --- > > Changes: > v2: > * instead of moving PageCompound() to the beginning, this just drops > PageHuge() and

Re: [PATCH v2] ppc64/kprobe: Fix oops when kprobed on 'stdu' instruction

2017-04-11 Thread Balbir Singh
n to the GPR1(r1) which will be what we restore when we return from the exception. The conversion of lwz to ld indeed looks correct Balbir Singh.

Re: [PATCH 5/9] powerpc/vmemmap: Add altmap support

2017-04-11 Thread Balbir Singh
> large amount of ZONE_DEVICE memory is being added to the system the > altmap reduces pressure on main system memory by allowing the mm/ > metadata to be stored on the device itself rather in main memory. > > Signed-off-by: Oliver O'Halloran > --- Reviewed-by: Balbir Singh

Re: [PATCH 6/9] powerpc, mm: Enable ZONE_DEVICE on powerpc

2017-04-11 Thread Balbir Singh
PARSEMEM_VMEMMAP > - depends on X86_64 #arch_add_memory() comprehends device memory > + depends on (X86_64 || PPC_BOOK3S_64) #arch_add_memory() comprehends > device memory Reviewed-by: Balbir Singh

Re: [PATCH 8/9] powerpc/mm: Wire up hpte_removebolted for powernv

2017-04-11 Thread Balbir Singh
+ hptep->v = 0; Under DEBUG or otherwise, I would add more checks like 1. was hpte_v & HPTE_V_VALID and BOLTED set? If not, we've already invalidated that hpte and we can skip the tlbie. Since this was bolted you might be right that it is always valid and bolted > + > +

[PATCH] powerpc/syscalls/trace: Fix mmap in syscalls_trace

2017-04-11 Thread Balbir Singh
-> 0x7fff922a cat-3399 [001] 196.542668: sys_munmap(addr: 7fff922c, len: 6d2c) cat-3399 [001] 196.542677: sys_munmap -> 0x0 Signed-off-by: Balbir Singh --- Changelog: Removed RFC Fixed len from unsigned long to size_t Added some examples of

Re: powerpc: Avoid taking a data miss on every userspace instruction miss

2017-04-12 Thread Balbir Singh
ersion you applied does not have checks for is_write Balbir Singh.

[RFC][PATCH] powerpc/mm: convert tlbie to tlbiel when no batch is active

2017-04-12 Thread Balbir Singh
changes on a powernv machine. Signed-off-by: Balbir Singh --- arch/powerpc/mm/tlb_hash64.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c index 4517aa4..1268e3a 100644 --- a/arch/powerpc/mm/tlb_hash64

[PATCH] powerpc/configs: Enable function trace by default

2017-04-13 Thread Balbir Singh
We expect to have these configs on by default, most distros turn them off, its always good to have them on so that we can use them and hopefully not break them Signed-off-by: Balbir Singh --- arch/powerpc/configs/powernv_defconfig | 4 arch/powerpc/configs/ppc64_defconfig | 3 +++ arch

Re: [PATCH v3] powerpc: mm: support ARCH_MMAP_RND_BITS

2017-04-13 Thread Balbir Singh
>> >> Yes. It was derived from TASK_SIZE : >> >> http://lxr.free-electrons.com/source/arch/powerpc/include/asm/processor.h#L105 >> > > That is getting update to 128TB by default and conditionally to 512TB > Since this is compile time, we should probably keep the scope to 128TB for now and see if w

[PATCH] powerpc/configs: Enable THP and 64K for ppc64(le)_defconfig

2017-04-13 Thread Balbir Singh
: Balbir Singh --- arch/powerpc/configs/ppc64_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index 17c6c12..775c8f4 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs

Re: [PATCH] powerpc/configs: Enable function trace by default

2017-04-13 Thread Balbir Singh
On Thu, 2017-04-13 at 09:24 +0200, Christophe LEROY wrote: > Hi Baldir Hi Christophe, It's Balbir > > Le 13/04/2017 à 09:03, Balbir Singh a écrit : > > We expect to have these configs on by default, most > > distros turn them off, its always good to have them on >

Re: [PATCH] powerpc/configs: Enable function trace by default

2017-04-13 Thread Balbir Singh
On Thu, Apr 13, 2017 at 6:41 PM, Christophe LEROY wrote: > > > Le 13/04/2017 à 10:19, Balbir Singh a écrit : >> >> On Thu, 2017-04-13 at 09:24 +0200, Christophe LEROY wrote: >>> >>> Hi Baldir >> >> >> Hi Christophe, It's Balbir >

Re: [PATCH] powerpc/configs: Enable function trace by default

2017-04-19 Thread Balbir Singh
st workloads run on kernels that have them enabled these days? CONFIG_MPROFILE_KERNEL depends on CC_USING_MPROFILE_KERNEL which is automatically detected and is LE only. Balbir Singh

Re: [PATCH v2] powerpc/mm: Add support for runtime configuration of ASLR limits

2017-04-23 Thread Balbir Singh
gt; @@ -59,13 +59,14 @@ static inline int mmap_is_legacy(void) > > unsigned long arch_mmap_rnd(void) > { > - unsigned long rnd; > + unsigned long shift, rnd; > > - /* 8MB for 32bit, 1GB for 64bit */ > + shift = mmap_rnd_bits; > +#ifdef CONFIG_COMPAT > if (is_32bit_task()) > - rnd = get_random_long() % (1<<(23-PAGE_SHIFT)); > - else > - rnd = get_random_long() % (1UL<<(30-PAGE_SHIFT)); > + shift = mmap_rnd_compat_bits; > +#endif > + rnd = get_random_long() % (1 << shift); > Nitpick, 1 should be 1UL? > return rnd << PAGE_SHIFT; > } Acked-by: Balbir Singh

Re: [kernel-hardening] Re: [PATCH v2] powerpc/mm: Add support for runtime configuration of ASLR limits

2017-04-24 Thread Balbir Singh
On Tue, 2017-04-25 at 00:29 +1000, Michael Ellerman wrote: > Balbir Singh writes: > > > On Fri, 2017-04-21 at 00:36 +1000, Michael Ellerman wrote: > > > Add powerpc support for mmap_rnd_bits and mmap_rnd_compat_bits, which are > > > two > > > sysctls that

[PATCH v2 0/3] Implement page table accounting for powerpc

2017-04-30 Thread Balbir Singh
alloc accounting Balbir Singh (3): powerpc/mm/book(e)(3s)/64: Add page table accounting powerpc/mm/book(e)(3s)/32: Add page table accounting powerpc/mm/hugetlb: Add support for page accounting arch/powerpc/include/asm/book3s/32/pgalloc.h | 3 ++- arch/powerpc/include/asm/book3s/64/pgalloc.h

[PATCH v2 1/3] powerpc/mm/book(e)(3s)/64: Add page table accounting

2017-04-30 Thread Balbir Singh
OTE: This adds an overhead to pmd/pud/pgd allocations similar to x86. The other alternative was to implement pmd_alloc_kernel/pud_alloc_kernel and pgd_alloc_kernel with their offset variants. For 4k page size, pte_alloc_one no longer calls pte_alloc_one_kernel. Signed-off-by: Balbir Singh --- arc

[PATCH v2 2/3] powerpc/mm/book(e)(3s)/32: Add page table accounting

2017-04-30 Thread Balbir Singh
Add support in pte_alloc_one() and pgd_alloc() by passing __GFP_ACCOUNT in the flags Signed-off-by: Balbir Singh --- arch/powerpc/include/asm/nohash/32/pgalloc.h | 3 ++- arch/powerpc/mm/pgtable_32.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH v2 3/3] powerpc/mm/hugetlb: Add support for page accounting

2017-04-30 Thread Balbir Singh
Add __GFP_ACCOUNT to __hugepte_alloc() Signed-off-by: Balbir Singh --- arch/powerpc/mm/hugetlbpage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index a4f33de..94e56b1 100644 --- a/arch/powerpc/mm

Re: [PATCH v2 2/3] powerpc/mm/book(e)(3s)/32: Add page table accounting

2017-05-01 Thread Balbir Singh
t; > url: > https://github.com/0day-ci/linux/commits/Balbir-Singh/powerpc-mm-book-e-3s-64-Add-page-table-accounting/20170501-143900 > base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next > config: powerpc-virtex5_defconfig (attached as .config) > compiler: powerpc-

[PATCH v3 0/3] Implement page table accounting for powerpc

2017-05-01 Thread Balbir Singh
- Optimizations for pte_alloc_one() Changelog v2: - Added support for 32 bit and booke - Added hugepte alloc accounting Balbir Singh (3): powerpc/mm/book(e)(3s)/64: Add page table accounting powerpc/mm/book(e)(3s)/32: Add page table accounting powerpc/mm/hugetlb: Add support for page accounting arch

[PATCH v3 1/3] powerpc/mm/book(e)(3s)/64: Add page table accounting

2017-05-01 Thread Balbir Singh
OTE: This adds an overhead to pmd/pud/pgd allocations similar to x86. The other alternative was to implement pmd_alloc_kernel/pud_alloc_kernel and pgd_alloc_kernel with their offset variants. For 4k page size, pte_alloc_one no longer calls pte_alloc_one_kernel. Signed-off-by: Balbir Singh --- arc

[PATCH v3 2/3] powerpc/mm/book(e)(3s)/32: Add page table accounting

2017-05-01 Thread Balbir Singh
Add support in pte_alloc_one() and pgd_alloc() by passing __GFP_ACCOUNT in the flags Signed-off-by: Balbir Singh --- arch/powerpc/include/asm/nohash/32/pgalloc.h | 3 ++- arch/powerpc/mm/pgtable_32.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH v3 3/3] powerpc/mm/hugetlb: Add support for page accounting

2017-05-01 Thread Balbir Singh
Add __GFP_ACCOUNT to __hugepte_alloc() Signed-off-by: Balbir Singh --- arch/powerpc/mm/hugetlbpage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index a4f33de..94e56b1 100644 --- a/arch/powerpc/mm

Re: [RFC 1/2] powerpc/mm: Add marker for contexts requiring global TLB invalidations

2017-05-04 Thread Balbir Singh
cpumask_of(smp_processor_id())); > + int rc; > + > + rc = cpumask_equal(mm_cpumask(mm), > + cpumask_of(smp_processor_id())); > +#ifdef CONFIG_PPC_BOOK3S_64 > + rc = rc && !test_bit(MM_CONTEXT_GLOBAL_TLBI, &mm->context.flags); > +#endif Acked-by: Balbir Singh

<    1   2   3   4   5   6   7   8   9   10   >