On Wed, Sep 13, 2017 at 05:51:55PM +0200, David Sterba wrote: > On Mon, Aug 21, 2017 at 03:49:59PM -0600, Liu Bo wrote: > > We have started plug in btrfs_write_and_wait_marked_extents() but the > > generated IOs actually go to device's schedule IO list where the work > > is doing in another task, thus the started plug doesn't make any > > sense. > > > > And since we wait for IOs immediately after writing meta blocks, it's > > the same case as writing log tree, doing sync submit can merge more > > IOs. > > > > Signed-off-by: Liu Bo <bo.li.liu@xxxxxxxxxx> > > Reviewed-by: David Sterba <dsterba@xxxxxxxx> > > The original patch c6adc9cc082e3 adds too many randomly scattered > blg_plugs that, we could use some high-level comments about the purpose. The commit log of that patch wasn't explaining well why the old way is not efficient, in most cases, cow'd metadata blocks in the log tree and the log root tree are contiguous on disk, so putting a blk_plug pair can merge writes on those meta blocks so that we could get better performance out of it. And yes, adding comments mentioning the reason will be helpful. Thanks, -liubo -- 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
