lkml.org 
[lkml]   [2019]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] deadlock with flush_work() in UAS
Hello,

On Tue, Jun 18, 2019 at 11:59:39AM -0400, Alan Stern wrote:
> > > Even if you disagree, perhaps we should have a global workqueue with a
> > > permanently set noio flag. It could be shared among multiple drivers
> > > such as uas and the hub driver for purposes like this. (In fact, the
> > > hub driver already has its own dedicated workqueue.)
> >
> > That is a good idea. But does UAS need WQ_MEM_RECLAIM?
>
> These are good questions, and I don't have the answers. Perhaps Tejun
> or someone else on LKML can help.

Any device which may host a filesystem or swap needs to use
WQ_MEM_RECLAIM workqueues on anything which may be used during normal
IOs including e.g. error handling which may be invoked. One
WQ_MEM_RECLAIM workqueue guarantees one level of concurrency for all
its tasks regardless of memory situation, so as long as there's no
interdependence between work items, the workqueue can be shared.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2019-06-20 16:10    [W:0.084 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site