On Fri 19-12-14 14:01:55, Vlastimil Babka wrote: > Charles Shirron and Paul Cassella from Cray Inc have reported kswapd stuck > in a busy loop with nothing left to balance, but kswapd_try_to_sleep() failing > to sleep. Their analysis found the cause to be a combination of several > factors: > > 1. A process is waiting in throttle_direct_reclaim() on pgdat->pfmemalloc_wait > > 2. The process has been killed (by OOM in this case), but has not yet been > scheduled to remove itself from the waitqueue and die. pfmemalloc_wait is used as wait_event and that one uses autoremove_wake_function for wake ups so the task shouldn't stay on the queue if it was woken up. Moreover pfmemalloc_wait sleeps are killable by the OOM killer AFAICS. $ git grep "wait_event.*pfmemalloc_wait" mm/vmscan.c: wait_event_interruptible_timeout(pgdat->pfmemalloc_wait, mm/vmscan.c: wait_event_killable(zone->zone_pgdat->pfmemalloc_wait,)) So OOM killer would wake it up already and kswapd shouldn't see this task on the waitqueue anymore. -- Michal Hocko SUSE Labs -- 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>