[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151103131824.GA12232@infradead.org>
Date: Tue, 3 Nov 2015 05:18:24 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Nishanth Aravamudan <nacc@...ux.vnet.ibm.com>
Cc: "Busch, Keith" <keith.busch@...el.com>, aik@...abs.ru,
linux-kernel@...r.kernel.org, linux-nvme@...ts.infradead.org,
Christoph Hellwig <hch@...radead.org>, paulus@...ba.org,
sparclinux@...r.kernel.org, willy@...ux.intel.com,
linuxppc-dev@...ts.ozlabs.org, David Miller <davem@...emloft.net>,
david@...son.dropbear.id.au
Subject: Re: [PATCH 1/1 v3] drivers/nvme: default to 4k device page size
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists