From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 564C542B9B for ; Thu, 25 May 2023 17:13:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1EEF140DF8; Thu, 25 May 2023 17:13:13 +0200 (CEST) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id CF7CD40DDB for ; Thu, 25 May 2023 17:13:11 +0200 (CEST) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-64d2b42a8f9so1836960b3a.3 for ; Thu, 25 May 2023 08:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685027591; x=1687619591; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=S5rHglKxC2Ac0aAoNlEPW4om+EmowikKApQOM9KdNEo=; b=XZgPKacDtOhn03sA75xZB0wIwfS8ESCLDp0R7EwaMXnc0qNv2OCVVuti5OMoXr+cBs l6Ape5JYfWYLbziQmMLQyUSjf7iN1CwFA+/htV0MlAZnUQpAE17oGq3Eek9xkP/0QZAk dAhxBnO4R6Ra4rvtsIz9CQ6XN3KRuwT6rj9lITFyqzrTMms8ooEcD6A8QHmLk40dWdPn 3r83ggQvCjyo1BJfuvuYBEWzuPcrl5+yrWw/M5bjpjYMHqleCgLVCv7ECSqRZ2baw/hC x7/Dlrf02JRLldWqvU/jycWJKxYTEwOCrlcJ6hxUiQjgVwvMXCfMR6+LQFUK8gJtoC0C KtQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685027591; x=1687619591; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=S5rHglKxC2Ac0aAoNlEPW4om+EmowikKApQOM9KdNEo=; b=YF6mdzmICbTy2PJ6+znbPFXNfIDXIBgsXZnHF2Dwe6VXbEBn6TZPW98FqCinpLyr4A iFt9Eu5FtJlh2DxIp6QDHab3TFAtbl0m7foaKmzcgpXdIRMuHNcTopvxE8B3QerFf+9X avE7d+uTs90QCgoj3d/5YUWd9njfZymZxwAGIWnBtTr9yH7mKondIjgFdqUCJGc7L++m H8rOegINIm8Ic4gkivJFRcTMbd6MObWrzJLgyH7QWt08iWymPKcwcbbCxBa/L75s9esm VbCpNE1RI6Z9ihBuxOPBpvyTiiSUWrjvrRdm7i4a3gIz2nW4zeIAV+KAW0FCPonU2tFp go6A== X-Gm-Message-State: AC+VfDxpy/EypQuBWov60vSGveoLT/XZFVhsQeyVg9msw84vdNShfZ+i I+f2jlZKQQ6ZqqDRaZKOfIJmVQ== X-Google-Smtp-Source: ACHHUZ6FasKj59zaaS7ufCkSjaXG6DdN09t8ZZxKO352r/Qh7xoPYFs5OWF1/p6iAgRxN3+Vtv95/A== X-Received: by 2002:a05:6a20:c702:b0:100:9d6c:b49e with SMTP id hi2-20020a056a20c70200b001009d6cb49emr21565298pzb.58.1685027590776; Thu, 25 May 2023 08:13:10 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u2-20020aa78382000000b00625037cf695sm1312375pfm.86.2023.05.25.08.13.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 08:13:10 -0700 (PDT) Date: Thu, 25 May 2023 08:13:08 -0700 From: Stephen Hemminger To: "Lombardo, Ed" Cc: "users@dpdk.org" Subject: Re: DPDK hugepages Message-ID: <20230525081308.57637057@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Thu, 25 May 2023 05:36:02 +0000 "Lombardo, Ed" wrote: > Hi, > I have two DPDK processes in our application, where one process allocates 1024 2MB hugepages and the second process allocates 8 1GB hugepages. > I am allocating hugepages in a script before the application starts. This is to satisfy different configuration settings and I don't want to write to grub when second DPDK process is enabled or disabled. > > Script that preconditions the hugepages: > Process 1: > mkdir /mnt/huge > mount -t hugetlbfs -o pagesize=2M nodev /mnt/huge > echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages > > Process 2: > mkdir /dev/hugepages-1024 > mount -t hugetlbfs -o pagesize=1G none /dev/hugepages-1024 > echo 8 >/sys/devices/system/node/node0/hugepages/hugepages-1048576kB/nr_hugepages > > > Application - > Process 1 DPDK EAL arguments: > Const char *argv[] = { "app1", "-c", "7fc", "-n", "4", "--huge-dir", "/dev/hugepages-1024", "--proc-type", "secondary"}; > > Process 2 DPDK EAL arguments: > const char *dpdk_argv_2gb[6] = {"app1 ", "-c0x2", "-n4" , "--socket-mem=2048", "--huge-dir /mnt/huge", "--proc-type primary"}; > > Questions: > > 1. Does DPDK support two hugepage sizes (2MB and 1GB) sharing app1? This is a new scenario. I doubt it. It is possible to have two processes an a common hugepage pool. > 2. Do I need to specify -proc-type for each Process shown above for argument to the rte_eal_init()? The problem is that DPDK uses a runtime directory to communicate. If you want two disjoint DPDK primary processes, you need to set the runtime directory. > 3. I find the files in /dev/hugpages/rtemap_#s are not present once Process 2 hugepages-1G/nr_hugepages are set to 8, but when set value to 1 the /dev/hugepages/rtemap_# files (1024) are present. I can't see how to resolve this issue. Any suggestions? > 4. Do I need to set -socket-mem to the total memory of both Processes, or are they separately defined? I have one NUMA node in this VM. > > Thanks, > Ed