From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: virtio with 2MB hugepages - bringing back single file segments Date: Fri, 2 Mar 2018 11:00:04 +0100 Message-ID: References: <49c8beec-18d0-6cc5-2731-258dd0051807@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "Harris, James R" , Thomas Monjalon To: "Stojaczyk, DariuszX" , "dev@dpdk.org" , "Tan, Jianfeng" , "Burakov, Anatoly" , Yuanhan Liu Return-path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id A022F5F2A for ; Fri, 2 Mar 2018 11:00:08 +0100 (CET) In-Reply-To: Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 >