From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [dpdk-dev] [Bug 102] IOVA mode causes deadlock
Date: Wed, 31 Oct 2018 10:18:27 +0000 [thread overview]
Message-ID: <bug-102-3@http.bugs.dpdk.org/> (raw)
https://bugs.dpdk.org/show_bug.cgi?id=102
Bug ID: 102
Summary: IOVA mode causes deadlock
Product: DPDK
Version: 18.11
Hardware: x86
OS: Linux
Status: CONFIRMED
Severity: normal
Priority: Normal
Component: core
Assignee: dev@dpdk.org
Reporter: mattias.ronnblom@ericsson.com
Target Milestone: ---
As of commit fe822eb8c5651d00ef5b8eeed6f8511e7a86560f (in RC1 now), all DPDK
applications deadlocks at the time of initialization, if I have QAT SR-IOV VFs
bound to DPDK. VT-d and Intel IOMMU are being used. The VFs are on the host
(not in a VM).
In the first attempt to expand the heap, malloc_heap.c:try_expand_heap() takes
the hotplug write lock, and continues to call rte_eal_check_dma_mask() (in case
dma_maskbits != 0, which with IOVA mode it is), which attempts to take the
hotplug reader lock, and deadlocks.
Beside the deadlock issue, I think there might be more issues with using IOVA
mode.
malloc_heap.c:alloc_pages_on_heap():
if (mcfg->dma_maskbits) {
mask = ~((1ULL << mcfg->dma_maskbits) - 1);
printf("mask: %lu\n", mask);
if (rte_eal_check_dma_mask(mask)) {
RTE_LOG(ERR, EAL,
"%s(): couldn't allocate memory due to DMA
mask\n",
__func__);
goto fail;
}
}
rte_eal_check_dma_mask() takes mask *bit count* (as a uint8_t), but this code
seems to think it's expecting the full mask (uint64_t). I can't say I really
understand what's going on here, but shouldn't the allocated memory be checked
against the DMA mask? This code looks like it's checking the DMA mask against
the DMA mask.
If I back out fe822eb8c5651d00ef5b8eeed6f8511e7a86560f, I'm ending up with
non-IOVA mode, and things starts to work again.
--
You are receiving this mail because:
You are the assignee for the bug.
reply other threads:[~2018-10-31 10:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=bug-102-3@http.bugs.dpdk.org/ \
--to=bugzilla@dpdk.org \
--cc=dev@dpdk.org \
/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;
as well as URLs for NNTP newsgroup(s).