linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Gaël PORTAY" <gael.portay@collabora.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-mm@kvack.org, usb-storage@lists.one-eyed-alien.net
Subject: Re: [usb-storage] Re: cma: deadlock using usb-storage and fs
Date: Mon, 17 Dec 2018 13:29:22 -0500	[thread overview]
Message-ID: <20181217182922.bogbrhjm6ubnswqw@archlinux.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1812171038300.1630-100000@iolanthe.rowland.org>

Alan,

On Mon, Dec 17, 2018 at 10:45:17AM -0500, Alan Stern wrote:
> On Sun, 16 Dec 2018, Ga�l PORTAY wrote:
> ...
>
> > The second task wants to writeback/flush the pages through USB, which, I
> > assume, is due to the page migration. The usb-storage triggers a CMA allocation
> > but get locked in cma_alloc since the first task hold the mutex (It is a FAT
> > formatted partition, if it helps).
> > 
> > 	usb-storage     D    0   349      2 0x00000000
> > 	Backtrace: 
> ...
> > 	[<bf1c7550>] (usb_sg_wait [usbcore]) from [<bf2bd618>] (usb_stor_bulk_transfer_sglist.part.2+0x80/0xdc [usb_storage]) r9:0001e000 r8:eca594ac r7:0001e000 r6:c0008200 r5:eca59514 r4:eca59488
> 
> It looks like there is a logical problem in the CMA allocator.  The
> call in usb_sg_wait() specifies GFP_NOIO, which is supposed to prevent
> allocations from blocking on any I/O operations.  Therefore we
> shouldn't be waiting for the CMA mutex.
> 

Right.

> Perhaps the CMA allocator needs to drop the mutex while doing 
> writebacks/flushes, or perhaps it needs to be reorganized some other 
> way.  I don't know anything about it.
> 
> Does the CMA code have any maintainers who might need to know about 
> this, or is it all handled by the MM maintainers?

I did not find maintainers neither for CMA nor MM.

That is why I have sent this mail to mm mailing list but to no one in
particular.

> 
> Alan Stern
> 

Thanks.

Regards,
Gael

  reply	other threads:[~2018-12-17 18:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-16 22:21 Gaël PORTAY
2018-12-17 15:45 ` Alan Stern
2018-12-17 18:29   ` Gaël PORTAY [this message]
2018-12-17 21:57     ` [usb-storage] " Laura Abbott
2018-12-18 19:42       ` Mike Kravetz
2018-12-18 21:14         ` Laura Abbott
2018-12-27 19:29           ` Gaël PORTAY
2018-12-27 19:29             ` Gaël PORTAY
2019-01-07 18:13           ` Gaël PORTAY
2019-01-07 18:13             ` Gaël PORTAY
2019-01-08  2:06             ` Mike Kravetz
2019-01-11 13:55               ` Gaël PORTAY
2019-01-11 13:55                 ` Gaël PORTAY
2019-01-14 23:47                 ` Mike Kravetz
2019-01-03 18:54       ` Gaël PORTAY
2019-01-03 21:56         ` Gaël PORTAY
2019-01-03 21:56           ` Gaël PORTAY

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=20181217182922.bogbrhjm6ubnswqw@archlinux.localdomain \
    --to=gael.portay@collabora.com \
    --cc=linux-mm@kvack.org \
    --cc=stern@rowland.harvard.edu \
    --cc=usb-storage@lists.one-eyed-alien.net \
    /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