All of lore.kernel.org
 help / color / mirror / Atom feed
* [SPDK] bug in dpdk/lib/librte_eal/linuxapp/eal/eal_memory.c ?
@ 2018-03-07 13:01 Ernest Zed
  0 siblings, 0 replies; only message in thread
From: Ernest Zed @ 2018-03-07 13:01 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]

Hi All,
I've encountered a strange behavior in spdk_mem_register. My code was
running fine in my app until this morning when I transferred it to `clone`d
process, the spdk_mem_register started to fail
in vtophys_get_paddr_pagemap. Maybe it is some `clone` side effect I'm not
aware of (have to admit my Linux knowledge is very limited) but the failure
was a result of rte_mem_virt2phy reading the /proc/self/pagemap file.
The vtophys_get_paddr_pagemap
has a code which checks if the address returned from rte_mem_virt2phy is
zero, then it touches the address just to create physical backing page,
however the rte_mem_virt2phy never return zero so the vtophys_get_paddr_pagemap
never touches the page.
the code in rte_mem_virt2phy as following:
if ((page & 0x7fffffffffffffULL) == 0) <<== Here, my page is 0, should I
touch it to get backing physical page?
return RTE_BAD_IOVA;
when, I guess, it should be something like
if ((page & 0x7fffffffffffffULL) == 0) {
if (page == 0) {
return 0; <<== Return 0, and give vtophys_get_paddr_pagemap a chance to
touch and try to translate it again
} else {
return RTE_BAD_IOVA;
}
}

at least it solved the problem with registering memory using spdk_mem_register.
So far, the code runs as expected.

Sincerely,
Ernest

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 8299 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-07 13:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-07 13:01 [SPDK] bug in dpdk/lib/librte_eal/linuxapp/eal/eal_memory.c ? Ernest Zed

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.