From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <olivier.matz@6wind.com>
Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com
 [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 328E01B7CB
 for <dev@dpdk.org>; Tue, 15 May 2018 13:28:31 +0200 (CEST)
Received: from core.dev.6wind.com (unknown [10.0.0.1])
 by proxy.6wind.com (Postfix) with ESMTPS id 52531176EEF;
 Tue, 15 May 2018 13:25:26 +0200 (CEST)
Received: from [10.16.0.195] (helo=6wind.com)
 by core.dev.6wind.com with smtp (Exim 4.84_2)
 (envelope-from <olivier.matz@6wind.com>)
 id 1fIY7t-0006zP-6S; Tue, 15 May 2018 13:28:18 +0200
Received: by 6wind.com (sSMTP sendmail emulation);
 Tue, 15 May 2018 13:28:17 +0200
Date: Tue, 15 May 2018 13:28:17 +0200
From: Olivier Matz <olivier.matz@6wind.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: Thomas Monjalon <thomas@monjalon.net>, dev@dpdk.org,
 konstantin.ananyev@intel.com, arybchenko@solarflare.com,
 shreyansh.jain@nxp.com
Message-ID: <20180515112817.2et5csjsktr7c6xu@glumotte.dev.6wind.com>
References: <014e66f8e34cb87fa126b7494ad644ef9ac68978.1526313945.git.anatoly.burakov@intel.com>
 <1848737.7LY3OboWmP@xps>
 <8ef0570b-6459-e0fb-b1a7-eed2aa5dd624@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <8ef0570b-6459-e0fb-b1a7-eed2aa5dd624@intel.com>
User-Agent: NeoMutt/20170113 (1.7.2)
Subject: Re: [dpdk-dev] [PATCH] mempool: fix virt address mempool population
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 15 May 2018 11:28:32 -0000

On Tue, May 15, 2018 at 08:58:06AM +0100, Burakov, Anatoly wrote:
> On 14-May-18 7:48 PM, Thomas Monjalon wrote:
> > 14/05/2018 18:06, Anatoly Burakov:
> > > Currently, populate_virt will check if mempool is already populated.
> > > This will cause inability to reserve multi-chunk mempools if
> > > contiguous memory is not a hard requirement, because if allocating
> > > all-contiguous memory fails, mempool will retry with virtual addresses
> > > and will call populate_virt. It seems that the original code never
> > > anticipated more than one non-physically contiguous area.
> > > 
> > > Fix it by removing the check in populate virt. populate_anon() function
> > > calls populate_virt() also, and it can be reasonably inferred that it is
> > > expecting that virtual area is not already populated. Even though a
> > > similar check is already in place there, also add the check that was
> > > part of populate_virt() just in case.
> > > 
> > > Fixes: aab4f62d6c1c ("mempool: support no hugepage mode")

Acked-by: Olivier Matz <olivier.matz@6wind.com>

> > If it is really the root cause, you need to add Cc: stable@dpdk.org.
> 
> Yes. It's not as pressing for previous DPDK versions because this codepath
> wasn't triggered unless --no-huge was used, but it's still a bug.

Agree we should queue it for stable, even if it's not that critical.

Thanks,
Olivier