On 12/6/18 12:29 PM, Jeff Moyer wrote: > Jens Axboe <axboe@xxxxxxxxx> writes: > >> Plugging is meant to optimize submission of a string of IOs, if we don't >> have more than 2 being submitted, don't bother setting up a plug. > > Is there really that much overhead in blk_{start|finish}_plug? It's not just the overhead of the functions themselves, it's the pointless work we end up doing for no reason at all. Plugging is, by defintion, meant to help batch things up, ammortizing the cost of each individual IO if you have a batch of them. If you don't have a batch, then there's no point. Normally callers of blk_start_plug() don't necessarily know how much IO is coming, but in this case we clearly do. -- Jens Axboe