Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1261508

Re: [PATCH 1/1 v3] drivers/nvme: default to 4k device page size

From Keith Busch <keith.busch@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1 v3] drivers/nvme: default to 4k device page size
Date 2015-11-03 14:50 +0100
Message-ID <qqK8j-3mL-21@gated-at.bofh.it> (permalink)
References (5 earlier) <qoU26-89o-11@gated-at.bofh.it> <qoXMn-26W-25@gated-at.bofh.it> <qoZbt-386-21@gated-at.bofh.it> <qppyW-2yK-3@gated-at.bofh.it> <qqJFh-3bL-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Nov 03, 2015 at 05:18:24AM -0800, Christoph Hellwig wrote:
> On Fri, Oct 30, 2015 at 02:35:11PM -0700, Nishanth Aravamudan wrote:
> > diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
> > index ccc0c1f93daa..a9a5285bdb39 100644
> > --- a/drivers/block/nvme-core.c
> > +++ b/drivers/block/nvme-core.c
> > @@ -1717,7 +1717,12 @@ 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;
> 
> Looks good as a start.  Note that all the MPSMIN/MAX checking could
> be removed as NVMe devices must support 4k pages.

MAX can go, and while it's probably the case that all devices support 4k,
it's not a spec requirement, so we should keep the dev_page_min check.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/1 v3] drivers/nvme: default to 4k device page size Christoph Hellwig <hch@infradead.org> - 2015-11-03 14:20 +0100
  Re: [PATCH 1/1 v3] drivers/nvme: default to 4k device page size Keith Busch <keith.busch@intel.com> - 2015-11-03 14:50 +0100
    [PATCH 1/1 v4] drivers/nvme: default to 4k device page size Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-11-05 18:10 +0100
      Re: [PATCH 1/1 v4] drivers/nvme: default to 4k device page size Christoph Hellwig <hch@infradead.org> - 2015-11-05 21:00 +0100
        Re: [PATCH 1/1 v4] drivers/nvme: default to 4k device page size Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-11-05 23:00 +0100
        Re: [PATCH 1/1 v4] drivers/nvme: default to 4k device page size Nishanth Aravamudan <nacc@linux.vnet.ibm.com> - 2015-11-06 17:20 +0100
        Re: [PATCH 1/1 v4] drivers/nvme: default to 4k device page size Christoph Hellwig <hch@infradead.org> - 2015-11-13 08:40 +0100
          Re: [PATCH 1/1 v4] drivers/nvme: default to 4k device page size Keith Busch <keith.busch@intel.com> - 2015-11-13 16:10 +0100

csiph-web