On Mon, Aug 11, 2014 at 10:34:23AM -0400, Theodore Ts'o wrote: > On Sun, Aug 10, 2014 at 11:31:20PM -0700, Darrick J. Wong wrote: > > > > Hmm, I'll try that, though I'm almost tempted just to issue io_cache_readahead > > calls directly from the for loop. The only reason I'm using the list here at > > all is to handle the case of reading multiple groups in a flexbg (pass5 RA). > > In that case you could just use an accumulator for each of the block > and inode bitmaps, and so long as the next group's block and inode > bitmaps are contiguous with the previous one, you can bump a counter. > Once you reach a discontiguous bitmap block, you can issue a single > readahead request for N blocks starting at block B. That way you only > issue a single syscall, instead of one for every single block, and you > don't have the overhead involved with storing the list of blocks and > then sorting them. Using the bitmap turns out to be pretty quick (~130us to start RA for 4 groups vs. ~70us per group if I issue the RA directly). Each fadvise call seems to cost us ~1ms, so I'll keep using the bitmap to minimize the number of fadvise calls, since it's also a lot less code. --D > > - Ted > -- > 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 -- 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