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 B69D743FC9; Tue, 7 May 2024 18:37:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B745433B9; Tue, 7 May 2024 18:37:59 +0200 (CEST) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by mails.dpdk.org (Postfix) with ESMTP id 88110433B1 for ; Tue, 7 May 2024 18:37:57 +0200 (CEST) Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-43d430b02d0so91761cf.2 for ; Tue, 07 May 2024 09:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1715099877; x=1715704677; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PEosgovwpCzEWBzbGzfaahlDTKIYXedTUTkpimZty1g=; b=jvAEwV/dP/8L0zadpV67ZRFBNICn6ddD6eFHpMSwMDHBl4suXRx4mX+Ywjj0bP2PQR Gh2LKOH1Q/5lkhHUHrhGsIDhrrvCl4MFYBc8Gkv/ZAaW5bQMN1l2IykTR+mYdAGkBR6r 9K+XYCYGmUw0uNIPByCb7wbK8dtHhMdq5sXl0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715099877; x=1715704677; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PEosgovwpCzEWBzbGzfaahlDTKIYXedTUTkpimZty1g=; b=umsGNCtUGJpXojOi1sPSyG+0nFJuxyOOnZaNHn3rkpBEki16J88bnSk8yR9QBDUPvi f08lrs0oUoYit+Tz68VxiLbNkUptf3/9smOxojxU3ER7NvrrqO2GERtiRadEVztHnSDE PleLm6MMbaaHr2LqCJjVh9++6YIc6zXGbM9o1KBonr6p8uaGRss7ieUVW6RlnxvAxePe iIVXV0AP1HBE3PC8/cV5uYF8feorHFoM5w/Dx7u3riKWaEo1csb6aXUL2a272DX9jm7Z ikcD/fWQDX6IAfAYFlXPYJTYM+bDRK+220qyz+Ej8O7+ijcWQZN2pxPudgemNkWqzqgJ Afnw== X-Gm-Message-State: AOJu0YwMy9fBqtuFoopFtudaLPON/JhzHBJ0qm2RarBjniRpDXDMH3oL Jdwp16+JfnyykE9N0Y0m60lMusvSL5JZUXzWv+QM/U84pgA4iTiwyzs13EVRIwE= X-Google-Smtp-Source: AGHT+IF4oI6xHtdPQKMRr8ncz8aCUno1sFvjVyUcR9o1fE21cA4U4U2y4r7mVUO6oXQlyG7EczcGrA== X-Received: by 2002:a05:620a:470e:b0:790:e840:bd0d with SMTP id af79cd13be357-792b25e5906mr30035785a.0.1715099876654; Tue, 07 May 2024 09:37:56 -0700 (PDT) Received: from d121012.iol.unh.edu ([2606:4100:3880:1271:e2f8:4ec3:8bf3:864c]) by smtp.gmail.com with ESMTPSA id e16-20020a05620a12d000b0079296e6646fsm2322647qkl.123.2024.05.07.09.37.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:37:56 -0700 (PDT) From: Nicholas Pratte To: Honnappa.Nagarahalli@arm.com, juraj.linkes@pantheon.tech, paul.szczepanek@arm.com, bruce.richardson@intel.com, probb@iol.unh.edu, wathsala.vithanage@arm.com, yoan.picchi@foss.arm.com, thomas@monjalon.net, jspewock@iol.unh.edu, mb@smartsharesystems.com Cc: dev@dpdk.org, Nicholas Pratte Subject: [PATCH v6 0/2] Methodology change for hugepage configuration Date: Tue, 7 May 2024 12:37:50 -0400 Message-ID: <20240507163752.305-1-npratte@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240430184533.29247-4-npratte@iol.unh.edu> References: <20240430184533.29247-4-npratte@iol.unh.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org In order to prevent accidental misconfiguration of hugepages at runtime, the following changes are made to only allow for configuration of 2MB hugepages within the DTS config.yaml. In the previous implementation, a default hugepage size was selected via the size listed in /proc/meminfo. The problem with this implementation is that, assuming the end-user has made prior modifications to the system, /proc/meminfo may default to hugepage sizes that are not recommended to be configured at runtime (i.e. 1GB hugepages). This can lead to two problems: overallocation of hugepages (which may crash the remote host) configuration of hugepages sizes that are not recommended during runtime. In this new implementation, we stipulate that any runtime hugepage configuration size that is not 2MB is considered an outlier. If the end-user would like to configure either 1GB hugepages or any unique hugepage size outside of 2MB, then they should make these configurations either at startup (in the case of 1GB hugepages) or runtime outside of DTS configuration (if a user would like hugepages that are not 2MB). In either case, the expectation is that, if wish to use hugepage sizes that are not 2MB, you will make these changes outside and prior to the initialization of DTS. The end-user has two options: remove the option for hugepage configuration in the conf.yaml, or keep the option and specify the amount of 2MB hugepages desired. In the case of the former, then we assume that hugepages are already configured prior to DTS initialization. In the latter case, the user must define the amount of 2MB hugepages to be configured at runtime. If the amount of 2MB hugepages requested exceeds the amount of 2MB hugepages already configured on the system, then the system will remount hugepages to cover the difference. If the amount of hugepages requested is either greater than or equal to the amount already configured on the system, then nothing is done. Nicholas Pratte (2): dts: Change hugepage runtime config to 2MB Exclusively dts: Change hugepage 'amount' to a different term doc/guides/tools/dts.rst | 6 ++++- dts/conf.yaml | 8 +++--- dts/framework/config/__init__.py | 8 +++--- dts/framework/config/conf_yaml_schema.json | 12 ++++----- dts/framework/config/types.py | 4 +-- dts/framework/testbed_model/linux_session.py | 28 +++++++++++--------- dts/framework/testbed_model/node.py | 4 ++- dts/framework/testbed_model/os_session.py | 7 ++++- 8 files changed, 45 insertions(+), 32 deletions(-) -- 2.44.0