On Wed, Mar 27, 2019 at 08:25:17AM -0700, Tejun Heo (tj@xxxxxxxxxx) wrote: > Hello, > > On Tue, Mar 26, 2019 at 08:55:09PM +0000, Marciniszyn, Mike wrote: > > The latter is the ipoib wq that conflicts with our non-WQ_MEM_RECLAIM. This seems excessive and pretty gratuitous. > > > > Tejun, what does "mem reclaim" really mean and when should it be used? > > That it may be depended during memory reclaim. > > > I was assuming that since we are freeing QP kernel memory held by user mode programs that could be oom killed, we need the flag. > > If it can't block memory reclaim, it doesn't need the flag. Just in > case, if a workqueue is used to issue block IOs, it is depended upon > for memory reclaim as writeback and swap-outs are critical parts of > memory reclaim. But the comments seem to indicate WQ_MEM_RECLAIM is to guarentee forward progress in cases when GFP_KERNEL allocations will block, by avoiding an allocation. So, is it OK for a WQ entry on a WQ_MEM_RECLAIM queue to call kmalloc(GFP_KERNEL) ? Jason