On Thu, Jun 03, 2010 at 09:02:09AM +1000, Dave Chinner wrote:
> Did you skip it unconditionally, or only when a transaction was
xfs_vm_releasepage is mostly a no-op if no transaction is required.
If we have neither delalloc nor unwritten buffer we do not actually
enter xfs_page_state_convert, and ->releasepage also doesn't touch
unampped buffers at all.
> The scary part is that I've seen stack traces (i.e. most stack used)
> through this reclaim path for delalloc conversion even for
> allocations that are GFP_NOFS and the only thing saving us from
> deadlocks is th PF_FSTRANS check. Even worse is that
> shrinker_page_list() will call try_to_release_pages() without
> checking whether it's allowed to enter the filesystem or not, so we
> can be doing block allocation in places we've specifically told the
> memory allocation subsystem not to....
shrink_page_list takes the gfp_mask for try_to_release_page from
the scan_control structure passed to it from all the top of the long
callchain. I can't find anobvious bug, but this could cause a lot