Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-22 Thread Andrew Morton
> On Thu, 22 Feb 2007 12:20:06 -0600 Kumar Gala <[EMAIL PROTECTED]> wrote: > + if ((gfp_mask & (__GFP_FS|__GFP_IO)) != (__GFP_FS|__GFP_IO)) { > > The second seems to make more sense. I tested with the first last > night which didn't help. > > With the proper patch in place things look

Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-22 Thread Kumar Gala
Not that it'll help much: the VM calls throttle_vm_writeout() for GFP_NOIO and GFP_NOFS allocations, which is a bug. Because if the caller holds locks which prevent filesystem or IO progress, we deadlock. I'll fix the VM if someone else fixes USB ;) What else needs to be fixed? Would be

Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-22 Thread Kumar Gala
Not that it'll help much: the VM calls throttle_vm_writeout() for GFP_NOIO and GFP_NOFS allocations, which is a bug. Because if the caller holds locks which prevent filesystem or IO progress, we deadlock. I'll fix the VM if someone else fixes USB ;) What else needs to be fixed? Would be

Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-22 Thread Andrew Morton
On Thu, 22 Feb 2007 12:20:06 -0600 Kumar Gala [EMAIL PROTECTED] wrote: + if ((gfp_mask (__GFP_FS|__GFP_IO)) != (__GFP_FS|__GFP_IO)) { The second seems to make more sense. I tested with the first last night which didn't help. With the proper patch in place things look good. Is

Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread Kumar Gala
On Feb 21, 2007, at 3:31 PM, Andrew Morton wrote: On Wed, 21 Feb 2007 16:22:17 -0500 (EST) Alan Stern <[EMAIL PROTECTED]> wrote: On Wed, 21 Feb 2007, Andrew Morton wrote: It seems like usb-storage and aio are completely off in the weeds. Ideas? It seems usb-storage should remove some

Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread Andrew Morton
On Wed, 21 Feb 2007 16:50:23 -0500 (EST) Alan Stern <[EMAIL PROTECTED]> wrote: > > + if ((gfp_mask & (__GFP_FS|__GFP_IO)) != (__GFP_FS|__GFP_IO)) { > > Is that really the correct test? I don't know enough about the memory > management subsystem to say one way or the other. What's special

Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread Alan Stern
On Wed, 21 Feb 2007, Andrew Morton wrote: > On Wed, 21 Feb 2007 16:22:17 -0500 (EST) > Alan Stern <[EMAIL PROTECTED]> wrote: > > > On Wed, 21 Feb 2007, Andrew Morton wrote: > > > > > > > It seems like usb-storage and aio are completely off in the weeds. > > > > > Ideas? > > > > > > > > It

Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread Andrew Morton
On Wed, 21 Feb 2007 16:22:17 -0500 (EST) Alan Stern <[EMAIL PROTECTED]> wrote: > On Wed, 21 Feb 2007, Andrew Morton wrote: > > > > > It seems like usb-storage and aio are completely off in the weeds. > > > > Ideas? > > > > > > It seems usb-storage should remove some kmalloc and use mempool()

Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread Alan Stern
On Wed, 21 Feb 2007, Andrew Morton wrote: > > > It seems like usb-storage and aio are completely off in the weeds. > > > Ideas? > > > > It seems usb-storage should remove some kmalloc and use mempool() for > > urb... Is someone working on this? And idea? > > I think Pete said that we're

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread Andrew Morton
On Thu, 22 Feb 2007 05:18:45 +0900 OGAWA Hirofumi <[EMAIL PROTECTED]> wrote: > Kumar Gala <[EMAIL PROTECTED]> writes: > > >>> I usually run the following twice to get the hang state: > >>> > >>> time ./trunc_test bar 1 & > >>> time ./trunc_test baz 1 & > >>> > >>> I was wondering

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread OGAWA Hirofumi
Kumar Gala <[EMAIL PROTECTED]> writes: >>> I usually run the following twice to get the hang state: >>> >>> time ./trunc_test bar 1 & >>> time ./trunc_test baz 1 & >>> >>> I was wondering if anyone had any suggestions on what to poke at next >>> to try and figure out what is going

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread OGAWA Hirofumi
Kumar Gala [EMAIL PROTECTED] writes: I usually run the following twice to get the hang state: time ./trunc_test bar 1 time ./trunc_test baz 1 I was wondering if anyone had any suggestions on what to poke at next to try and figure out what is going on. So I realized I

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread Andrew Morton
On Thu, 22 Feb 2007 05:18:45 +0900 OGAWA Hirofumi [EMAIL PROTECTED] wrote: Kumar Gala [EMAIL PROTECTED] writes: I usually run the following twice to get the hang state: time ./trunc_test bar 1 time ./trunc_test baz 1 I was wondering if anyone had any suggestions

Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread Alan Stern
On Wed, 21 Feb 2007, Andrew Morton wrote: It seems like usb-storage and aio are completely off in the weeds. Ideas? It seems usb-storage should remove some kmalloc and use mempool() for urb... Is someone working on this? And idea? I think Pete said that we're supposed to be

Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread Andrew Morton
On Wed, 21 Feb 2007 16:22:17 -0500 (EST) Alan Stern [EMAIL PROTECTED] wrote: On Wed, 21 Feb 2007, Andrew Morton wrote: It seems like usb-storage and aio are completely off in the weeds. Ideas? It seems usb-storage should remove some kmalloc and use mempool() for urb... Is

Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread Alan Stern
On Wed, 21 Feb 2007, Andrew Morton wrote: On Wed, 21 Feb 2007 16:22:17 -0500 (EST) Alan Stern [EMAIL PROTECTED] wrote: On Wed, 21 Feb 2007, Andrew Morton wrote: It seems like usb-storage and aio are completely off in the weeds. Ideas? It seems usb-storage should

Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread Andrew Morton
On Wed, 21 Feb 2007 16:50:23 -0500 (EST) Alan Stern [EMAIL PROTECTED] wrote: + if ((gfp_mask (__GFP_FS|__GFP_IO)) != (__GFP_FS|__GFP_IO)) { Is that really the correct test? I don't know enough about the memory management subsystem to say one way or the other. What's special about

Re: [linux-usb-devel] 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-21 Thread Kumar Gala
On Feb 21, 2007, at 3:31 PM, Andrew Morton wrote: On Wed, 21 Feb 2007 16:22:17 -0500 (EST) Alan Stern [EMAIL PROTECTED] wrote: On Wed, 21 Feb 2007, Andrew Morton wrote: It seems like usb-storage and aio are completely off in the weeds. Ideas? It seems usb-storage should remove some

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-20 Thread OGAWA Hirofumi
Kumar Gala <[EMAIL PROTECTED]> writes: > On Feb 19, 2007, at 4:19 PM, OGAWA Hirofumi wrote: > >> Kumar Gala <[EMAIL PROTECTED]> writes: >> >>> Once the system locks up I dont have any ability to do anything. >> >> Ah, doesn't sysrq also work? If sysrq work, it can use to see IO >> request state

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-20 Thread OGAWA Hirofumi
Kumar Gala [EMAIL PROTECTED] writes: On Feb 19, 2007, at 4:19 PM, OGAWA Hirofumi wrote: Kumar Gala [EMAIL PROTECTED] writes: Once the system locks up I dont have any ability to do anything. Ah, doesn't sysrq also work? If sysrq work, it can use to see IO request state with a patch.

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-19 Thread Robert Hancock
Kumar Gala wrote: [ 497.499249] usb-storage D 0 671 5 773 670 (L-TLB) [ 497.506930] Call Trace: [ 497.509372] [C3F35A60] [C00083AC] __switch_to+0x28/0x40 [ 497.514608] [C3F35A80] [C01F4B78] schedule+0x324/0x6bc [ 497.519756] [C3F35AC0] [C01F5D6C]

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-19 Thread Kumar Gala
On Feb 19, 2007, at 4:19 PM, OGAWA Hirofumi wrote: Kumar Gala <[EMAIL PROTECTED]> writes: I usually run the following twice to get the hang state: time ./trunc_test bar 1 & time ./trunc_test baz 1 & I was wondering if anyone had any suggestions on what to poke at next to

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-19 Thread OGAWA Hirofumi
Kumar Gala <[EMAIL PROTECTED]> writes: >>> I usually run the following twice to get the hang state: >>> >>> time ./trunc_test bar 1 & >>> time ./trunc_test baz 1 & >>> >>> I was wondering if anyone had any suggestions on what to poke at next >>> to try and figure out what is going

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-19 Thread Kumar Gala
On Feb 18, 2007, at 10:10 AM, OGAWA Hirofumi wrote: Kumar Gala <[EMAIL PROTECTED]> writes: I'm seeing an issue with a stock 2.6.20 kernel running on an embedded PPC. I've got a usb flash drive plugged in and the filesystem on the drive is vfat. Running with 64M and no swap. If I execute a

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-19 Thread Kumar Gala
On Feb 18, 2007, at 10:10 AM, OGAWA Hirofumi wrote: Kumar Gala <[EMAIL PROTECTED]> writes: I'm seeing an issue with a stock 2.6.20 kernel running on an embedded PPC. I've got a usb flash drive plugged in and the filesystem on the drive is vfat. Running with 64M and no swap. If I execute a

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-19 Thread Kumar Gala
On Feb 18, 2007, at 10:10 AM, OGAWA Hirofumi wrote: Kumar Gala [EMAIL PROTECTED] writes: I'm seeing an issue with a stock 2.6.20 kernel running on an embedded PPC. I've got a usb flash drive plugged in and the filesystem on the drive is vfat. Running with 64M and no swap. If I execute a

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-19 Thread Kumar Gala
On Feb 18, 2007, at 10:10 AM, OGAWA Hirofumi wrote: Kumar Gala [EMAIL PROTECTED] writes: I'm seeing an issue with a stock 2.6.20 kernel running on an embedded PPC. I've got a usb flash drive plugged in and the filesystem on the drive is vfat. Running with 64M and no swap. If I execute a

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-19 Thread OGAWA Hirofumi
Kumar Gala [EMAIL PROTECTED] writes: I usually run the following twice to get the hang state: time ./trunc_test bar 1 time ./trunc_test baz 1 I was wondering if anyone had any suggestions on what to poke at next to try and figure out what is going on. Can you check

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-19 Thread Kumar Gala
On Feb 19, 2007, at 4:19 PM, OGAWA Hirofumi wrote: Kumar Gala [EMAIL PROTECTED] writes: I usually run the following twice to get the hang state: time ./trunc_test bar 1 time ./trunc_test baz 1 I was wondering if anyone had any suggestions on what to poke at next to try

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-19 Thread Robert Hancock
Kumar Gala wrote: [ 497.499249] usb-storage D 0 671 5 773 670 (L-TLB) [ 497.506930] Call Trace: [ 497.509372] [C3F35A60] [C00083AC] __switch_to+0x28/0x40 [ 497.514608] [C3F35A80] [C01F4B78] schedule+0x324/0x6bc [ 497.519756] [C3F35AC0] [C01F5D6C]

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-18 Thread OGAWA Hirofumi
Kumar Gala <[EMAIL PROTECTED]> writes: > I'm seeing an issue with a stock 2.6.20 kernel running on an embedded > PPC. I've got a usb flash drive plugged in and the filesystem on the > drive is vfat. Running with 64M and no swap. > > If I execute a series of large (100M+) ftruncate() on the

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-18 Thread OGAWA Hirofumi
Kumar Gala [EMAIL PROTECTED] writes: I'm seeing an issue with a stock 2.6.20 kernel running on an embedded PPC. I've got a usb flash drive plugged in and the filesystem on the drive is vfat. Running with 64M and no swap. If I execute a series of large (100M+) ftruncate() on the disk

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-16 Thread Kumar Gala
On Feb 16, 2007, at 5:10 PM, Robert Hancock wrote: Kumar Gala wrote: I'm seeing an issue with a stock 2.6.20 kernel running on an embedded PPC. I've got a usb flash drive plugged in and the filesystem on the drive is vfat. Running with 64M and no swap. If I execute a series of large

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-16 Thread Robert Hancock
Kumar Gala wrote: I'm seeing an issue with a stock 2.6.20 kernel running on an embedded PPC. I've got a usb flash drive plugged in and the filesystem on the drive is vfat. Running with 64M and no swap. If I execute a series of large (100M+) ftruncate() on the disk the kernel will hang and

2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-16 Thread Kumar Gala
I'm seeing an issue with a stock 2.6.20 kernel running on an embedded PPC. I've got a usb flash drive plugged in and the filesystem on the drive is vfat. Running with 64M and no swap. If I execute a series of large (100M+) ftruncate() on the disk the kernel will hang and never return.

2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-16 Thread Kumar Gala
I'm seeing an issue with a stock 2.6.20 kernel running on an embedded PPC. I've got a usb flash drive plugged in and the filesystem on the drive is vfat. Running with 64M and no swap. If I execute a series of large (100M+) ftruncate() on the disk the kernel will hang and never return.

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-16 Thread Robert Hancock
Kumar Gala wrote: I'm seeing an issue with a stock 2.6.20 kernel running on an embedded PPC. I've got a usb flash drive plugged in and the filesystem on the drive is vfat. Running with 64M and no swap. If I execute a series of large (100M+) ftruncate() on the disk the kernel will hang and

Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate

2007-02-16 Thread Kumar Gala
On Feb 16, 2007, at 5:10 PM, Robert Hancock wrote: Kumar Gala wrote: I'm seeing an issue with a stock 2.6.20 kernel running on an embedded PPC. I've got a usb flash drive plugged in and the filesystem on the drive is vfat. Running with 64M and no swap. If I execute a series of large