Re: [PATCH v9] mm: Add memory allocation watchdog kernel thread.

From: Tetsuo Handa
Date: Sun May 28 2017 - 03:01:19 EST


Tetsuo Handa wrote:
> Changes from v7 [11]:
>
> (1) Reflect review comments from Andrew Morton. (Convert "u8 type" to
> "bool report", use CPUHP_PAGE_ALLOC_DEAD event and replace
> for_each_possible_cpu() with for_each_online_cpu(), reuse existing
> rcu_lock_break() and hung_timeout_jiffies() for now, update comments).
>
> Changes from v8 [12]:
>
> (1) Check mempool_alloc() as well, for mempool_alloc() is a sort of
> open-coded __GFP_NOFAIL allocation request where warn_alloc() cannot
> detect stalls due to __GFP_NORETRY, and actually I found a case where
> kswapd was unable to get memory for bio from mempool at
> bio_alloc_bioset(GFP_NOFS) [13], and I believe there are similar bugs.


Andrew, I believe it is time to start testing at linux-next.

Nobody shows interests in detecting/analyzing OOM livelock but there are
still unsolved suspicious cases

http://lkml.kernel.org/r/da13c3c7-b514-67b0-2eb9-6d6af277901b@xxxxxxxxxxxxx
http://lkml.kernel.org/r/20170502141544.rufykv6blliqzqfd@xxxxxxxxxxx
http://lkml.kernel.org/r/CAM_iQpWuPVGc2ky8M-9yukECtS+zKjiDasNymX7rMcBjBFyM_A@xxxxxxxxxxxxxx

where this patch might have given some clues if this patch were available.
There is no reason not to allow users to try this debugging aid.