From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by dpdk.org (Postfix) with ESMTP id 7CE4A68CD for ; Thu, 22 May 2014 15:04:15 +0200 (CEST) Received: by mail-wi0-f179.google.com with SMTP id bs8so4275328wib.0 for ; Thu, 22 May 2014 06:04:25 -0700 (PDT) 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:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=eyz7HxqSI0zzwK7ZaBZYIFPlsyB61VGWbwtbLzHkYzE=; b=DIeFdxApB+BugFCioFMIsMsv+CpSDsN9bXOjff6nhIi4NgVoDMEJ+jIJqeeV/dlRDi C+5lRj8fGglaRRgGIv5/vE6LKe18+uciGOHGpHD2qbK7qTYUBl8hlNH1/tMKcE5L5Vl/ uz2tUz2TDteWrrA1Xit58PPz8lKCblVGXz5v5N2ACy/NjZwmW2MUkx0oFc4yf2hkbHX3 3SrsITxZleHjujnD0MoVCF7O8uvZvXuH9LUBlBgrMaCBs9qTJUxhGYnCls9XeZBanxvZ fKKRMQt8NEYLmi76jKRp9jnM14pzqrrUj+kWf3ncSsn7+MdmNA2oi5tLuzraOu0W/1CW i0UQ== X-Gm-Message-State: ALoCoQmSv8iiyn7FLhnakO7Ui27FUOACCwd+yRVRnFaKL5jXXNJEsr+qL0BPN/GN+/zS0HmcLd6j X-Received: by 10.180.91.197 with SMTP id cg5mr16127379wib.35.1400763865217; Thu, 22 May 2014 06:04:25 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id m2sm26681319wjf.42.2014.05.22.06.04.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 May 2014 06:04:24 -0700 (PDT) From: Thomas Monjalon To: Anatoly Burakov Date: Thu, 22 May 2014 15:04:22 +0200 Message-ID: <3221053.j2A63PlkPk@xps13> Organization: 6WIND User-Agent: KMail/4.13 (Linux/3.14.4-1-ARCH; KDE/4.13.0; x86_64; ; ) In-Reply-To: <1400514709-24087-12-git-send-email-anatoly.burakov@intel.com> References: <1400514709-24087-12-git-send-email-anatoly.burakov@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 11/16] Make --no-huge use mmap instead of malloc 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, 22 May 2014 13:04:15 -0000 2014-05-19 16:51, Anatoly Burakov: > This makes it possible to run DPDK without hugepage memory when VFIO > is used, as VFIO uses virtual addresses to set up DMA mappings. > > Signed-off-by: Anatoly Burakov > - addr = malloc(internal_config.memory); > + addr = mmap(NULL, internal_config.memory, PROT_READ | PROT_WRITE, > + MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); Please, could you add a comment to explain why using mmap helps? -- Thomas