On Thu, Jan 31, 2013 at 06:05:43PM +0100, Jan Kara wrote: > On Thu 31-01-13 13:17:55, Zheng Liu wrote: > > From: Zheng Liu <wenqing.lz@xxxxxxxxxx> > > > > Single extent cache could be removed because we have extent status tree > > as a extent cache, and it would be better. > Just one note: The original extent cache has a capability of containing > information "there's a hole in range x-y" so we don't have to walk the tree > again only to find there's nothing for given block. It might be useful to > put this extent type in extent status tree as well for caching purposes... Yes, when I removed extent cache, I hesitated whether or not a new status for a hole is added because that might occupies too much memory. Let me consider what happens after adding this status. If we have a fragmented file that has 2048 extents, we will cost double spaces to track these holes in memory when a grep(1) is run. *But* now I think maybe you are right because extent status tree has ability to reclaim memory when we are under a high memory pressure. Meanwhile tracking all holes for a file let us avoid to walk the extent tree in disk. FWIW, I revise the patch (ext4: Remove bogus wait for unwritten extents in ext4_ind_direct_IO) and I have an idea that let us not flush unwritten io using extent status tree, and I will try it. Thanks, - Zheng -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html