From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: nvme-pci: about page_size of DMA pool
Date: Sun, 18 Feb 2018 16:52:34 +0900 [thread overview]
Message-ID: <2dfcc20c-a0c4-d01a-cde8-01662202cff8@gmail.com> (raw)
Hi All,
It seems that _PAGE_SIZE_ and _dev->ctrl.page_size_ might be different.
For now, nvme_setup_prp_pools() attempts to create PRP page DMA pool
with PAGE_SIZE instead of dev->ctrl.page_size.
By the way, in nvme_pci_setup_prps(), PRP lists are built by
dev->ctrl.page_size like following code.
for (;;) {
if (i == page_size >> 3) {
^^^^^^^^^
__le64 *old_prp_list = prp_list;
prp_list = dma_pool_alloc(pool, GFP_ATOMIC, &prp_dma);
if dev->ctrl.page_size should be used as is, I guess DMA pool should be
created in dev->ctrl.page_size (But at that time of
nvme_setup_prp_pools(), dev->ctrl.page_size may not be set properly)
somehow instead of PAGE_SIZE.
Additionally, It seems that page_shift in nvme_enable_ctrl() is now
hard-coded to 12 which means dev->ctrl.page_size will always be 4096,
though.
Q1. Should dev->prp_page_pool be created with dev->ctrl.page_size
instead of PAGE_SIZE?
Q2. Is there any special reason why page_shift in nvme_enable_ctrl()
is hard-coded to 12, not PAGE_SHIFT?
Always welcome directives and comments. :)
Sincerely,
Minwoo Im
next reply other threads:[~2018-02-18 7:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-18 7:52 Minwoo Im [this message]
2018-02-20 16:06 ` nvme-pci: about page_size of DMA pool Keith Busch
2018-02-22 13:26 ` Minwoo Im
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2dfcc20c-a0c4-d01a-cde8-01662202cff8@gmail.com \
--to=minwoo.im.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox