Re: [PATCH 2.6.3-mm4] writeback trylock patch

From: Andrew Morton
Date: Fri Mar 05 2004 - 20:04:06 EST


Daniel McNeil <daniel@xxxxxxxx> 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.


-
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/