On 03/02/2018 10:03 AM, Stojaczyk, DariuszX wrote:
Hi Maxime,

Hi,

I'm trying to make a vhost-user initiator built upon DPDK work with
2MB hugepages. In the initiator we have to share all memory with the host
process, so it can perform DMA. DPDK currently enforces having one descriptor
per hugepage and there's an artificial limit of shared descriptors in DPDK
vhost-user implementation (currently 8). Because of that, all DPDK vhost-user
initiators are practically limited to 1GB hugepages at the moment. We can
always increase the artificial descriptor limit, but then we're limited by
sendmsg() itself, which on Linux accepts no more than 253 descriptors.
However, could we increase the vhost-user implementation limit to - say - 128,
and bring back "single file segments" [1]?

If you do something like this, you'll have first to update the vhost-user spec,
which should I think include a new protocol feature bit.

Do I? I can't see any memory region limitation in the vhost-user spec [1]. If a 
128-region initiator tries to connect to an 8-region rte_vhost, the recvmsg() 
would simply fail - rte_vhost rejects `truncated` messages.

Here it is:

* Memory regions description
   ---------------------------------------------------
   | num regions | padding | region0 | ... | region7 |
   ---------------------------------------------------

   Num regions: a 32-bit number of regions
   Padding: 32-bit




Also, you will have to consider improving the translation functions with a 
better
search algorithm, else you'll have very poor performance.

That's right, I got that sorted out already.

Regards,
D.

[1] https://github.com/qemu/qemu/blob/master/docs/interop/vhost-user.txt

Reply via email to