From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0090.outbound.protection.outlook.com [65.55.169.90]) by dpdk.org (Postfix) with ESMTP id B2BF24AAD for ; Mon, 14 Mar 2016 13:16:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8R5AJWKoz+Y4noPwsDaMyc7yzfhaQJDcT/NorbDLqR0=; b=pEc/PbKaioNwmirOoVBAvoh8Nxa7AzgYdRqTGJk5F9Iz/dFgcHZPvISYWVq1h++cVDzLMe8BDJPgFb1LDLoqBgKzx/GEIraqW4karP4Kl4/oEE87qMAW18raqsSa5drSqbLKMBRm0CiatcokiMkCF/hV7xFQMzK/jn3RFsSlw6E= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.caveonetworks.com (122.167.196.86) by CY1PR0701MB1726.namprd07.prod.outlook.com (10.163.21.140) with Microsoft SMTP Server (TLS) id 15.1.427.16; Mon, 14 Mar 2016 12:16:19 +0000 From: Jerin Jacob To: CC: , Jerin Jacob Date: Mon, 14 Mar 2016 17:45:31 +0530 Message-ID: <1457957732-24066-2-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1457957732-24066-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1457957732-24066-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.167.196.86] X-ClientProxiedBy: BM1PR01CA0029.INDPRD01.PROD.OUTLOOK.COM (25.163.198.164) To CY1PR0701MB1726.namprd07.prod.outlook.com (25.163.21.140) X-MS-Office365-Filtering-Correlation-Id: b45a445a-541b-4b52-e037-08d34c02741e X-Microsoft-Exchange-Diagnost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AKd4y5T+c36EojMdOY8Jnt/mE479Tonajz4CQvtLd0lxgvnwdGBWAfx/gIT9XcsaIwoyNxHH+hobKbWjqvyaicWhAXvwgKUg7xsUSs32PpSVR6owCU+MAzw4e6RT8ffnNA6ARVdvJF7bdw5M4GZs3zjWFqk6BtyRyz1FEtdqxr0S8qtrAaUifYDeL2S1iRo3iot8X0h35U0aYgTgq37dCXIncPqtey9yhQp9++ND1uB7I9h4GvSmmp5UTJALlGfKzU2R7VPJf0OMmj8CFHrcELQ2Q95rIIYLqyTUA98eO0WpRMVGZAtDRTNNFSAjMBy1LpWlfQNI4N5rk9pyBeb44I= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:CY1PR0701MB1726; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1726; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 4:Nys6uLgQ16PxtEIXtOksBq0PejC6GUATAQsbFMC9ti/2K/DZkXoeKW+Lbty0PINnlyVi0tU0LbXvfbNMhjFqREB2rc3cDKMsmpD9XfO3yYeF94DRK5bLIYURNhVJKJVrxaChz5VaTJEbVDbgB5uioTiHbr0Wwk40CL6FYIdm7N4JIJe3HapexHyS7mTIX2SZVqPjT8Y5aW8TyfZY2t5uF2qwUwmLHfDjixX0jDPpZtTn0XFqSgZtltO59+pPTUA/1sPZgZ3yLJlArQ1zU8Wy4l5SMkKbC/QuY/JvdS3ATarUUyZox8U+BgUT4Cy6cY7x2tjTuz0K2LK76QSC6hJxZVP/z9pfa02LcWOsrvCFpwzb12jH5a39tzgjV3dTmJXg X-Forefront-PRVS: 0881A7A935 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6009001)(6069001)(50226001)(86362001)(48376002)(66066001)(53416004)(76506005)(50986999)(36756003)(76176999)(5003940100001)(19580405001)(50466002)(42186005)(586003)(6116002)(33646002)(2351001)(107886002)(19580395003)(92566002)(110136002)(3846002)(229853001)(77096005)(2950100001)(4001430100002)(5004730100002)(2906002)(81166005)(4326007)(47776003)(1096002)(189998001)(5008740100001)(7099028)(14583001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1726; H:localhost.caveonetworks.com; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1726; 23:T1m/xxAdn1hri+9xk2/jKIQ8M3Q0CHYl8zaPUcf?= =?us-ascii?Q?rO/mDVLT6a9lX5EOKP2tF8+I1FuaOLj3ZDBs9MSM6wDLnMpymlxr34jYPUfu?= =?us-ascii?Q?24I/L1twzDumf+QCBQD0/UAb+8p0KajaztKFX5Hwd6UvzYbNnv0nu/mEtxBR?= =?us-ascii?Q?3fgPn/t3xsT1bIi0zyHgxXiy+gV6eBMIZvD8bRYO16llE9fZt8CG8oIUgf9E?= =?us-ascii?Q?x2UVHQjOSi0qN3zH6jnDwuI2b1Z/ejAwcnq24cKw/GD1ehK/kRhkfaIz9riL?= =?us-ascii?Q?2MagJObZwJ6mdsRIxVqfH1yoq2s1u2A4ywrSvJJ+bXfoN23+euBY0EZHYplE?= =?us-ascii?Q?aXFYqNstFWCrf6fZHv7Dqe+2Sl+Yo0p4Ok2KRh0RDRxMEFp50H8v3hKwrbus?= =?us-ascii?Q?TIkQWei+eCGspdRAZbMP1Y4T9W0hjUp2GQrPavtrqJUXV0wlIYsQu4nFfweI?= =?us-ascii?Q?0uB6L+GbvCRzln47mpuGA4b8+A5WxuB/esbEdJO2oreZlHrak1aHkowdsIIF?= =?us-ascii?Q?uWdar+LYrw7hkPxtYGm6UyW82suYBGQusvG9W1kacF/s+0pQVT68pI4ww/U0?= =?us-ascii?Q?0YAFw8WQDUmazsOMjXNeS7tPjhPpmbjm4O0CpL83PFQk3Qyvv3fUvJugYnPS?= =?us-ascii?Q?JKOxr5H6m7jyrYKNa/Ktq7I1Kqp9NMsy0y1coXwMAcRfkZs2tm+nxq/n2WYV?= =?us-ascii?Q?vbp5yU1iNqneUjMzB0EiHueY5PulhSNb5AuaOlZrSp8XP8mdjLPpAyQEJZFP?= =?us-ascii?Q?1fE1ZSaQuYQVQKiFUDkKPMu07Ngm3dLaClR0De23alSpwA8MeB2r5+JANlrt?= =?us-ascii?Q?hzq+pvoXohwEoFEQ8zEZ6icdlVHNFLFxl94iwgSzxa9n05IVy732GM3WPEmn?= =?us-ascii?Q?YjKZHAKIIxrgYwuP+wly7BJdIzySF3JisscKbXbtMIJxseDFVrbFSl1KlqEJ?= =?us-ascii?Q?tjfUbLWkypuiGXiUE0silM4qBkrLpmKAKiQdIPePTnbac8z5ymjlJcRg6sp9?= =?us-ascii?Q?vEZ/5pgftrZ+ZSbS4dZSrsOV0By4N3kofsSt+opJYpYLfcarwfbsRc0UaVHp?= =?us-ascii?Q?fvl+KHNlEINhcThwI6WhQDUwMM/TZZuI0MNGZl7M/1elIorSZuVxbZudicZo?= =?us-ascii?Q?3ix9ahyQ3Fj93Mf5APnhxMqRECw++E/17?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 5:OCSoNJKtB2yjFN9M1pgQ9+MJochWJ6fve70hpw/tif3/V02oxjkTn0sPhokxgpSyufLWc27ebRW9ekAYAw9Xcq1VJihYcn8diukuKpbnbeDpQh1vsVFHkcUEnbAzvPqFV8mZu2/oTAbisZDUNzhXEg==; 24:Z0nbFHM2hz29DIVQmtSnsKYPB9lMXg6njIJXIwb7dOxwtUsLB2WGR3+oc03dgEiEwn1FV86vvcaeDWhbIMXBmlv3Xfl/+j6rcIn156a/BMc= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2016 12:16:19.5416 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1726 Subject: [dpdk-dev] [PATCH 1/2] tools/setup.sh: remove 2MB huge page size hard-cording X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2016 12:16:23 -0000 Signed-off-by: Jerin Jacob --- tools/setup.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tools/setup.sh b/tools/setup.sh index faa5eee..b290b87 100755 --- a/tools/setup.sh +++ b/tools/setup.sh @@ -44,6 +44,8 @@ echo "-------------------------------------------------------------------------- echo " RTE_SDK exported as $RTE_SDK" echo "------------------------------------------------------------------------------" +HUGEPGSZ=`cat /proc/meminfo | grep Hugepagesize | cut -d : -f 2 | tr -d ' '` + # # Application EAL parameters for setting memory options (amount/channels/ranks). # @@ -325,7 +327,7 @@ clear_huge_pages() { echo > .echo_tmp for d in /sys/devices/system/node/node? ; do - echo "echo 0 > $d/hugepages/hugepages-2048kB/nr_hugepages" >> .echo_tmp + echo "echo 0 > $d/hugepages/hugepages-${HUGEPGSZ}/nr_hugepages" >> .echo_tmp done echo "Removing currently reserved hugepages" sudo sh .echo_tmp @@ -342,13 +344,13 @@ set_non_numa_pages() clear_huge_pages echo "" - echo " Input the number of 2MB pages" - echo " Example: to have 128MB of hugepages available, enter '64' to" - echo " reserve 64 * 2MB pages" + echo " Input the number of ${HUGEPGSZ} hugepages" + echo " Example: to have 128MB of hugepages available in a 2MB huge page system," + echo " enter '64' to reserve 64 * 2MB pages" echo -n "Number of pages: " read Pages - echo "echo $Pages > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages" > .echo_tmp + echo "echo $Pages > /sys/kernel/mm/hugepages/hugepages-${HUGEPGSZ}/nr_hugepages" > .echo_tmp echo "Reserving hugepages" sudo sh .echo_tmp @@ -365,8 +367,8 @@ set_numa_pages() clear_huge_pages echo "" - echo " Input the number of 2MB pages for each node" - echo " Example: to have 128MB of hugepages available per node," + echo " Input the number of ${HUGEPGSZ} hugepages for each node" + echo " Example: to have 128MB of hugepages available per node in a 2MB huge page system," echo " enter '64' to reserve 64 * 2MB pages on each node" echo > .echo_tmp @@ -374,7 +376,7 @@ set_numa_pages() node=$(basename $d) echo -n "Number of pages for $node: " read Pages - echo "echo $Pages > $d/hugepages/hugepages-2048kB/nr_hugepages" >> .echo_tmp + echo "echo $Pages > $d/hugepages/hugepages-${HUGEPGSZ}/nr_hugepages" >> .echo_tmp done echo "Reserving hugepages" sudo sh .echo_tmp -- 2.1.0