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 C2FF744114; Thu, 30 May 2024 19:59:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 957A5402E6; Thu, 30 May 2024 19:59:10 +0200 (CEST) Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) by mails.dpdk.org (Postfix) with ESMTP id B5B4A40289 for ; Thu, 30 May 2024 19:59:09 +0200 (CEST) Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-6ad7d08c045so2269256d6.0 for ; Thu, 30 May 2024 10:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1717091949; x=1717696749; 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=Qw1FZ6HEhIgKD/PAGyKSM9MCvNJUCCWuqQQLoGiqNeo=; b=b7kAz06y5/ua8BQXyENdWnvXYLxtG8/fFNEnLAjjGTnhk++UvMfymyRavnpW8VoeUh KMreAqD8LeGkcnQsw2nPoMtqsVADDj0c76vo1lW8TOl5cxnPZ1mwMxfC4gYbDee7PYJ9 tdVgul1Zjgw1f3ddPqJ+/yR8TzX6cHBfduKcw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717091949; x=1717696749; 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=Qw1FZ6HEhIgKD/PAGyKSM9MCvNJUCCWuqQQLoGiqNeo=; b=doNPPuaSMnKzvFgq4SM3BrRDoPRDUuyWLsBz8/iXr5eI0pJq5yIlnwnvVK5wB6pFkC AeJ7L+4+4oG3G3Mfkzc5LPdPZQykiO2TDpVUmcqMeQLJIZS1KiO/m74DW9obYBrx9KqB lG/cuEGpr6EpExogR8WFBY8V8rx5hzTEjXixjFv8J2Pk7V5g5B0U+MrJxwpgZbhiWG+r yBcz1mXuGxUb5dktmngaPRXLyZHZHE0axBvFrSRo+Vi9qNK9guShX59UVpNO7FUPoTdD UUTjIDZpt+1FRAG97SmBdoqGOB+EdX4bB2jVz9YHhlt9CBMjO0ql9tBYFSmQtb9AhKxr PP5g== X-Gm-Message-State: AOJu0YxkXMHT6k5HCGUn5e9Xpn/MvPNaNlhePdMCiTW4D+uaHCxigtp4 lF4Eg0vfIsWfMXL1opgnS29tL3QaCKHvG8Yn+zHl2aVNsqcg9iAHuZ2uei9LrLo= X-Google-Smtp-Source: AGHT+IGRU5EKszePtSyjlyPGU3MXSPk5tudGeafKqEPfveErBGQsTkvOegl/9wmvaPkcW0L2rJvdDg== X-Received: by 2002:a05:620a:284d:b0:790:e856:7cc9 with SMTP id af79cd13be357-794e9d96bb6mr315400385a.1.1717091948993; Thu, 30 May 2024 10:59:08 -0700 (PDT) Received: from localhost.unh.edu ([2606:4100:3880:1271:e2f8:4ec3:8bf3:864c]) by smtp.gmail.com with ESMTPSA id af79cd13be357-794f2f12a49sm2826385a.46.2024.05.30.10.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 10:59:08 -0700 (PDT) From: Nicholas Pratte To: Honnappa.Nagarahalli@arm.com, jspewock@iol.unh.edu, paul.szczepanek@arm.com, bruce.richardson@intel.com, yoan.picchi@foss.arm.com, probb@iol.unh.edu, luca.vizzarro@arm.com, juraj.linkes@pantheon.tech Cc: dev@dpdk.org, Nicholas Pratte Subject: [PATCH v7 0/2] Methodology change for hugepage configuration Date: Thu, 30 May 2024 13:58:47 -0400 Message-ID: <20240530175852.7382-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 | 14 +++++---- 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 | 30 +++++++++++--------- dts/framework/testbed_model/node.py | 4 ++- dts/framework/testbed_model/os_session.py | 11 +++++-- 8 files changed, 52 insertions(+), 39 deletions(-) -- 2.44.0