Re: [PATCH 1/2] xfs: cache dax_device lookup result

2017-08-25 Thread Christoph Hellwig
On Thu, Aug 24, 2017 at 11:24:10PM -0700, Dan Williams wrote: > This would also fix the bug I just realized was in these patches > around matching dax_get_by_host() with put_dax(). In fact, if it's > acceptable to hang a dax_dev off a gendisk then we don't need > dax_get_by_host() at all. I want t

Re: [PATCH 1/2] xfs: cache dax_device lookup result

2017-08-25 Thread Christoph Hellwig
> + bdev = bt->bt_bdev; > + if (!blk_queue_dax(bdev->bd_queue)) > + return NULL; > + > + if (!bt->bt_daxdev) > + bt->bt_daxdev = fs_dax_get_by_host(bdev->bd_disk->disk_name); > + > + return bt->bt_daxdev; Please do this at mount time.

Re: [PATCH 1/2] xfs: cache dax_device lookup result

2017-08-24 Thread Dan Williams
On Thu, Aug 24, 2017 at 10:32 PM, Darrick J. Wong wrote: > On Thu, Aug 24, 2017 at 05:35:48PM -0700, Dan Williams wrote: >> The ->iomap_begin() operation is a hot path, so cache the >> fs_dax_get_by_host() result to avoid the incurring the hash lookup >> overhead. > > Just out of curiosity (and so

Re: [PATCH 1/2] xfs: cache dax_device lookup result

2017-08-24 Thread Darrick J. Wong
On Thu, Aug 24, 2017 at 05:35:48PM -0700, Dan Williams wrote: > The ->iomap_begin() operation is a hot path, so cache the > fs_dax_get_by_host() result to avoid the incurring the hash lookup > overhead. Just out of curiosity (and sorry if this has already been discussed to death and I'm merely ign

[PATCH 1/2] xfs: cache dax_device lookup result

2017-08-24 Thread Dan Williams
The ->iomap_begin() operation is a hot path, so cache the fs_dax_get_by_host() result to avoid the incurring the hash lookup overhead. Cc: "Darrick J. Wong" Reported-by: Christoph Hellwig Signed-off-by: Dan Williams --- fs/xfs/xfs_aops.c | 24 fs/xfs/xfs_aops.h |