Re: [PATCH 1/2] mm, vmscan: prevent kswapd livelock due to pfmemalloc-throttled process being killed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 20, 2014 at 12:05:58AM +0100, Vlastimil Babka wrote:
> On 19.12.2014 19:28, Vladimir Davydov wrote:
> >So AFAIU the problem does exist. However, I think it could be fixed by
> >simply waking up all processes waiting on pfmemalloc_wait before putting
> >kswapd to sleep:
> 
> Hm I don't see how it helps? If any of the waiting processes were killed
> and wants to run on kswapd's CPU to remove itself from the waitqueue,
> it will still remain on the waitqueue, no?

Yes, but do we really want all waiting processes to be removed from the
wait queue? AFAIU we just want them to be awake before putting kswapd to
sleep. If there's a process killed (and therefore woken) by the OOM
killer left on the wait queue after we called wake_up_all, it will see
pgdat_balanced=true as soon as it gets scheduled and pass away quickly.
All we have to do is drop the waitqueue_active check from kswapd.

Thanks,
Vladimir
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]