On Tue, Feb 17, 2009 at 10:09:41AM +0100, Peter Zijlstra wrote: > On Tue, 2009-02-17 at 01:43 +0300, Edward Shishkin wrote: > > > > How much performance gain do you see by avoiding that radix tree op? > > > > > > > Nop. We want to use it with extended semantics. > > All dirty pages are divided into 2 categories: > > > > A) tagged in the radix tree (with PAGECACHE_TAG_DIRTY). > > B) captured by atoms (usual linked lists). > > > > reiser4_writepages() looks for pages of "A" in the radix tree > > and moves them to "B". set_page_dirty_notag(), introduced by > > my patch, is needed for pages of "B". > > > > If "B" is empty, then we get the traditional semantics with > > regular ->writepages(). > > > > That's all! > > Ah, indeed. I had not considered such a scheme. It is a great shame that filesystems are not properly notified that a page may become dirty before the actual set_page_dirty event (which is not allowed to fail and is called after the page is already dirty). This is a big problem I have with fsblock simply in trying to make the memory allocation robust. page_mkwrite unfortunately is racy and I've fixed problems there... the big problem though is get_user_pages. Fixing that properly seems to require fixing callers so it is not really realistic in the short term. As such... > > Add set_page_dirty_notag() to the core library to enable > > extended functionality of radix tree attached to inode->i_mapping. > > > > Signed-off-by: Edward Shishkin<edward.shishkin@xxxxxxxxx> > > Looks good to me > > Acked-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> I'm fine with it too. Acked-by: Nick Piggin <npiggin@xxxxxxx> You know... it wouldn't be terribly painful to introduce a new pagecache radix tree tag for filesystem private use (doesn't bloat the radix tree node size) if there is a strong need for it. But if you have this workaround then I think it is also reasonable. -- To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html