Tetsuo Handa wrote: > (Well, do we need to change __alloc_pages_slowpath() that OOM victims do not > enter direct reclaim paths in order to avoid being blocked by unkillable fs > locks?) I'm not familiar with how fs writeback manages memory. I feel I'm missing something. Can somebody please re-check whether my illustrations are really possible? If they are really possible, I think we have yet another silent hang up sequence. Say, there are one userspace task named P1 and one kernel thread named KT1. (1) P1 enters into kernel mode via write() syscall. (2) P1 allocates memory for buffered write. (3) P1 dirties memory allocated for buffered write. (4) P1 leaves kernel mode. (5) KT1 finds dirtied memory. (6) KT1 holds fs's unkillable lock for fs writeback. (7) KT1 tries to allocate memory for fs writeback, but fails to allocate because watermark is low. KT1 cannot call out_of_memory() because of !__GFP_FS allocation. (8) P1 enters into kernel mode. (9) P1 calls kmalloc(GFP_KERNEL) and is blocked at unkillable lock for fs writeback held by KT1. How do we allow KT1 to make forward progress? Are we giving access to memory reserves (e.g. ALLOC_NO_WATERMARKS priority) to KT1? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>