Re: [PATCH 24/32] dlm: dlm workqueues aren't used in memoryreclaim path

From: Tejun Heo
Date: Mon Jan 03 2011 - 09:55:37 EST


Hello,

On Mon, Jan 03, 2011 at 02:39:19PM +0000, Steven Whitehouse wrote:
> No, the issue arises in case an inode is being ejected from cache with a
> 0 link count (and this need deallocation). At this point the dlm is
> required in order to coordinate which node will perform the
> deallocation, but if it blocks on memory reclaim (via the fs, so
> GFP_NOFS is ok, but GFP_KERNEL is not) then it can land up calling back
> into the fs via a shrink of the dcache which can potentially then also
> call back into the dlm.

I see. Thanks for the explanation.

> Since there is no workqueue option to indicate that GFP_NOFS is ok, but
> GFP_KERNEL is not, I think in the workqueue case we must mark it as
> WQ_MEM_RECLAIM. So far as I can tell thats a limitation of task creation
> which was the reason for the pre-allocated rescuer thread. I'd rather be
> safe than sorry in this case,

Yeap, in such case, WQ_MEM_RECLAIM seems like the right choice. It
may call into GFP_KERNEL path again, but the dependency chain isn't
hard. It will be broken pretty soon and rescuer will kick in.

As the case is rather special, it might be a good idea to explain why
WQ_MEM_RECLAIM is necessary for future references?

Thank you.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/