On Mon 04-07-16 11:20:43, Ted Tso wrote: > On Mon, Jul 04, 2016 at 04:00:12PM +0200, Jan Kara wrote: > > OK, but we do all the block mappings, page locking etc. while the handle is > > started so it is not exactly a really short lived handle. The patch adds > > there a submission of a bio (we have the IO plugged so it will just add the > > bio to the list of submitted bios), unlock locked pages, drop refcount to > > ioend (unless IO is already completed, only refcount update is done, if IO > > is completed we defer any real work to workqueue anyway). So although we > > add some work which is done while the handle is still running, it is not > > that much. > > Good point that the block device is plugged. Ultimately I suspect the > way to fix the scalability problem will be move to dioread nolock as > the default, and use separate transaction to map the blocks using the > uninitialized flags, and then do a separate transaction to convert > them afterwards. This is what already happens currently - we only reserve a handle for conversion during writeback but that reservation fluently moves between running transactions until a point where the reserved handle is started - then the handle is pinned to the currently running transaction - and this happens only in the completion handler after IO is completed. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR -- 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