Hi all, This is a continuation of the sync efficiency fix originally from Dave Chinner and resurrected by Josef Bacik. The last version posted (by Josef) is referenced below. My understanding is that it wasn't merged along with the rest of that patchset as cgroup aware writeback (cgaw) had just been merged and conflicts prevented this from going in. After addressing those conflicts, testing had resulted in a lockdep splat that had shown the locking for the new list was not quite correct. Further discussion with Jan K. called out possible race issues between partitions of the same backing dev. Jan suggested to use a per-superblock list rather than a per-bdi list to avoid the race and minimize unnecessary complexity due to the cgaw stuff. In summary, this patch updates the previous version to use the per-sb list rather than the per-bdi list. The locking is updated to use an irq-safe lock for the wb list, to piggy back off of the existing s_inode_list_lock to gain inode references and to otherwise explicitly try to handle any races between sync and writeback completion to keep the list coherent with the mapping state. The lazy list removal has been dropped as IIUC this was originally added to mitigate locking complexity, but that didn't exactly work out, as noted above. I'm still not 100% sure that the locking is sane, but it passes my spot testing so far without any explosions or lockdep splats... Thoughts, reviews, flames appreciated. Brian v5: - Converted from per-bdi list to per-sb list. Also marked as RFC and dropped testing/review tags. - Updated to use new irq-safe lock for wb list. - Dropped lazy list removal. Inodes are removed when the mapping is cleared of the writeback tag. - Tweaked wait_sb_inodes() to remove deferred iput(), other cleanups. - Added wb list tracepoint patch. v4: http://marc.info/?l=linux-fsdevel&m=143511628828000&w=2 Brian Foster (1): wb: inode writeback list tracking tracepoints Dave Chinner (1): sb: add a new writeback list for sync fs/block_dev.c | 1 + fs/fs-writeback.c | 148 ++++++++++++++++++++++++++++++++------- fs/inode.c | 1 + fs/super.c | 2 + include/linux/fs.h | 4 ++ include/linux/writeback.h | 3 + include/trace/events/writeback.h | 22 ++++-- mm/page-writeback.c | 19 +++++ 8 files changed, 171 insertions(+), 29 deletions(-) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html