xfs
[Top] [All Lists]

set_buffer_dirty_uptodate

To: linux-xfs@xxxxxxxxxxx
Subject: set_buffer_dirty_uptodate
From: Marcelo Tosatti <marcelo@xxxxxxxxxxxxxxxx>
Date: Sun, 17 Dec 2000 23:34:25 -0200 (BRST)
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi, 

I was looking at the pagebuf code while I noted that
set_buffer_dirty_uptodate (pagebuf/page_buf_io.c:1188) may sleep waiting
for bdflush to clean some dirty buffers because it calls balance_dirty().

set_buffer_dirty_update is called by functions which are part of the XFS's
writepage codepath, which basically starts at linvfs_write_full_page
(xfs/linux/xfs_iops.c).

The issue is that linvfs_write_full_page() is taking a vnode lock before
going through this codepath, meaning that it can sleep waiting for bdflush
while holding this lock which seems to be unecessary.

If this "vnode lock" suffers from contention because processes sleep while
holding it, we can fix it by calling balance_dirty() _after_ we drop the
vnode lock.

In practice, this vnode lock is a being used concurrently by a lot of
users?

Thanks!


<Prev in Thread] Current Thread [Next in Thread>