From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 394E1A0C51;
	Thu, 10 Jun 2021 09:17:14 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id AB2C44067C;
	Thu, 10 Jun 2021 09:17:13 +0200 (CEST)
Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com
 [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id C0B524003C
 for <dev@dpdk.org>; Thu, 10 Jun 2021 09:17:11 +0200 (CEST)
Received: by mail-wr1-f48.google.com with SMTP id a11so955903wrt.13
 for <dev@dpdk.org>; Thu, 10 Jun 2021 00:17:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-disposition:in-reply-to;
 bh=htxVZGtmTS8YeEhiZZjKP4eWvn41mrUKq3QiFykb3nM=;
 b=O/fxqB/ZEUadtTaPSHDzRXLqzQ5KENiVAmNpiwnBV+Tci6XS/ddJkQ0/T4EGhCcdFq
 O3BQqeT0FDrnGZEyqszPpHhvDEks4TGeI0cm/lW+oZMtfo9mZVHoG5JfYWjk09oLOrjY
 YFrgcJ07M2Ake+SaJX21yfvAoXeviYP+kCNCDm4M+rjeu2tWJsKfOFh0kjlAtbJlzVDz
 Uc5UFfNBwEctsSi3P3GIKXz9b/t/VLup9roZkoF6FgN24S2+Y32fhBqVKafD/jBjubbC
 gq1RAjqTLlznFBFYrkWmU1R0H/Vg/cJ0HLxEI25pUfqpyDNbis5MLMsGP1O9L9ddxAVa
 ZT9Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:references
 :mime-version:content-disposition:in-reply-to;
 bh=htxVZGtmTS8YeEhiZZjKP4eWvn41mrUKq3QiFykb3nM=;
 b=dX18pjo7n6R3DZvU1CpQAjosjMjGAtiTwB84HfoXuDxwJfY6JzfvNI6kFlogpCPpdW
 ii63t9CST1nWTNDBoxitiHSqhue6HcUi569nR4NKf6FRAYSyiC/9Di4Dq31WCAvcxqB2
 XItW8ndSTARcxBkfJFjmBXUQpygkZCZSsyXGlkW6CmYX28QySEkJgdJ4BkDHHQ727b0S
 kzP3wuCWlAJ6/w1pHa5SjfV8ZSFP0/oiH4uLohZNUwhSGeuioL8K3+LYGOkCnp3nFrna
 Bujn9CoNBg2Z0ZWzqwTT8k5riLTqBAC+IeKZMQyMO5Bk/dHS9epTOwKRBHyuRcRfpGQn
 Vkaw==
X-Gm-Message-State: AOAM530rWWiLIABTvpdrPnY9CpatOjLwC593p4MHvzsVj0zthS3mh8O1
 fozm1i9yFufri6fKZ6/CoayfgA==
X-Google-Smtp-Source: ABdhPJxb9Quu+CHmT/E6OoP17SCXcmoe/MJ9uq/n2ngpl3n1jxYBxODA2uOsNHJIn3pDTF9lQ7gkjA==
X-Received: by 2002:adf:d1ec:: with SMTP id g12mr3760046wrd.204.1623309431442; 
 Thu, 10 Jun 2021 00:17:11 -0700 (PDT)
Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25])
 by smtp.gmail.com with ESMTPSA id j1sm1920591wmi.44.2021.06.10.00.17.10
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 10 Jun 2021 00:17:10 -0700 (PDT)
Date: Thu, 10 Jun 2021 09:17:10 +0200
From: Olivier Matz <olivier.matz@6wind.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: David Marchand <david.marchand@redhat.com>,
 Shanmugasundaram M <shansirtt@gmail.com>, dev <dev@dpdk.org>,
 Guillaume Gaudonville <guillaume.gaudonville@6wind.com>,
 Jean-Mickael Guerin <jmg@6wind.com>
Message-ID: <YMG8dmzzJYtoMmzr@platinum>
References: <CALLOm0PKnw7gDP6aHstwBcJf0_ZSC1wKzE-ei9thVWRNkLHGoQ@mail.gmail.com>
 <CALLOm0N8SEedqUXB406xyrGUU8Y_VOS9Hjnr_berNzcZJ3jiCw@mail.gmail.com>
 <CAJFAV8wRyWSd=WP-LqSd6_YSXg+dfTzj5BKEFUTsUG5r5siwuA@mail.gmail.com>
 <YMC4K7WUlmLUha9K@bricha3-MOBL.ger.corp.intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <YMC4K7WUlmLUha9K@bricha3-MOBL.ger.corp.intel.com>
Subject: Re: [dpdk-dev] Reg 6Wind fastpath DPDK 18.11.1 virtual memory
 allocation ( 54.5GB of anonymous mapping)
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Hi Shanmugasundaram,

On Wed, Jun 09, 2021 at 01:46:35PM +0100, Bruce Richardson wrote:
> On Wed, Jun 09, 2021 at 02:28:04PM +0200, David Marchand wrote:
> > On Wed, Jun 9, 2021 at 2:02 PM Shanmugasundaram M <shansirtt@gmail.com> wrote:
> > > We are using  6Wind fastpath(fp-rte) which is using DPDK version 18.11.1.
> > > We are seeing  65.5G(preallocated during startup) of virtual memory for
> > > fp-rte on a 32GB machine, 10G of that was huge pages (5000 mappings of 2M.)
> > >
> > > We found 4 strange anon (4K size) segments totaling 54.5G (16+16+16+6.5).
> > > Note: we changed / customized memory CONFIG_RTE_MAX_MEMSEG_PER_LIST=24576
> > > and default value of  CONFIG_RTE_MAX_MEMSEG_LISTS=64 used.
> > > Kindly let us know
> > > 1. Why are allocating  54.5 GB anonymous mapping
> > > 2. When will we use it ?
> > 
> > This is likely pre-reserved virtual memory from the DPDK allocator.
> > This virtual memory won't probably never be used.
> > 
> 
> There may not be actually any memory backing this, since DPDK will reserve
> huge amounts of virtual address space without actually using it. So those
> GB's you see in the virtual memory may be completely unused, the addresses
> are just reserved to ensure that if memory does need to be mapped into the
> process, we have an appropriate contiguous address block to put it in.
> 
> > But you'd better ask 6WIND guys as they maintain their own DPDK downstream.
> > 
> > Copying a few guys.

I agree with David and Bruce. This is probably related to virtual memory
areas reserved by eal_get_virtual_area() (mmap of /dev/zero). Enabling EAL
debug logs should show traces about it.

If you need support (even on old 6WINDGate versions based on
dpdk-18.11), please open a ticket at 6WIND support, we'll be happy to
help.

Regards,
Olivier