Skip to content

radix-tree: fix writeback livelock avoidance code

Dave Chinner linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2radix-tree: clear all tags in radix_tree_node_rcu_freelib/radix-tree.c+4 -22 replies
2/2radix-tree: radix_tree_range_tag_if_tagged() can set incorrect tagslib/radix-tree.c+44 -132 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchNick PigginJan Kara
1/2A-b A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] radix-tree: fix writeback livelock avoidance code

The following two patches fix bugs in the new radix tree functionality used to implement the writeback livelock avoidance code. Both bugs manifest themselves as stray PAGECACHE_TAG_TOWRITE tags in the mapping->page_tree radix tree resulting in livelocks during tag lookups. More subtly, they also appear to result in writeback tree walks occasionally terminating early and so not actually writing all the pages they are supposed to.

Please review and test - these are pretty serious problems for the writeback code.

I've been reproducing the problems with xfstests test 013 using 2.6.36-rc1 and a bunch of new XFS patches that worked just fine on 2.6.35. The XFS tree that demonstrates the problem is available here:

git://git.kernel.org/pub/scm/linux/kernel/git/dgc/xfsdev.git for-oss

and the two patches following this mail make the problem go away. They are also available in this branch here:

git://git.kernel.org/pub/scm/linux/kernel/git/dgc/xfsdev.git radix-tree

Dave Chinner (2):
radix-tree: clear all tags in radix_tree_node_rcu_free
radix-tree: radix_tree_range_tag_if_tagged() can set incorrect tags

 lib/radix-tree.c |   63 +++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 48 insertions(+), 15 deletions(-)