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 6E25CA0032; Fri, 24 Jun 2022 10:48:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E648E40A87; Fri, 24 Jun 2022 10:48:31 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 52EEB40A82 for ; Fri, 24 Jun 2022 10:48:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OoJ8ADUBmlL+8eC7GsO9koljr2YtG0jSvWKlx6N+07u2ZvRg/VPv+iW/NTIAkFGAv6+VEzeE6fo8570z9LZEe7t5Y+RMoK+Nu/mdCEQFvUw98o4UVQowJa/BpCbCqQM1di+Bye/a4vJZ89Zfbrtd8Jv8P/2DXW1OIpZkCNlYc6G3EnP047T6jCDz3mWyMDVSfpE5PTXjQB0SIW/clbqTzch+diiNft6kwxpggyu/UkfiRjK04fL5SJeKfGuvxOapkL/vT+0VRVf7fJ2FI0rsjOAuD48un4YtE7lMSbTeJflZPIizgKETqm2vr1B6F/Q8WiEi7cFYMY7Ta1F5v4K5iQ== 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=4IxijkFbpYwZI+RXV+VFoqmnoirHivSYuA4FBc641Z4=; b=j66e0O5zNjrQgThUc7DDXTbOHfhLzGJ+RswtLkIQUchNT5BPTi/lq8N/XiKTdiGO+4LrgLuZ4oeZ8sMc8z0Y9kxMwcb9Ikg9IyDhfPrignBh40KSyB6ixY8CZzipl57XA6F9YA4+rvJES23HVSSHvLcR4A0zkwFJfQ+Q+ZuCQgeVQU822FjmQkaNZerQmuAXW0Lc8S9tnY5tIRWsn4rkoP3qYH1TzPpAQHMOw+zC/Y/laX49dWsdby3JSMIM45tXvE4gZWB4YQZorYlFP+Ok1uAgWSLS9X5R6YXg1f2eiINupOtBQ1b7ffpE2uzFVyW5LDwz3sMyY0ZYA/Nni7sjSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=dpdk.org 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=4IxijkFbpYwZI+RXV+VFoqmnoirHivSYuA4FBc641Z4=; b=LFmJbV+Lzv8YVOib2cTv6osg5tw9ayUhxphbFaDJGks4HSln+EmZqroVRwQhRfRrZb6RgrS1teh/i06/AghU8LSE3y7mcnvMleFYLFCmA4OLXXiLfmtaHbpaNwad/DtWXFAovjJkNmBTUi7/ugORgm8HG+37aMOVjVeBHFZqP2aq2vL2kwzd8IWGZNDS5fjgcCU/ZGE/sqOhDTyAcpnAANgLqKA493x717Nx5t3eNAUFMh2xLSLwC4qI1sLBW/xPOYM5TQ6Qe05hQMfWxhPrRFgpMqxY6bC+alTHf88mYW6VjnIj2ciakVq4rRWuTj5EkqqkvTHQijUs1QHF+5JLbw== Received: from DM6PR17CA0015.namprd17.prod.outlook.com (2603:10b6:5:1b3::28) by DM5PR12MB1706.namprd12.prod.outlook.com (2603:10b6:3:10f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.18; Fri, 24 Jun 2022 08:48:28 +0000 Received: from DM6NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1b3:cafe::af) by DM6PR17CA0015.outlook.office365.com (2603:10b6:5:1b3::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Fri, 24 Jun 2022 08:48:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.238) by DM6NAM11FT034.mail.protection.outlook.com (10.13.173.47) 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 08:48:27 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 24 Jun 2022 08:48:27 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail205.nvidia.com (10.129.68.10) 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 01:48:26 -0700 Received: from nvidia.com (10.127.8.11) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.26 via Frontend Transport; Fri, 24 Jun 2022 01:48:25 -0700 From: Dmitry Kozlyuk To: Subject: [PATCH v3 1/5] usertools: add option to select hugetlbfs directory Date: Fri, 24 Jun 2022 11:48:13 +0300 Message-ID: <20220624084817.63145-2-dkozlyuk@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220624084817.63145-1-dkozlyuk@nvidia.com> References: <20220617112508.3823291-1-dkozlyuk@nvidia.com> <20220624084817.63145-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: 2b6345f9-7ed5-4482-7f9f-08da55be4ecd X-MS-TrafficTypeDiagnostic: DM5PR12MB1706:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P6TWRVacKgc+k9CA6O8YNvaEHwi+6/h0m3BNhx1ONpC/Mgqbw5oH1oxquxObNoyzfuVOgLrVaIj/k6hruVbjgvoDVS7mhxYeE8xhNOhOsu7iYNiqxWexcQKtsW/zZWEvGhlo4tiOJAiXmWedsbgyS4Kw0I6C3+aQL+9jPTsnDrx4DhG0HS8RuMYZcolozkt0HnivIXjxNTvetvLmT8sf+0l0AWGenNeBttx3YgElz8B/KtVPzEfVB4l7LJAjWAOr5sbFjR8m9mm3Wb6CmH1su7OdWZoRUAo9q7jckM9f6th/PlZS/atjHmMIcPFAw1pSAqciKQFMp8+lUOg4DQWNgSQaQEq1zXlCg09SJHmfHD5VSo8TYvDwfHIuW5MLfZG5l3eaEUp7mrX32Uh2ZHlMWFIizHlhO3nwrbE0fEcmCRtAzMu/MMooG6e4OCXZaM7sypA4uykA7YnJdwDj/42SUt4EUKLDfzhjAjs9l9KNE+gXb+lBzMW4rxhcwSdOiJ+pGq86WMRmnDj+rgIYdcSXhPtzCRSOAEweDj0lMbywsxH+AxTjQcFpE6o4tgxiXvJA6FIy74PQlyqb2DaNJWoTBCtZV+YqPKKzvM/Zy8zXrfFYZ/heg6I+aXN38EZIsALh8QKYxgEXeF1OvwOHtZKqQUNU6cIZfVrqhiZgQvGB6xW+yFUUlCtzhb0PVYFSvI9/sc1oC/uoOF0VDJNI75H/qkuo+txajRBws06odeuwZ5a48W2hiJVTWdKcoKJO28cndHM13Cc0v2tPYOtr2pznkEtCtXhfzpl8M+E1larXS2cGQ9CJNGRP2wSRtV19zbXBD4ihhdBndE8HkBF41QtxDw== X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(396003)(346002)(376002)(136003)(46966006)(40470700004)(36840700001)(1076003)(41300700001)(2616005)(82740400003)(356005)(40480700001)(83380400001)(36860700001)(70206006)(55016003)(336012)(70586007)(47076005)(40460700003)(426003)(36756003)(186003)(8676002)(82310400005)(6286002)(26005)(5660300002)(81166007)(6666004)(8936002)(7696005)(2906002)(6916009)(478600001)(316002)(86362001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2022 08:48:27.9490 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2b6345f9-7ed5-4482-7f9f-08da55be4ecd 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.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1706 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 --- 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