From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: The limitation of VHOST_MEMORY_MAX_NREGIONS in virtio-user with vhost-user backend Date: Wed, 6 Dec 2017 19:22:45 +0100 Message-ID: References: <85be48c8-4d6a-225d-3451-2d9509d96135@redhat.com> <20171206140652.GB17112@yliu-dev> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "Wang, Wei 5. (NSB - CN/Hangzhou)" , "dev@dpdk.org" To: Yuanhan Liu Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id A90A7293B for ; Wed, 6 Dec 2017 19:22:52 +0100 (CET) In-Reply-To: <20171206140652.GB17112@yliu-dev> 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 12/06/2017 03:06 PM, Yuanhan Liu wrote: > On Wed, Dec 06, 2017 at 12:23:19PM +0100, Maxime Coquelin wrote: >> Hi, >> >> On 12/05/2017 07:58 AM, Wang, Wei 5. (NSB - CN/Hangzhou) wrote: >>> >>> >>> Hi, all >>> >>> In DPDK document, it it described that Virtio in containers Cannot work when there are more than VHOST_MEMORY_MAX_NREGIONS(8) hugepages. In another word, do not use 2MB hugepage so far. Do you know the reason of this limitation? >> >> What document are you referring to? >> Actually, a single region is composed of several hugepages, be it 1G or >> 2M. I use 2M hugepages daily without issues. > > He was talking about virtio-user. Ok, thanks for the correction. The lookup time for every translation will be very costly if we have one region per 2MB page. > > --yliu >> >> The limitation comes from the Vhost-user protocol spec. I know there are >> discussions to enlarge it, but it would require a new protocol flag not >> to break existing implementations, so no workaround possible. >> >>> In my envirionment, the pdpe1gb is not set in cpu flag, so hugepage can't be set to 1GB size. The hugepage number shall be more than 8 >>> >>> >>> So is there any solution or workaround to fix this limitation? Or change dpdk code to fix this limitation? >> >> Have you tried to use 2MB pages and faced the NREGIONS > 8 case? >> If so, could you tell us more about your setup (QEMU version, VM RAM >> size, etc...)? >> >> Cheers, >> Maxime >>> >>> >>> Vivian >>> seat: 19009 >>> phone: 13738006921 >>> >>> >>>