FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 07-16-2010, 01:43 PM
Leszek Urbanski
 
Default Bug#589294: Crashes / traces after copying large files over NFS

Package: linux-2.6
Version: 2.6.32-15
Severity: important


This bug in present in all 2.6.32.x, 33.x and 34.x kernels.

It is a regression in NFS code. When copying a large file (larger than
the amount of available physical memory) to an NFS-mounted filesystem,
swapper and rpciod on the client complain about page allocation failures
and then kswapd goes into a deadlock, resulting in a system-wide crash.

https://bugzilla.kernel.org/show_bug.cgi?id=16056

The following patch fixes it:

dcafd9eb464f5a87512f28c133386773a596261
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Wed Jul 14 16:51:48 2010 -0400

NFS: Don't let kswapd call nfs_wb_page()

kswapd sets the GFP_KERNEL allocation flags, but is still liable to cause
the system to lock up if it has to wait too long for an RPC call etc to
succeed.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 8d965bd..9af489f 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -491,8 +491,11 @@ static int nfs_release_page(struct page *page, gfp_t gfp)
{
dfprintk(PAGECACHE, "NFS: release_page(%p)
", page);

- /* Only do I/O if gfp is a superset of GFP_KERNEL */
- if ((gfp & GFP_KERNEL) == GFP_KERNEL)
+ /* Only do I/O if gfp is a superset of GFP_KERNEL and if
+ * we're not kswapd or some other memory allocator.
+ */
+ if ((gfp & GFP_KERNEL) == GFP_KERNEL
+ && !(current->flags & PF_MEMALLOC))
nfs_wb_page(page->mapping->host, page);
/* If PagePrivate() is set, then the page is not freeable */
if (PagePrivate(page))




--
Leszek "Tygrys" Urbanski, SCSA, SCNA
"Unix-to-Unix Copy Program;" said PDP-1. "You will never find a more
wretched hive of bugs and flamers. We must be cautious." -- DECWARS
http://cygnus.moo.pl/ -- Cygnus High Altitude Balloon



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100716134322.GA27225@moo.pl">http://lists.debian.org/20100716134322.GA27225@moo.pl
 

Thread Tools




All times are GMT. The time now is 10:51 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org