[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <030a906a-c845-9639-8df3-2a48d11a1207@alibaba-inc.com>
Date: Mon, 02 Oct 2017 23:46:14 +0800
From: "Yang Shi" <yang.s@...baba-inc.com>
To: Michal Hocko <mhocko@...nel.org>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc: cl@...ux.com, penberg@...nel.org, rientjes@...gle.com,
iamjoonsoo.kim@....com, akpm@...ux-foundation.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2 v8] oom: capture unreclaimable slab info in oom
message
On 10/2/17 4:20 AM, Michal Hocko wrote:
> On Thu 28-09-17 13:36:57, Tetsuo Handa wrote:
>> On 2017/09/28 6:46, Yang Shi wrote:
>>> Changelog v7 —> v8:
>>> * Adopted Michal’s suggestion to dump unreclaim slab info when unreclaimable slabs amount > total user memory. Not only in oom panic path.
>>
>> Holding slab_mutex inside dump_unreclaimable_slab() was refrained since V2
>> because there are
>>
>> mutex_lock(&slab_mutex);
>> kmalloc(GFP_KERNEL);
>> mutex_unlock(&slab_mutex);
>>
>> users. If we call dump_unreclaimable_slab() for non OOM panic path, aren't we
>> introducing a risk of crash (i.e. kernel panic) for regular OOM path?
>
> yes we are
>
>> We can try mutex_trylock() from dump_unreclaimable_slab() at best.
>> But it is still remaining unsafe, isn't it?
>
> using the trylock sounds like a reasonable compromise.
OK, it sounds we reach agreement on trylock. Will solve those comments
in v9.
Thanks,
Yang
>
Powered by blists - more mailing lists