Re: Spinlock recursion after root nfs mount

2011-01-13 Thread Varadarajan, Charulatha
Sergio,

On Wed, Jan 12, 2011 at 02:50, Aguirre, Sergio saagui...@ti.com wrote:
 Hi all,

 Has anyone been trying to boot w/k.org lately?

 I tried with:
 - commit e0e736fc + 2 patches attached I got from patchworks
 - 4430SDP w/ES2.1
 - Busybox FS through NFS.

 I see the attached log, which shows a spinlock recursion bug.

 I did a git bisect, and found this offending commit:

 34286d6662308d82aed891852d04c7c3a2649b16 is the first bad commit
 commit 34286d6662308d82aed891852d04c7c3a2649b16
 Author: Nick Piggin npig...@kernel.dk
 Date:   Fri Jan 7 17:49:57 2011 +1100

    fs: rcu-walk aware d_revalidate method

    Require filesystems be aware of .d_revalidate being called in rcu-walk
    mode (nd-flags  LOOKUP_RCU). For now do a simple push down, returning
    -ECHILD from all implementations.

    Signed-off-by: Nick Piggin npig...@kernel.dk

 :04 04 409693ac5c32f4daa0c9be786e85b04dea32a24f 
 1813b382a41b72ccb5d810c282639961e6d81b73 M      Documentation
 :04 04 a51e00e2f5335f8804e9e5fab10a26b0d67ac302 
 333fc859d8d1f2badea9023072e1ab356f042215 M      drivers
 :04 04 53158279a9808c50157dd4b6ec5c35951b3a60af 
 301c546b257a5b4f3f09289fc5e8f55e66b2b6b9 M      fs
 :04 04 e68ac1512333db998dc539a40a2b43dcee9cb074 
 f238839ffc4021e276be9d39d4e9c510575c9f44 M      include

 And I narrowed it down to this line:

 In file fs/namei.c:

 ...
 ...
 static int nameidata_dentry_drop_rcu(struct nameidata *nd, struct dentry 
 *dentry)
 {
        struct fs_struct *fs = current-fs;
        struct dentry *parent = nd-path.dentry;

        BUG_ON(!(nd-flags  LOOKUP_RCU));
        if (nd-root.mnt) {
                spin_lock(fs-lock);
                if (nd-root.mnt != fs-root.mnt ||
                                nd-root.dentry != fs-root.dentry)
                        goto err_root;
        }
        spin_lock(parent-d_lock);
        spin_lock_nested(dentry-d_lock, DENTRY_D_LOCK_NESTED); -- HERE THE 
 RECURSION IS FIRED UP
 ...
 ...

 I had been googling around and I just saw Uwe  Santosh reporting the problem 
 in LKML, but nobody has answered.

 Has anyone seen this aswell in other platforms? (OMAP3 based boards)

Same issue observed on zoom3 as well. Log attached.


 Regards,
 Sergio


## Booting image at 8030 ...
   Image Name:   Linux-2.6.37-05762-gf8b6e81
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:2919924 Bytes =  2.8 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
OK

Starting kernel ...

[0.00] Linux version 2.6.37-05762-gf8b6e81 (charu@x0084895-pc) (gcc 
version 4.4.1 (Sourcery G++ Lite 2010q1-202) ) #1
[0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
[0.00] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
[0.00] Machine: OMAP Zoom3 board
[0.00] Memory policy: ECC disabled, Data cache writeback
[0.00] OMAP3630 ES1.0 (l2cache iva sgx neon isp 192mhz_clk )
[0.00] SRAM: Mapped pa 0x4020 to va 0xfe40 size: 0x1
[0.00] PERCPU: Embedded 7 pages/cpu @c0f49000 s6048 r8192 d14432 u32768
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 130048
[0.00] Kernel command line: console=ttyS0,115200n8 noinitrd 
root=/dev/nfs rw nfsroot=10.24.244.62:/usr/local/NFS/bb,p
[0.00] PID hash table entries: 2048 (order: 1, 8192 bytes)
[0.00] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[0.00] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[0.00] Memory: 512MB = 512MB total
[0.00] Memory: 508212k/508212k available, 16076k reserved, 0K highmem
[0.00] Virtual kernel memory layout:
[0.00] vector  : 0x - 0x1000   (   4 kB)
[0.00] fixmap  : 0xfff0 - 0xfffe   ( 896 kB)
[0.00] DMA : 0xffc0 - 0xffe0   (   2 MB)
[0.00] vmalloc : 0xe080 - 0xf800   ( 376 MB)
[0.00] lowmem  : 0xc000 - 0xe000   ( 512 MB)
[0.00] modules : 0xbf00 - 0xc000   (  16 MB)
[0.00]   .init : 0xc0008000 - 0xc005   ( 288 kB)
[0.00]   .text : 0xc005 - 0xc0573bb8   (5263 kB)
[0.00]   .data : 0xc0574000 - 0xc05e8fa0   ( 468 kB)
[0.00] Hierarchical RCU implementation.
[0.00]  RCU-based detection of stalled CPUs is disabled.
[0.00] NR_IRQS:402
[0.00] Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz
[0.00] Reprogramming SDRC clock to 4 Hz
[0.00] GPMC revision 5.0
[0.00] IRQ: Found an INTC at 0xfa20 (revision 4.0) with 96 
interrupts
[0.00] Total of 96 interrupts on 1 active controller
[0.00] OMAP clockevent source: GPTIMER1 at 32768 Hz
[0.00] Console: colour dummy device 80x30
[0.00] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., 
Ingo Molnar
[0.00] ... 

Spinlock recursion after root nfs mount

2011-01-11 Thread Aguirre, Sergio
Hi all,

Has anyone been trying to boot w/k.org lately?

I tried with:
- commit e0e736fc + 2 patches attached I got from patchworks
- 4430SDP w/ES2.1
- Busybox FS through NFS.

I see the attached log, which shows a spinlock recursion bug.

I did a git bisect, and found this offending commit:

34286d6662308d82aed891852d04c7c3a2649b16 is the first bad commit
commit 34286d6662308d82aed891852d04c7c3a2649b16
Author: Nick Piggin npig...@kernel.dk
Date:   Fri Jan 7 17:49:57 2011 +1100

fs: rcu-walk aware d_revalidate method

Require filesystems be aware of .d_revalidate being called in rcu-walk
mode (nd-flags  LOOKUP_RCU). For now do a simple push down, returning
-ECHILD from all implementations.

Signed-off-by: Nick Piggin npig...@kernel.dk

:04 04 409693ac5c32f4daa0c9be786e85b04dea32a24f 
1813b382a41b72ccb5d810c282639961e6d81b73 M  Documentation
:04 04 a51e00e2f5335f8804e9e5fab10a26b0d67ac302 
333fc859d8d1f2badea9023072e1ab356f042215 M  drivers
:04 04 53158279a9808c50157dd4b6ec5c35951b3a60af 
301c546b257a5b4f3f09289fc5e8f55e66b2b6b9 M  fs
:04 04 e68ac1512333db998dc539a40a2b43dcee9cb074 
f238839ffc4021e276be9d39d4e9c510575c9f44 M  include

And I narrowed it down to this line:

In file fs/namei.c:

...
...
static int nameidata_dentry_drop_rcu(struct nameidata *nd, struct dentry 
*dentry)
{
struct fs_struct *fs = current-fs;
struct dentry *parent = nd-path.dentry;

BUG_ON(!(nd-flags  LOOKUP_RCU));
if (nd-root.mnt) {
spin_lock(fs-lock);
if (nd-root.mnt != fs-root.mnt ||
nd-root.dentry != fs-root.dentry)
goto err_root;
}
spin_lock(parent-d_lock);
spin_lock_nested(dentry-d_lock, DENTRY_D_LOCK_NESTED); -- HERE THE 
RECURSION IS FIRED UP
...
...

I had been googling around and I just saw Uwe  Santosh reporting the problem 
in LKML, but nobody has answered.

Has anyone seen this aswell in other platforms? (OMAP3 based boards)

Regards,
Sergio

## Booting image at 8030 ...
   Image Name:   Linux-2.6.37-03740-gbc4a241
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:2941368 Bytes =  2.8 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[0.00] Linux version 2.6.37-03740-gbc4a241 
(x0091...@dtx0091359-ubuntu-1) (gcc version 4.4.1 (Sourcery G++ Lite 
2010q1-202) ) #3 SMP Mon Jan 10 15:09:12 CST 2011
[0.00] CPU: ARMv7 Processor [411fc092] revision 2 (ARMv7), cr=10c53c7f
[0.00] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
[0.00] Machine: OMAP4430 4430SDP board
[0.00] Memory policy: ECC disabled, Data cache writealloc
[0.00] Truncating RAM at a000-bfff to -afff (vmalloc region 
overlap).
[0.00] OMAP4430 ES2.0
[0.00] SRAM: Mapped pa 0x4030 to va 0xfe40 size: 0xe000
[0.00] FIXME: omap44xx_sram_init not implemented
[0.00] PERCPU: Embedded 7 pages/cpu @c115f000 s6048 r8192 d14432 u32768
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 181248
[0.00] Kernel command line: console=ttyO2,115200n8 root=/dev/nfs rw 
nfsroot=128.247.78.218:/home/x0091359/my-nfs/busybox,tcp,rsize=4096,wsize=4096 
mem=4...@0x8000 mem=5...@0xa000 noinitrd ip=dh
[0.00] PID hash table entries: 4096 (order: 2, 16384 bytes)
[0.00] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[0.00] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[0.00] Memory: 458MB 512MB = 970MB total
[0.00] Memory: 712916k/712916k available, 18220k reserved, 0K highmem
[0.00] Virtual kernel memory layout:
[0.00] vector  : 0x - 0x1000   (   4 kB)
[0.00] fixmap  : 0xfff0 - 0xfffe   ( 896 kB)
[0.00] DMA : 0xffc0 - 0xffe0   (   2 MB)
[0.00] vmalloc : 0xf080 - 0xf800   ( 120 MB)
[0.00] lowmem  : 0xc000 - 0xf000   ( 768 MB)
[0.00] modules : 0xbf00 - 0xc000   (  16 MB)
[0.00]   .init : 0xc0008000 - 0xc0052000   ( 296 kB)
[0.00]   .text : 0xc0052000 - 0xc0583a94   (5319 kB)
[0.00]   .data : 0xc0584000 - 0xc05f9240   ( 469 kB)
[0.00] Hierarchical RCU implementation.
[0.00]  RCU-based detection of stalled CPUs is disabled.
[0.00] NR_IRQS:402
[0.00] [ cut here ]
[0.00] WARNING: at arch/arm/mach-omap2/clockdomain.c:876 
omap2_clkdm_deny_idle+0x4c/0x7c()
[0.00] clockdomain: OMAP4 wakeup/sleep dependency support is not yet 
implemented
[0.00] Modules linked in:
[0.00] [c0063290] (unwind_backtrace+0x0/0xe4) from [c0093f60] 
(warn_slowpath_common+0x4c/0x64)
[