From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Jia-Ju Bai <baijiaju1990@gmail.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: blk-mq-sched: Replace GFP_ATOMIC with GFP_KERNEL in blk_mq_sched_assign_ioc
Date: Thu, 25 Jan 2018 13:29:38 +0800 [thread overview]
Message-ID: <20180125052937.GA21712@ming.t460p> (raw)
In-Reply-To: <7a1809ce-c456-0d53-4d3b-2368fb19bfd8@kernel.dk>
On Wed, Jan 24, 2018 at 08:34:14PM -0700, Jens Axboe wrote:
> On 1/24/18 7:46 PM, Jia-Ju Bai wrote:
> > The function ioc_create_icq here is not called in atomic context.
> > Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL.
> >
> > This is found by a static analysis tool named DCNS written by myself.
>
> But it's running off the IO submission path, so by definition the GFP
> mask cannot include anything that will do IO. GFP_KERNEL will make
> it deadlock prone.
>
> It could be GFP_NOIO, but that's also overlooking the fact that we can
> have preemption disabled here.
We have REQ_NOWAIT request too, so GFP_NOIO isn't OK too.
--
Ming
prev parent reply other threads:[~2018-01-25 5:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 2:46 [PATCH] block: blk-mq-sched: Replace GFP_ATOMIC with GFP_KERNEL in blk_mq_sched_assign_ioc Jia-Ju Bai
2018-01-25 2:58 ` Al Viro
2018-01-25 3:13 ` Jia-Ju Bai
2018-01-25 4:16 ` Al Viro
2018-01-25 7:52 ` Jia-Ju Bai
2018-01-25 3:34 ` Jens Axboe
2018-01-25 3:40 ` Jia-Ju Bai
2018-01-25 5:29 ` Ming Lei [this message]
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=20180125052937.GA21712@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=baijiaju1990@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).