From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
To: Chunyu Hu <chuhu@redhat.com>
Cc: mhocko@suse.com, malat@debian.org, dvyukov@google.com,
linux-mm@kvack.org, catalin marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH] kmemleak: don't use __GFP_NOFAIL
Date: Tue, 29 May 2018 22:46:59 +0900 [thread overview]
Message-ID: <f3d58cbd-29ca-7a23-69e0-59690b9cd4fb@i-love.sakura.ne.jp> (raw)
In-Reply-To: <1126233373.5118805.1527600426174.JavaMail.zimbra@redhat.com>
On 2018/05/29 22:27, Chunyu Hu wrote:
>>> I am not really familiar with the kmemleak code but the expectation that
>>> you can make a forward progress in an unknown allocation context seems
>>> broken to me. Why kmemleak cannot pre-allocate a pool of object_cache
>>> and refill it from a reasonably strong contexts (e.g. in a sleepable
>>> context)?
>>
>> Or, we can undo the original allocation if the kmemleak allocation failed?
>
> If so, you are making kmemleak a fault injection trigger. But the original
> purpose for adding GFP_NOFAIL[2] is just for making kmemleak avoid fault injection.
> (discussion in [1])
I don't think that applying fault injection to kmemleak allocations is bad
(except that fault injection messages might be noisy).
>
> I'm trying with per task way for fault injection, and did some tries. In my
> try, I removed this from NOFAIL kmemleak and kmemleak survived with the per
> task fault injection helper (disable/enable of task). Maybe I can send another
> RFC for the api.
You could carry __GFP_NO_FAULT_INJECTION using per "struct task_struct" flag.
But I think that undoing the original allocation if the kmemleak allocation failed
has an advantage that it does not disable kmemleak when the system is under memory
pressure (i.e. about to invoke the OOM killer); allowing us to test memory pressure
conditions.
next prev parent reply other threads:[~2018-05-29 16:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-26 7:14 WARNING: CPU: 0 PID: 21 at ../mm/page_alloc.c:4258 __alloc_pages_nodemask+0xa88/0xfec Mathieu Malaterre
2018-05-28 8:34 ` Michal Hocko
2018-05-28 13:05 ` [PATCH] kmemleak: don't use __GFP_NOFAIL Tetsuo Handa
2018-05-28 13:24 ` Michal Hocko
2018-05-28 21:05 ` Tetsuo Handa
2018-05-29 13:27 ` Chunyu Hu
2018-05-29 13:46 ` Tetsuo Handa [this message]
2018-05-30 9:35 ` Chunyu Hu
2018-05-30 10:46 ` Michal Hocko
2018-05-30 11:42 ` Chunyu Hu
2018-05-30 12:38 ` Michal Hocko
2018-05-31 10:51 ` Chunyu Hu
2018-05-31 11:35 ` Michal Hocko
2018-05-31 12:28 ` Chunyu Hu
2018-05-31 15:22 ` Catalin Marinas
2018-05-31 18:41 ` Michal Hocko
2018-06-01 1:50 ` Chunyu Hu
2018-06-01 4:53 ` Chunyu Hu
2018-06-04 8:41 ` Dmitry Vyukov
2018-06-04 12:42 ` Michal Hocko
2018-06-04 15:08 ` Catalin Marinas
2018-06-04 15:36 ` Dmitry Vyukov
2018-06-04 16:41 ` Catalin Marinas
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=f3d58cbd-29ca-7a23-69e0-59690b9cd4fb@i-love.sakura.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=catalin.marinas@arm.com \
--cc=chuhu@redhat.com \
--cc=dvyukov@google.com \
--cc=linux-mm@kvack.org \
--cc=malat@debian.org \
--cc=mhocko@suse.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