From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f173.google.com (mail-pf0-f173.google.com [209.85.192.173]) by dpdk.org (Postfix) with ESMTP id B32363B5 for ; Fri, 10 Feb 2017 06:01:10 +0100 (CET) Received: by mail-pf0-f173.google.com with SMTP id e4so6279830pfg.1 for ; Thu, 09 Feb 2017 21:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0S4PJbLVUEAsW7T5O72NGTq3Xg/Le2oGr6kg22jp03o=; b=hROVCcig3bDQQR36U+dEw+DRA/PLy5y//aK6y0AntJE7Y6VQvuCFI3uGOvZu0JB6yV yQSHcKaCNM3t2MlPHjhkDKg9ruUhFJN943/pnGOn/tCkSdBdHf8PA8kL3v9vra28AleL 93I8zzaKv4Bg2jsopnHFIn4xVhYbrTj8Ij4zhUGrYgwdY1JGY96mqBaMHiYWNq4Wr/I/ OdOhEQ5Jx4kwURhELkm/gF71ujoJmJO6c4pYjfBbBjKy6VfmoUiQosdcO+9q9W9HKFeI wW//g4lOOPQpS3MiOagdAfqf11LVsmgpTQ6vBW/SOETBBaU5XI+YY73xnO232HSFEV/3 fcOg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=0S4PJbLVUEAsW7T5O72NGTq3Xg/Le2oGr6kg22jp03o=; b=Wk1cv3Q6/pqfD0VeUcs/t6I3nHVPtsxag+DCUmTjg6VLV4sf6i7+pJIK0dAFuDXFm9 3qNX1xa49Jdk2HqnYIF7ybLKJl1jdgIJ/pBtRx6LHzRmWkeTDzOHQXsp231Z6v0DuYNc I2rslfpflSPZOguesuciCiH6d52fpSo6ftuyknTRroOZTC5aHuDlmFdVNmnifr7k0EVJ 3Ja8VNdxc/CjEnsbcNWJCPEu6IYxlE+UuSJBO70O9SWtAd66JgfhadESsLgD776t5EXQ nQMEwepbWJMkMU7ta+nE1Wx8K6JALVB3NzeTPNYypTdflpYVZNrv47a/CP4q4LOu3+5r G1bQ== X-Gm-Message-State: AMke39noVhtX1of0S7SwgJJplaE52cS/hpnwLlqQkpzEKNllfmLqOv8ZNLum7v0LUQvT6w== X-Received: by 10.84.136.75 with SMTP id 69mr9017977plk.172.1486702869559; Thu, 09 Feb 2017 21:01:09 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id z29sm1122415pgc.7.2017.02.09.21.01.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Feb 2017 21:01:09 -0800 (PST) Date: Thu, 9 Feb 2017 21:01:01 -0800 From: Stephen Hemminger To: Sakthivel Subramaniam Cc: users@dpdk.org Message-ID: <20170209210101.07a88c9f@xeon-e3> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] Regarding rte_malloc and linux malloc X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2017 05:01:11 -0000 On Fri, 10 Feb 2017 10:00:33 +0530 Sakthivel Subramaniam wrote: > Hi, > I have some basic doubt about DPDK memory allocation. > 1. rte_malloc will allocate memory from hugepage memory ? yes. but remember hugepage memory is limited > 2. If we use normal malloc, this will be allocated from heap. will this > allocation also useful for dpdk? DPDK primary application can use it but you can't pass that memory to a secondary DPDK process. Also you can't use malloc memory for things that get DMA'd like packet buffers. > 3. Or for better performance we have to use only rte_malloc? The memory from rte_malloc will cause less TLB misses, but on a modern processor for a small resident set size it probably makes no difference.