On Mon, Dec 16, 2013 at 01:26:26PM -0500, Josef Bacik wrote: > I need to create a fake tree to test qgroups and I don't want to have to setup a > fake btree_inode. The fact is we only use the radix tree for the fs_info, so > everybody else who allocates an extent_io_tree is just wasting the space anyway. > This patch moves the radix tree and its lock into btrfs_fs_info so there is less > stuff I have to fake to do qgroup sanity tests. Thanks, This would make the fs_info::buffer_lock a global hotspot if alloc_extent_buffer and release_extent_buffer are called frequently. But, you can get rid of the buffer_lock completely, because the radix tree can be safely protected by rcu_read_lock/_unlock: * alloc_extent_buffer uses radix_preload that turns off preepmtion by itself, so the lock here would be pointless * release_extent_buffer locks around radix_tree_delete, here a rcu locking will be ok as well * radix_tree_lookup(buffer_tree) is done in rcu section already I'm ok with this patch as an incremental change, replacing the locks with RCU is trivial but I'd rather take a conservative approach should we need to bisect that someday. David "I should not send RCU comments at 2 a.m." Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
