Switch KM_SLEEP to KM_PUSHPAGE

Under certain circumstances the following functions may be called
in a context where KM_SLEEP is unsafe and can result in a deadlocked
system.  To avoid this problem the unconditional KM_SLEEPs are
converted to KM_PUSHPAGEs.  This will prevent them from attempting
to initiate any I/O during direct reclaim.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2012-08-23 15:36:28 -07:00
parent 3e904f40b4
commit cd5ca4b2f8
3 changed files with 6 additions and 7 deletions
+1
View File
@@ -62,6 +62,7 @@ typedef struct taskq_ent {
*/
#define TQ_SLEEP KM_SLEEP
#define TQ_NOSLEEP KM_NOSLEEP
#define TQ_PUSHPAGE KM_PUSHPAGE
#define TQ_NOQUEUE 0x01000000
#define TQ_NOALLOC 0x02000000
#define TQ_NEW 0x04000000