From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 05DA537B4 for ; Wed, 13 Apr 2016 18:03:28 +0200 (CEST) Received: by mail-wm0-f44.google.com with SMTP id u206so86731267wme.1 for ; Wed, 13 Apr 2016 09:03:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :mime-version:content-transfer-encoding; bh=5PsAI6q/OpQpUg3iAw97J1R4WoFyhtjaOC1eg+9Uhwg=; b=xolzO66+krphE7PFxT5BUzGG1xG65vyhtpXUoUNHOiTcSfXV1OI/qIjTpClO8YyO07 QLfzuWKR2n3/zQCGul9b1A2yzDd9QBKcmPldudYNu+LJE9fD+rNQNPKnh1g9F2+mVjWL CbUMnluMnyqoJZV++9pjcY/OTpHQNRcMGSXXYJYUDsHQMO+xw1U0+TaAKdrjiCLeKkGC 0MfwSVQ3S4JzSlpHEchcv/w9NJALWfX3KoOzvB9rmvyrK1CkluVRFJ0S6iPaGCh7e8gt HRIhDK2fZhpBeGvWOBdRZy1dtHLRpnvWJuND2iwLkNalglZq7fPH5tMUo+paSzrQr5aL aD3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:mime-version:content-transfer-encoding; bh=5PsAI6q/OpQpUg3iAw97J1R4WoFyhtjaOC1eg+9Uhwg=; b=PZDBRQNy++PZL/FMsYr3WDBHTm2dmv51pq2YxpadZcA/iYzR4HA0lM4j8ShpWAZbFJ fjAe637B09sQnYWRnmeveGrd0IBQaDpj1P5rJ+1pgbozJysvoI436XzScjGBOg3mBIi3 XQoSuKIrRszpvCF74Esxe04Us8azx+Eao6jk5rkK0bYEUPjB30u2afNaUSOBIvXog9iQ pB8opvtb6N3/Hi9NLaDxwcNCUgbM0dJI18PGn5eEt7qAN72uw4yua+JGIMrYIhgDX1Kr WlODp5ucmyw9sF1DfZsRCXW8wbxle+MwSf0SpkyfdCc5Wima6iajH8Phc5grUV9u1ha4 r7ew== X-Gm-Message-State: AOPr4FVNZstcV/wdm6SQtkDzu7UxlML3kzMmHyvwfJIMGW5kHSWDMklty+atl0nvWcLUKWT4 X-Received: by 10.28.153.65 with SMTP id b62mr11759572wme.36.1460563407750; Wed, 13 Apr 2016 09:03:27 -0700 (PDT) Received: from xps13.localnet (245.111.75.86.rev.sfr.net. [86.75.111.245]) by smtp.gmail.com with ESMTPSA id y3sm28695914wmy.17.2016.04.13.09.03.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 13 Apr 2016 09:03:26 -0700 (PDT) From: Thomas Monjalon To: sergio.gonzalez.monroy@intel.com Cc: dev@dpdk.org Date: Wed, 13 Apr 2016 18:03:25 +0200 Message-ID: <1500486.8lzTDt5Q91@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: [dpdk-dev] memory allocation requirements 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: Wed, 13 Apr 2016 16:03:28 -0000 After looking at the patches for container support, it appears that some changes are needed in the memory management: http://thread.gmane.org/gmane.comp.networking.dpdk.devel/32786/focus=32788 I think it is time to collect what are the needs and expectations of the DPDK memory allocator. The goal is to satisfy every needs while cleaning the API. Here is a first try to start the discussion. The memory allocator has 2 classes of API in DPDK. First the user/application allows or requires DPDK to take over some memory resources of the system. The characteristics can be: - numa node - page size - swappable or not - contiguous (cannot be guaranteed) or not - physical address (as root only) Then the drivers or other libraries use the memory through - rte_malloc - rte_memzone - rte_mempool I think we can integrate the characteristics of the requested memory in rte_malloc. Then rte_memzone would be only a named rte_malloc. The rte_mempool still focus on collection of objects with cache. If a rework happens, maybe that the build options CONFIG_RTE_LIBRTE_IVSHMEM and CONFIG_RTE_EAL_SINGLE_FILE_SEGMENTS can be removed. The Xen support should also be better integrated. Currently, the first class of API is directly implemented as command line parameters. Please let's think of C functions first. The EAL parameters should simply wrap some API functions and let the applications tune the memory initialization with a well documented API. Probably that I forget some needs, e.g. for the secondary processes. Please comment.