[PATCH] throttle_vm_writeout(): don't loop on GFP_NOFS and GFP_NOIO allocations throttle_vm_writeout() is designed to wait for the dirty levels to subside. But if the caller holds IO or FS locks, we might be holding up that writeout. So change it to take a single nap to give other devices a chance to clean some memory, then return. Cc: Nick Piggin <[email protected]> Cc: OGAWA Hirofumi <[email protected]> Cc: Kumar Gala <[email protected]> Cc: Pete Zaitcev <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index fc35e6b..0c78f7f 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h
@@ -84,7 +84,7 @@ int wakeup_pdflush(long nr_pages); void laptop_io_completion(void); void laptop_sync_completion(void); -void throttle_vm_writeout(void); +void throttle_vm_writeout(gfp_t gfp_mask); /* These are exported to sysctl. */ extern int dirty_background_ratio;