Message ID | 20151105170145.GB16308@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Awaiting Upstream, archived |
Headers | show |
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
... but I doubt we'll ever bother updating it. Most architectures
with arger page sizes also have iommus and would need different settings
for different iommus vs direct mapping for very little gain. There's a
reason why we never bothered for RDMA either.
On 05.11.2015 [11:58:39 -0800], Christoph Hellwig wrote: > Looks fine, > > Reviewed-by: Christoph Hellwig <hch@lst.de> > > ... but I doubt we'll ever bother updating it. Most architectures > with arger page sizes also have iommus and would need different settings > for different iommus vs direct mapping for very little gain. There's a > reason why we never bothered for RDMA either. Fair enough :) Thanks for all your reviews and comments. -Nish
On 05.11.2015 [11:58:39 -0800], Christoph Hellwig wrote: > Looks fine, > > Reviewed-by: Christoph Hellwig <hch@lst.de> > > ... but I doubt we'll ever bother updating it. Most architectures > with arger page sizes also have iommus and would need different settings > for different iommus vs direct mapping for very little gain. There's a > reason why we never bothered for RDMA either. FWIW, whose tree should this go through? The bug only appears on Power, afaik, but the patch is now just an NVMe change. Thanks, Nish
Jens, Keith: any chance to get this to Linux for 4.4 (and -stable)?
On Thu, Nov 12, 2015 at 11:37:54PM -0800, Christoph Hellwig wrote: > Jens, Keith: any chance to get this to Linux for 4.4 (and -stable)? I agreed, looks good to me. Acked-by: Keith Busch <keith.busch@intel.com>
On Fri, Nov 13, 2015 at 03:08:11PM +0000, Keith Busch wrote: > On Thu, Nov 12, 2015 at 11:37:54PM -0800, Christoph Hellwig wrote: > > Jens, Keith: any chance to get this to Linux for 4.4 (and -stable)? > > I agreed, looks good to me. > > Acked-by: Keith Busch <keith.busch@intel.com> Jens, can you pick this one for -rc2?
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index e878590e71b6..00ca45bb0bc0 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1701,9 +1701,13 @@ static int nvme_configure_admin_queue(struct nvme_dev *dev) u32 aqa; u64 cap = readq(&dev->bar->cap); struct nvme_queue *nvmeq; - unsigned page_shift = PAGE_SHIFT; + /* + * default to a 4K page size, with the intention to update this + * path in the future to accomodate architectures with differing + * kernel and IO page sizes. + */ + unsigned page_shift = 12; unsigned dev_page_min = NVME_CAP_MPSMIN(cap) + 12; - unsigned dev_page_max = NVME_CAP_MPSMAX(cap) + 12; if (page_shift < dev_page_min) { dev_err(dev->dev, @@ -1712,13 +1716,6 @@ static int nvme_configure_admin_queue(struct nvme_dev *dev) 1 << page_shift); return -ENODEV; } - if (page_shift > dev_page_max) { - dev_info(dev->dev, - "Device maximum page size (%u) smaller than " - "host (%u); enabling work-around\n", - 1 << dev_page_max, 1 << page_shift); - page_shift = dev_page_max; - } dev->subsystem = readl(&dev->bar->vs) >= NVME_VS(1, 1) ? NVME_CAP_NSSRC(cap) : 0;