From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 92882ADA2 for ; Thu, 16 Apr 2015 11:33:06 +0200 (CEST) Received: by wgso17 with SMTP id o17so74311259wgs.1 for ; Thu, 16 Apr 2015 02:33:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=WwuHqw94+yU9Ke7sHGk1LnSkbWujTH/20fUi2obwV5g=; b=GbuOYipNP1t4ybXIe4W0wYngr9HF+UvVisn4owXX7wjUwz1jkbk1b6F8P7twI6BcM+ Uc5m+X2PJeTj3hxgiXsxRg0vKdEQ20pgNwdEeXP/2Z5G7JdF3pcZ1Blr8H8kqhVCf5nv 3dEuLPBQsxUprs0uG3LqdMXRMGGo3zxzk8RBHkIXl7GKlk3fNu/l9ckXhsGiem57mt59 RXDRHOHbnXH1Uitr3ZCP0k4GoEppaAsJT9qrEiaXVyQzYRl5G8lWapNNhUG9qvcZG6U+ +/Vs4oS2HwK+Frvf6zuhKZZAhrVtuDub8yoSQ2rbK3beCNjjo1Z8KWoe7sPe8bABqs12 9adQ== X-Gm-Message-State: ALoCoQmt2Wlpl9niMqrB4JEGkh8mE/eF2ZTyOafnPCP0Ne76IbcUQSG+KRcY1aiMGqC+RYelhP5y X-Received: by 10.194.203.74 with SMTP id ko10mr57371003wjc.96.1429176786431; Thu, 16 Apr 2015 02:33:06 -0700 (PDT) Received: from [10.16.0.195] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id n3sm9553306wja.36.2015.04.16.02.33.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Apr 2015 02:33:05 -0700 (PDT) Message-ID: <552F81D2.4040708@6wind.com> Date: Thu, 16 Apr 2015 11:33:06 +0200 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: "Gonzalez Monroy, Sergio" , Stephen Hemminger References: <552EB8C6.5050906@linaro.org> <20150415122419.767e4048@urahara> <552F7AD6.3070003@intel.com> <552F7E5F.3050502@intel.com> In-Reply-To: <552F7E5F.3050502@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] mempool deleting and cache_size X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2015 09:33:06 -0000 Hi, On 04/16/2015 11:18 AM, Gonzalez Monroy, Sergio wrote: > On 16/04/2015 10:03, Gonzalez Monroy, Sergio wrote: >> On 15/04/2015 20:24, Stephen Hemminger wrote: >>> On Wed, 15 Apr 2015 20:15:18 +0100 >>> Zoltan Kiss wrote: >>> >>>> Hi, >>>> >>>> I have two questions regarding mempools: >>>> >>>> - the first is trivial: how do you delete them? Can you? I can't see a >>>> function to do that, and none of the examples are doing such thing. >>>> When >>>> exactly it get deleted? >>> You can't delete them. They live in hugepage area and are persistent. >>> Correctly written code looks for them by name and reuses existing pool >>> if it is big enough. >>> >> FYI, I'm looking into such functionality and also delete/destroy >> mempools (although still no plan on implementation). >> >> Sergio > Forgot to say, suggestions/ideas are more than welcome. I think what is required is similar to what I did for the rte_rings some time ago: http://dpdk.org/browse/dpdk/commit/lib/librte_ring/rte_ring.c?id=a182620042aa297ba1dc88f3089537d94b51bcf9 http://dpdk.org/browse/dpdk/commit/lib/librte_ring/rte_ring.c?id=1d64e46eb8c4fb8085513e9be824f2377b9c70c7 The objective would be to allow to allocate a memory zone from any mean (rte_malloc, malloc, ...), and have an API to initialize a mempool inside of this zone. Unfortunately it's probably not as trivial for mempool, as the structure is more complex (it includes a ring, the structure is followed by a variable-size table of physical addresses), and there are some helpers to convert virtual addresses to physical addresses, which is not easy to manage if it's not memzones (especially with the xen part). Regards, Olivier