From: Oliver Neukum <oneukum@suse.com>
To: Alan Stern <stern@rowland.harvard.edu>,
Christoph Hellwig <hch@infradead.org>
Cc: Jaewon Kim <jaewon31.kim@gmail.com>,
linux-mm@kvack.org, gregkh@linuxfoundation.org,
Jaewon Kim <jaewon31.kim@samsung.com>,
m.szyprowski@samsung.com, ytk.lee@samsung.com,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [RFC PATCH] usb: host: xhci: allow __GFP_FS in dma allocation
Date: Tue, 21 May 2019 15:11:31 +0200 [thread overview]
Message-ID: <1558444291.12672.23.camel@suse.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1905201011490.1498-100000@iolanthe.rowland.org>
On Mo, 2019-05-20 at 10:16 -0400, Alan Stern wrote:
> On Mon, 20 May 2019, Christoph Hellwig wrote:
>
> > GFP_KERNEL if you can block, GFP_ATOMIC if you can't for a good reason,
> > that is the allocation is from irq context or under a spinlock. If you
> > think you have a case where you think you don't want to block, but it
> > is not because of the above reasons we need to have a chat about the
> > details.
>
> What if the allocation requires the kernel to swap some old pages out
> to the backing store, but the backing store is on the device that the
> driver is managing? The swap can't take place until the current I/O
> operation is complete (assuming the driver can handle only one I/O
> operation at a time), and the current operation can't complete until
> the old pages are swapped out. Result: deadlock.
>
> Isn't that the whole reason for using GFP_NOIO in the first place?
Hi,
lookig at this it seems to me that we are in danger of a deadlock
- during reset - devices cannot do IO while being reset
covered by the USB layer in usb_reset_device
- resume & restore - devices cannot do IO while suspended
covered by driver core in rpm_callback
- disconnect - a disconnected device cannot do IO
is this a theoretical case or should I do something to
the driver core?
How about changing configurations on USB?
Regards
Oliver
next prev parent reply other threads:[~2019-05-21 13:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-17 16:02 [RFC PATCH] usb: host: xhci: allow __GFP_FS in dma allocation Jaewon Kim
2019-05-17 16:34 ` Matthew Wilcox
2019-05-18 1:53 ` Jaewon Kim
2019-05-20 5:56 ` Christoph Hellwig
2019-05-20 9:09 ` Oliver Neukum
2019-05-20 10:12 ` Christoph Hellwig
2019-05-20 14:16 ` Alan Stern
2019-05-20 14:23 ` Christoph Hellwig
2019-05-21 8:54 ` Oliver Neukum
2019-05-21 13:27 ` Christoph Hellwig
2019-05-21 13:11 ` Oliver Neukum [this message]
2019-05-21 14:00 ` Alan Stern
2019-05-22 6:31 ` Oliver Neukum
2019-05-22 14:56 ` Alan Stern
2019-05-22 20:47 ` Oliver Neukum
2019-05-23 14:01 ` Alan Stern
2019-05-28 12:34 ` Oliver Neukum
2019-05-28 14:25 ` Alan Stern
2019-05-23 12:32 ` Oliver Neukum
2019-05-23 16:35 ` Christoph Hellwig
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=1558444291.12672.23.camel@suse.com \
--to=oneukum@suse.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=jaewon31.kim@gmail.com \
--cc=jaewon31.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=stern@rowland.harvard.edu \
--cc=ytk.lee@samsung.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.