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 3966AA0032; Fri, 24 Jun 2022 15:20:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EEF0415D7; Fri, 24 Jun 2022 15:20:07 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2052.outbound.protection.outlook.com [40.107.96.52]) by mails.dpdk.org (Postfix) with ESMTP id BDFC440A8A for ; Fri, 24 Jun 2022 15:20:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V1NB6xPxXn/ujrUkEhIQGMu4uVbZSIOmjYstauzfT5yW7FSbmrXCSNHMTkGY7o5SAzpFqEMvirFT/ZZVcnMRRWEf1GDBVQmPnl5D4QDhuqw29ABKlAFPSc+rKELkkEJRP2/OXZ4EwwMkxMOh81qQ4/QxUKFFpnHxjinz8+fer6yc+wKddAEoMGUlqDje/44bBDD3bWWzd80B81cTQTSg5uOD2JVx8sJfbcDwlzu2h45P+APHLzBT7Yj9f2gmZHalVBfH+iyptbtHsSbW9g30OJ1bMh2273pKu1JBgFukXVv8mWXDHRuu2F884OoWsLvOOHTJenkRa43PnpJcPePAAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LLYc4IWbaD1fiFDjC7/PpQ++SpM8L5XUuShx0gIocrw=; b=enLhqkOHJh/HdJREpORNflo6y2qPomQ5qNdfBmyyWFtIUcF1eJ9OYB2PrMiSHaLoQ17JiVJK4uKsWI2JwIs92SEPRNRgZ/RM0++pEla9+UmZsw1MzY3jpoMCorjPirqds11ocBTwCWrXLTu8qhI338LCHtpUb0F8L4mc+GxcJlRdV6msbTWuxZqKXaik5717FFWjrnhwk925Y/bs5r0P3uE5GOinkbGuGYj87ivjHbkU9mi7Jnfy+YnEUlinK43idsVjvPgg1HK0D4eyog9m7z3XcfHYUb/CtWtW0fsj0x7GBPLa+5/rj0ggoguXDMB1aeLZw/xKo5jLoKmKjBCxFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LLYc4IWbaD1fiFDjC7/PpQ++SpM8L5XUuShx0gIocrw=; b=KAwTAYvCoEPyZKhep1fUYbm3p8KLpm/PTwruRqh/2wUDl0/UQmmkdiISS3Z1fzSqzFBfbQ9vHn++GyAZCbjolr1kHuCdP1vUw3Z6wBSlfpO7j2uj/yQrMk/ay7ZcUC9WEUvrxVZdEaU7Migy+RUjanfgeTGEiklJyKWHPGhkxG0wkIAaswKhPcLQdsw+cBoGd9ABKmxb973h9iMJfhUbmXMUnCu3pgsnOg/nZmdjkVwMsnbYTkriQO+ZR+PceUrJaSuIoieKWPNu3VYbpSno2p7DknBAxXSEiiBv2xXAuNm1kubgsE9Vg0wfAzzUKQp/A1FuGR/woXJquBCA4uVmsQ== Received: from DM6PR12CA0035.namprd12.prod.outlook.com (2603:10b6:5:1c0::48) by BYAPR12MB2903.namprd12.prod.outlook.com (2603:10b6:a03:139::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Fri, 24 Jun 2022 13:20:02 +0000 Received: from DM6NAM11FT019.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1c0:cafe::28) by DM6PR12CA0035.outlook.office365.com (2603:10b6:5:1c0::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17 via Frontend Transport; Fri, 24 Jun 2022 13:20:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by DM6NAM11FT019.mail.protection.outlook.com (10.13.172.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5373.15 via Frontend Transport; Fri, 24 Jun 2022 13:20:02 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 24 Jun 2022 13:20:01 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Fri, 24 Jun 2022 06:20:01 -0700 Received: from nvidia.com (10.127.8.11) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.26 via Frontend Transport; Fri, 24 Jun 2022 06:20:00 -0700 From: Dmitry Kozlyuk To: CC: Bruce Richardson Subject: [PATCH v4 1/5] usertools: add option to select hugetlbfs directory Date: Fri, 24 Jun 2022 16:19:52 +0300 Message-ID: <20220624131956.75160-2-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220624131956.75160-1-dkozlyuk@nvidia.com> References: <20220624084817.63145-1-dkozlyuk@nvidia.com> <20220624131956.75160-1-dkozlyuk@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 795bd794-f2bd-4aa0-8a05-08da55e43ee8 X-MS-TrafficTypeDiagnostic: BYAPR12MB2903:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9Ud94Apyi80m+2F/R+jONnNaDehjewObWm1T6bsO/CbJfHE05Fdi1IJQPYnPQpEqV6AkfZofKv5XkVoq1Yygmo+GCIveIfEB6AXvGQ65n4Gd5ui/i4/2IUnz85kJ49FarFUSClW6S8qSiYW41DQOeUDyTyGOUki8fRZb2K1JJxZNaz71wm+ZK0tDlNg7Ke08cwCwLgYPpKSBUnImPuWYmm+ENWE/AyYAHnhqL++3IydvmThaPRkOUWR7DdtJ4ebpxEMlghU3mrpXUV5t5tKJyclDoEXAtCYHRJGBewTqI6iZRP71GwYkcScoNl0DjNKLZPZeRxifsXWgGxqwbpcnAypoNoI70Nj76swOTukzMg8Fr22gfg6QKfl2GDi2MGxf4XgBRB0Vf4RpELa0lSOG0cyX1LZ9P/0MAKAiGeYeczsY4tRAIUgyYr/l0diNDKsqWp0UN2rQjA/8DAFnZkAPGU+/aFQWrHj6agKTZZlQmHx/E2QIyhL3cLAyhmKy+OzZyZyEJjcuoGcN3z9Yhw6FOcx2hQxmf10yn00LJMiIcjUW4FC0fax+yuBAgkz3yo22rAq1lVkut6f8ME5rRMIYx3fbIifE8PF472AAoDhONIyYZehYf0RnoQ8sKHg2XfKyLZV9Kehw6LlJZHIs+Ueu/rqOXAminhmiFYXBM/ILGY+emcn1lwa918bZyzTQYFyT6Qru/WOLBrLrqKJX0Zop44G28nv5EUMWn50Ipw8a09sy1+a9/VgUtGM0ag1PrR+39cpYoSWIxBuWgU+9+K9o8JKiYlFrfvay7rmm1UaP2Klw5Adch4TDKoVhH9IY7oIJUaUW/9lYG1zL0LdoM0HXpg== X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(376002)(136003)(39860400002)(396003)(346002)(46966006)(40470700004)(36840700001)(336012)(186003)(26005)(478600001)(41300700001)(2616005)(82740400003)(47076005)(1076003)(36860700001)(426003)(316002)(356005)(83380400001)(6286002)(7696005)(6666004)(81166007)(36756003)(86362001)(4326008)(2906002)(40480700001)(70206006)(6916009)(70586007)(8936002)(82310400005)(55016003)(5660300002)(8676002)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2022 13:20:02.1428 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 795bd794-f2bd-4aa0-8a05-08da55e43ee8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT019.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2903 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 dpdk-hugepages.py had /dev/hugepages hardcoded as the mount point. It may be desirable to setup hugepage directory at another path, for example, when using hugepages of multiple sizes in different directories or when granting different permissions to mount points. Add --directory/-d option to the script. Signed-off-by: Dmitry Kozlyuk Acked-by: Bruce Richardson --- usertools/dpdk-hugepages.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usertools/dpdk-hugepages.py b/usertools/dpdk-hugepages.py index 4fdb199744..8bab086a2f 100755 --- a/usertools/dpdk-hugepages.py +++ b/usertools/dpdk-hugepages.py @@ -228,6 +228,12 @@ def main(): '-u', action='store_true', help='unmount the system huge page directory') + parser.add_argument( + '--directory', + '-d', + metavar='DIR', + default=HUGE_MOUNT, + help='mount point') parser.add_argument( '--node', '-n', help='select numa node to reserve pages on') parser.add_argument( @@ -262,7 +268,7 @@ def main(): if args.clear: clear_pages() if args.unmount: - umount_huge(HUGE_MOUNT) + umount_huge(args.directory) if args.reserve: reserve_kb = get_memsize(args.reserve) @@ -273,7 +279,7 @@ def main(): reserve_pages( int(reserve_kb / pagesize_kb), pagesize_kb, node=args.node) if args.mount: - mount_huge(pagesize_kb, HUGE_MOUNT) + mount_huge(pagesize_kb, args.directory) if args.show: show_pages() print() -- 2.25.1