Andrew,
Here is update to the wb_rwsema patch that adds back the trylock.
It avoids the hang hugh was seeing by setting encountered_congestion
if the trylock fails and checking it in sync_sb_inodes(). Hugh
tested this and did not see the hang.
This prevents non-sync writebacks to from blocking behind sync
writebacks.
This patch applies to 2.6.4-rc1-mm2.
Thoguhts?
Daniel
Daniel McNeil <[email protected]> wrote:
>
> Here is update to the wb_rwsema patch that adds back the trylock.
> It avoids the hang hugh was seeing by setting encountered_congestion
> if the trylock fails and checking it in sync_sb_inodes(). Hugh
> tested this and did not see the hang.
>
> This prevents non-sync writebacks to from blocking behind sync
> writebacks.
>
> This patch applies to 2.6.4-rc1-mm2.
>
> Thoguhts?
spose so. One concern is with writer throttling: if the caller of write(2)
is simply skipping a large file then it should throttle in
balance_dirty_pages() or block on i_sem I guess. This code is getting
pretty sticky.
Why are you setting wbc->encountered_congestion in sync_sb_inodes()?
And why are you doing a trylock in __filemap_fdatawrite()? That only
affects fadvise(), and probably we want to block in there anyway. It
doesn't matter really but less code is better code.