Re: [PATCH for-rc 1/5] IB/hfi1: Fix WQ_MEM_RECLAIM warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, Doug.

On Wed, May 01, 2019 at 10:44:31AM -0400, Doug Ledford wrote:
> The discussion is helpful, but we still need to decide on the patch:
> 
> Correct me if I'm wrong Tejun, but the key issues are:
> 
> All WQ_MEM_RECLAIM work queues are eligible to be run when the machine
> is under extreme memory pressure and attempting to reclaim memory.  That
> means that the workqueue:
> 
> 1) MUST not perform any GFP_ATOMIC allocations as this could deadlock

GFP_ATOMIC or GFP_NOIO allocations are fine as they wouldn't block on
reclaim recursively; however, they can and will fail under severe
memory pressure.

> 2) SHOULD not rely on any GFP_KERNEL allocations as these may fail

Absolutely not, but not because they may fail but because it can end
up creating a waiting loop.

> 3) MUST complete without blocking

Blocking is fine as long as that blocking isn't memory bound.

> 4) SHOULD ideally always make some sort of forward progress if at all
> possible without needing memory allocations to do so

Yes, this is the only requirement.  All restrictions stem from this
one.

Thanks.

-- 
tejun



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux