mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] block: blk-tag: Replace GFP_ATOMIC with GFP_KERNEL in __blk_queue_init_tags
Date: Thu, 25 Jan 2018 16:03:36 +0800	[thread overview]
Message-ID: <bfb2759d-0f35-7baf-8637-054a669f01b6@gmail.com> (raw)
In-Reply-To: <7b20dc97-9240-726a-5664-c40c9421ef61@kernel.dk>



On 2018/1/25 11:44, Jens Axboe wrote:
> On 1/24/18 8:38 PM, Jia-Ju Bai wrote:
>> After checking all possible call chains to kmalloc here,
>> my tool finds that kmalloc is never 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.
> These two look OK to me, mostly.

It sounds good :)

> One issue is that blk_queue_init_tags()
> can be used to resize tags, in which case it's called with the
> queue lock held. Nobody is using it like that anymore, though. So I'd
> prefer if you did a v2 of this patch, and include a correction to that
> comment.
>

I am not sure what you mean...

Do you mean that the code in blk_queue_init_tags:
     else if (q->queue_tags) {
         ...
     }
can be deleted?

Or just delete the comment before blk_queue_init_tags?
  * Queue lock must be held here if the function is called to resize an
  * existing map.
  **/

Or add the description "The case that queue lock held is never used" in 
my patches?


Thanks,
Jia-Ju Bai

      reply	other threads:[~2018-01-25  8:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25  3:38 Jia-Ju Bai
2018-01-25  3:44 ` Jens Axboe
2018-01-25  8:03   ` Jia-Ju Bai [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=bfb2759d-0f35-7baf-8637-054a669f01b6@gmail.com \
    --to=baijiaju1990@gmail.com \
    --cc=axboe@kernel.dk \
    --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

all inboxes | Powered by JetHome®