On Wed, Jun 05, 2019 at 05:12:10PM +0200, Christoph Hellwig wrote: > On Tue, Jun 04, 2019 at 04:24:42PM +1000, Dave Chinner wrote: > > > @@ -1258,7 +1192,7 @@ xfs_buf_ioend_async( > > > struct xfs_buf *bp) > > > { > > > INIT_WORK(&bp->b_ioend_work, xfs_buf_ioend_work); > > > - queue_work(bp->b_ioend_wq, &bp->b_ioend_work); > > > + queue_work(bp->b_target->bt_mount->m_buf_workqueue, &bp->b_ioend_work); > > > } > > > > It'd be nice to keep bp->b_ioend_wq to avoid pointer chasing here. > > Perhaps we could set it up in _xfs_buf_alloc() where we are pretty > > much guaranteed to have the xfs_mount hot in cache, and then it's > > set for the life of the buffer. Just a thought, but either way: > > We'd need to benchmark this particular case, but the bloat to > the xfs_buf structure probably cancels out at least one pointer > dereference. That being said we probably could at least remove > one indirection without bloating the buf, I'll take a look at that. FWIW, I already plan to move the buf workqueue to the xfs_buftarg so maybe that's the way to go here... Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx