From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1F6A840FB65A; Fri, 2 Mar 2018 10:00:08 +0000 (UTC) Received: from [10.36.112.30] (ovpn-112-30.ams2.redhat.com [10.36.112.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1E842140610; Fri, 2 Mar 2018 10:00:06 +0000 (UTC) To: "Stojaczyk, DariuszX" , "dev@dpdk.org" , "Tan, Jianfeng" , "Burakov, Anatoly" , Yuanhan Liu Cc: "Harris, James R" , Thomas Monjalon References: <49c8beec-18d0-6cc5-2731-258dd0051807@redhat.com> From: Maxime Coquelin Message-ID: Date: Fri, 2 Mar 2018 11:00:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 02 Mar 2018 10:00:08 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 02 Mar 2018 10:00:08 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] virtio with 2MB hugepages - bringing back single file segments X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2018 10:00:08 -0000 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 >