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

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel,gmane.linux.kernel
Message-ID <[email protected]>
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 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 using GFP_NOIO in there.
> > 
> > We _are_ using it.
> 
> How admirably prompt.

Shucks, we've been using it for years...

> > > 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 nice if someone can confirm that this fixes it:

Not having experienced the problem, I can't confirm the fix.  However...

> +	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 
having both flags set?

> +		/*
> +		 * The caller might hold locks which can prevert IO completion
--------------------------------------------------------------^  Typo

Although perhaps "prevert" is an acceptable neologism in this context.

> +		 * or progress in the filesystem.  So we cannot just sit here
> +		 * waiting for IO to complete.
> +		 */

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.