From: keith.busch@intel.com (Keith Busch)
Subject: BUG_ON at nvme_setup_prp getting hit.
Date: Tue, 7 Jan 2014 11:15:04 -0700 (MST) [thread overview]
Message-ID: <alpine.LRH.2.03.1401070942210.25844@AMR> (raw)
In-Reply-To: <CAEAgd7GtR6V_x-JJHSOA6DyVP2z7HUW3vNbbUa3LapLmGZsMLw@mail.gmail.com>
On Tue, 7 Jan 2014, Hrishikesh Gokhale wrote:
> Hi All,
>
> Requesting for help in resolving the following:
>
> Setup:
> Running FIO tester tool on NVMe device driver (/block/nvme.c) with I/O
> engine ?libaio?. Using Odd block size like 17K, 129K, 257K, etc.
> Distribution ?Fedora 18? (Kernel v3.6.10).
>
> Observation:
> I?ve observed intermittent hit on BUG_ON which is pointing to
> nvme_setup_prps() function in nvme.c driver.
>
>>>> CODE
> static int nvme_setup_prps(...)
>
> {
> int dma_len = sg_dma_len(sg);
>
> u64 dma_addr = sg_dma_address(sg);
>
> int offset = offset_in_page(dma_addr);
> ...
> dma_len -= PAGE_SIZE;
> ...
> if (dma_len > 0)
> continue;
> BUG_ON(dma_len < 0);
> }
> <<< CODE
>
> After adding prints , I found that this problem is reproduced on use
> of PRP list.
>
> Offset value in DMA page is changed (in nvme_setup_prps() function)
> from the original offset value which was present while sg_set_page()
> function was executed. The offset value of virtual address is found
> different than the offset value of physical/DMA address.
This BUG_ON shouldn't happen unless we gave nvme_setup_prps an sgl that
can't be mapped to a PRP list, so the request should have been split
instead. A virtual address with different alignment than the dma address
might cause that and sounds similar to this issue from way back:
merlin.infradead.org/pipermail/linux-nvme/2012-November/000121.html
I didn't see that anything came of it, though.
Maybe our BIOVEC_NOT_VIRT_MERGEABLE check should use the physical
addresses instead of virtual to see if the bio_vec is usable. ?
> Query:
> Is it possible to avoid the ?offset value change? in DMA-able memory
> (in nvme_setup_prps() function) to avoid BUG_ON()check? ?
> Thanks & Regards,
> Hrishikesh
next prev parent reply other threads:[~2014-01-07 18:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 15:04 BUG_ON at nvme_setup_prp getting hit Hrishikesh Gokhale
2014-01-07 18:15 ` Keith Busch [this message]
2014-01-27 3:18 ` Hrishikesh Gokhale
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=alpine.LRH.2.03.1401070942210.25844@AMR \
--to=keith.busch@intel.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