From: Christoph Hellwig <hch@lst.de>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: Christoph Hellwig <hch@lst.de>,
linux-kernel@vger.kernel.org, target-devel@vger.kernel.org,
linux-scsi@vger.kernel.org, james.smart@broadcom.com,
martin.petersen@oracle.com
Subject: Re: [PATCH -next] scsi: efct: Use GFP_ATOMIC under spin lock
Date: Mon, 10 Jan 2022 09:54:41 +0100 [thread overview]
Message-ID: <20220110085441.GB6124@lst.de> (raw)
In-Reply-To: <44ff658e-4a00-ee5b-1f84-fa89f9b9291f@huawei.com>
On Thu, Dec 23, 2021 at 11:56:08AM +0800, Yang Yingliang wrote:
>
> On 2021/12/21 22:28, Christoph Hellwig wrote:
>> On Tue, Dec 21, 2021 at 07:37:06PM +0800, Yang Yingliang wrote:
>>> A spin lock is taken here so we should use GFP_ATOMIC.
>>>
>>> Fixes: efac162a4e4d ("scsi: efct: Don't pass GFP_DMA to dma_alloc_coherent()")
>> No, it does not fix that commit. The driver did sleeping allocations
>> even before the commit.
>>
>> But wher is "here"? Can we look into not holding that lock over an
>> allocation if it is preferable? If not we should at least pass down
>> the gfp_flags so that only the caller(s) that can't sleep pass GFP_ATOMIC.
>
> According the comment of els_ios_lock, it's used to protect els ios list, I
> think we
>
> can move down the spin lock like this:
This looks sensible to me. Please submit it to the maintainer as a proper
patch.
prev parent reply other threads:[~2022-01-10 8:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 11:37 [PATCH -next] scsi: efct: Use GFP_ATOMIC under spin lock Yang Yingliang
2021-12-21 14:28 ` Christoph Hellwig
2021-12-23 3:56 ` Yang Yingliang
2022-01-10 8:54 ` Christoph Hellwig [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=20220110085441.GB6124@lst.de \
--to=hch@lst.de \
--cc=james.smart@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=target-devel@vger.kernel.org \
--cc=yangyingliang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.