[PATCH 4.15-rc 1/3] nvme-core: Don't set nvme_wq as MEM_RECLAIM

Christoph Hellwig hch at infradead.org
Thu Dec 21 05:00:02 PST 2017


On Thu, Dec 21, 2017 at 12:41:30PM +0200, Sagi Grimberg wrote:
> AFAIK, WQ_MEM_RECLAIM means that this workqueue can be drained
> for memory reclaim, which means that a workqueue that hosts works
> that are allocating memory cannot be such a workqueue.

No.  WQ_MEM_RECLAIM means it has a dededicated rescuer execution
thread and is guaranteed to make forward progress even under grave
memory pressure.

> How does this patch make reset not work in memory reclaim? memory
> reclaim will drain workqueues that *are* reclaimable workqueues.

Without WQ_MEM_RECLAIM we might not be able to execute the reset
due to the overhead of starting a new helper thread to execute it.

> > So instead we'll need to make sure whatever memory allocation required
> > (which ones, btw?) are marked GFP_NOIO.
> 
> namespace scannig can allocate new namespaces.

Ok, makes sense.



More information about the Linux-nvme mailing list