Whamcloud - gitweb
Branch b1_8
authoryangsheng <yangsheng>
Tue, 14 Apr 2009 15:42:04 +0000 (15:42 +0000)
committeryangsheng <yangsheng>
Tue, 14 Apr 2009 15:42:04 +0000 (15:42 +0000)
b=18399

i=adilger, johann

Patch kernel to avoid deadlock in prune_icache().
Authro: ZhaoHongChao

lustre/ChangeLog
lustre/kernel_patches/patches/prune-icache-use-trylock-rhel5.patch [new file with mode: 0644]
lustre/kernel_patches/patches/prune-icache-use-trylock-sles10.patch [new file with mode: 0644]
lustre/kernel_patches/series/2.6-rhel5.series
lustre/kernel_patches/series/2.6-sles10.series

index d3a5976..4e1c7d9 100644 (file)
@@ -31,6 +31,11 @@ tbd Sun Microsystems, Inc.
          of Lustre filesystem with 4K stack may cause a stack overflow. For
          more information, please refer to bugzilla 17630.
 
+Severity   : normal
+Bugzilla   : 18399
+Descriptoin: OSS DeadLock
+Details    : Use trylock to prevent deadlock when shrink icache.
+
 Severity   : enhancement
 Bugzilla   : 18688
 Description: Allow tuning service thread via /proc
diff --git a/lustre/kernel_patches/patches/prune-icache-use-trylock-rhel5.patch b/lustre/kernel_patches/patches/prune-icache-use-trylock-rhel5.patch
new file mode 100644 (file)
index 0000000..beadec2
--- /dev/null
@@ -0,0 +1,13 @@
+--- linux/fs/inode.c.orig      2009-01-24 03:28:57.000000000 +0800
++++ linux/fs/inode.c   2009-01-24 03:30:18.000000000 +0800
+@@ -418,7 +418,9 @@ static void prune_icache(int nr_to_scan)
+       int nr_scanned;
+       unsigned long reap = 0;
+-      mutex_lock(&iprune_mutex);
++      if (!mutex_trylock(&iprune_mutex))
++              return;
++
+       spin_lock(&inode_lock);
+       for (nr_scanned = 0; nr_scanned < nr_to_scan; nr_scanned++) {
+               struct inode *inode;
diff --git a/lustre/kernel_patches/patches/prune-icache-use-trylock-sles10.patch b/lustre/kernel_patches/patches/prune-icache-use-trylock-sles10.patch
new file mode 100644 (file)
index 0000000..51924f6
--- /dev/null
@@ -0,0 +1,13 @@
+--- linux/fs/inode.c.orig      2009-01-24 03:28:57.000000000 +0800
++++ linux/fs/inode.c   2009-01-24 03:30:18.000000000 +0800
+@@ -418,7 +418,9 @@ static void prune_icache(int nr_to_scan)
+       int nr_scanned;
+       unsigned long reap = 0;
+-      down(&iprune_sem);
++      if (down_trylock(&iprune_sem))
++              return;
++
+       spin_lock(&inode_lock);
+       for (nr_scanned = 0; nr_scanned < nr_to_scan; nr_scanned++) {
+               struct inode *inode;
index 71e15ef..f43347a 100644 (file)
@@ -21,3 +21,4 @@ md-soft-lockups.patch
 jbd-journal-chksum-2.6.18-vanilla.patch
 quota-large-limits-rhel5.patch
 md-mmp-unplug-dev.patch
+prune-icache-use-trylock-rhel5.patch
index ae293be..dcc8c04 100644 (file)
@@ -12,3 +12,4 @@ jbd-stats-2.6-sles10.patch
 quota-fix-oops-in-invalidate_dquots.patch
 quota-large-limits-sles10.patch
 md-mmp-unplug-dev-sles10.patch
+prune-icache-use-trylock-sles10.patch