diff options
author | Richard Yao <[email protected]> | 2012-05-01 09:34:39 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-05-07 12:05:27 -0700 |
commit | f90096c9056b5d3c653c53181a64f5ea6794163f (patch) | |
tree | 1ff538f0d89665e9bb8af60f30888ec7393ddbd2 | |
parent | a9a7a01cf5a61fe170569ebb44d288111d0ddbeb (diff) |
Modify KM_PUSHPAGE to use GFP_NOIO instead of GFP_NOFS
The resolution of issue #31 made KM_PUSHPAGE imply GFP_NOFS. This
was done to prevent situations where filesystem operations which are
holding locks enter direct reclaim and attempt to reaquire those
same locks. This clearly will result in a deadlock.
This works for datasets which are implemented in terms for filesystem
operations. But unfortunately, swapping to a zvol will encounter
many of the same deadlocks and GFP_NOFS will not prevent this. As
such, it is appropriate to extend KM_PUSHPAGE to use the broader
GFP_NOIO mask to handle these non-filesystem cases.
Signed-off-by: Brian Behlendorf <[email protected]>
Issue zfsonlinux/zfs#342
Closes #105
-rw-r--r-- | include/sys/kmem.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/kmem.h b/include/sys/kmem.h index aa5a45476..eda4eee8d 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -43,7 +43,7 @@ */ #define KM_SLEEP GFP_KERNEL /* Can sleep, never fails */ #define KM_NOSLEEP GFP_ATOMIC /* Can not sleep, may fail */ -#define KM_PUSHPAGE (GFP_NOFS | __GFP_HIGH) /* Use reserved memory */ +#define KM_PUSHPAGE (GFP_NOIO | __GFP_HIGH) /* Use reserved memory */ #define KM_NODEBUG __GFP_NOWARN /* Suppress warnings */ #define KM_FLAGS __GFP_BITS_MASK #define KM_VMFLAGS GFP_LEVEL_MASK |