From: Qian Cai <cai@lca.pw>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
Mel Gorman <mgorman@techsingularity.net>,
Vlastimil Babka <vbabka@suse.cz>
Cc: syzbot <syzbot+93d94a001cfbce9e60e1@syzkaller.appspotmail.com>,
aarcange@redhat.com, akpm@linux-foundation.org,
kirill.shutemov@linux.intel.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, linux@dominikbrodowski.net, mhocko@suse.com,
rientjes@google.com, syzkaller-bugs@googlegroups.com,
xieyisheng1@huawei.com, zhongjiang@huawei.com,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: possible deadlock in __wake_up_common_lock
Date: Wed, 2 Jan 2019 22:27:41 -0500 [thread overview]
Message-ID: <afbbf914-4f76-7c6a-c286-599b97c0f005@lca.pw> (raw)
In-Reply-To: <530f88a1-3aa1-c36f-f487-7e5e33402fb0@I-love.SAKURA.ne.jp>
On 1/2/19 8:28 PM, Tetsuo Handa wrote:
> On 2019/01/03 3:19, Qian Cai wrote:
>> On 1/2/19 1:06 PM, Mel Gorman wrote:
>>
>>> While I recognise there is no test case available, how often does this
>>> trigger in syzbot as it would be nice to have some confirmation any
>>> patch is really fixing the problem.
>>
>> I think I did manage to trigger this every time running a mmap() workload
>> causing swapping and a low-memory situation [1].
>>
>> [1]
>> https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/mem/oom/oom01.c
>
> wakeup_kswapd() is called because tlb_next_batch() is doing GFP_NOWAIT
> allocation. But since tlb_next_batch() can tolerate allocation failure,
> does below change in tlb_next_batch() help?
>
> #define GFP_NOWAIT (__GFP_KSWAPD_RECLAIM)
>
> - batch = (void *)__get_free_pages(GFP_NOWAIT | __GFP_NOWARN, 0);
> + batch = (void *)__get_free_pages(__GFP_NOWARN, 0);
No. In oom01 case, it is from,
do_anonymous_page
__alloc_zeroed_user_highpage
alloc_page_vma(GFP_HIGHUSER ...
GFP_HIGHUSER -> GFP_USER -> __GFP_RECLAIM -> ___GFP_KSWAPD_RECLAIM
Then, it has this new code in steal_suitable_fallback() via 1c30844d2df (mm:
reclaim small amounts of memory when an external fragmentation event occurs)
/*
* Boost watermarks to increase reclaim pressure to reduce
* the likelihood of future fallbacks. Wake kswapd now as
* the node may be balanced overall and kswapd will not
* wake naturally.
*/
boost_watermark(zone);
if (alloc_flags & ALLOC_KSWAPD)
wakeup_kswapd(zone, 0, 0, zone_idx(zone));
next prev parent reply other threads:[~2019-01-03 3:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-02 8:51 syzbot
2019-01-02 8:51 ` syzbot
2019-01-02 12:51 ` Vlastimil Babka
2019-01-02 18:06 ` Mel Gorman
2019-01-02 18:19 ` Qian Cai
2019-01-03 1:28 ` Tetsuo Handa
2019-01-03 3:27 ` Qian Cai [this message]
2019-01-02 18:29 ` Dmitry Vyukov
2019-01-02 18:29 ` Dmitry Vyukov
2019-01-03 16:37 ` Mel Gorman
2019-01-03 19:40 ` Qian Cai
2019-01-03 22:54 ` Mel Gorman
2019-01-07 9:52 ` Peter Zijlstra
2019-01-07 20:46 ` Johannes Weiner
2019-01-07 21:29 ` Peter Zijlstra
2019-01-07 21:33 ` Peter Zijlstra
2019-01-08 13:08 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=afbbf914-4f76-7c6a-c286-599b97c0f005@lca.pw \
--to=cai@lca.pw \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@dominikbrodowski.net \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=mingo@kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=peterz@infradead.org \
--cc=rientjes@google.com \
--cc=syzbot+93d94a001cfbce9e60e1@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=vbabka@suse.cz \
--cc=xieyisheng1@huawei.com \
--cc=zhongjiang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox