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 DF40FA0A0A; Thu, 3 Jun 2021 17:08:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A97940E78; Thu, 3 Jun 2021 17:08:54 +0200 (CEST) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id EBD6440DF6 for ; Thu, 3 Jun 2021 17:08:52 +0200 (CEST) Received: by inbox.dpdk.org (Postfix, from userid 33) id B2E7DA0A0C; Thu, 3 Jun 2021 17:08:52 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Thu, 03 Jun 2021 15:08:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: other X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: harry.van.haaren@intel.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 725] hugepages.py script broken 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 Sender: "dev" https://bugs.dpdk.org/show_bug.cgi?id=3D725 Bug ID: 725 Summary: hugepages.py script broken Product: DPDK Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Normal Component: other Assignee: dev@dpdk.org Reporter: harry.van.haaren@intel.com Target Milestone: --- Hi Folks, It seems like the usertools/dpdk-hugepages.py script has changed/broken for certain systems. I've applied the below patch to see why it was calling "sys.exit()", which provides the following output; $ usertools/dpdk-hugepages.py -p1G --setup 2G num pages 0 and pages 0 num pages 1 and pages 0 Unable to reserve required pages. num pages 0 and pages 0 num pages 2 and pages 0 Unable to reserve required pages. num pages 4 and pages 2 Unable to reserve required pages. num pages 2 and pages 2 As we can see, it attempts multiple things, and then succeeds (DPDK runs and allocs hugepages as required after this). Today the behavior will "fail" on the first "unable to reserve required pag= es" as 1 !=3D 0, and does *not* continue attempting other pages sizes/things. This check and "sys.exit()" was introduce in this commit: b25f0a7df80b620bab09dcb34bf4547d31ddede1 I'm not familiar with this script/hugepage reservation, so don't know what'= s a good fix. No owner of this script in MAINTAINERS either. diff --git a/usertools/dpdk-hugepages.py b/usertools/dpdk-hugepages.py index fb368b6933..0ef667c5f9 100755 --- a/usertools/dpdk-hugepages.py +++ b/usertools/dpdk-hugepages.py @@ -68,8 +68,10 @@ def set_hugepages(path, pages): except FileNotFoundError: sys.exit("Invalid page size. Valid page sizes: {}".format( get_valid_page_sizes(path))) - if get_hugepages(path) !=3D pages: - sys.exit('Unable to reserve required pages.') + num_pages =3D get_hugepages(path) + print("num pages {0} and pages {1}".format(num_pages, pages)) + if num_pages !=3D pages: + print('Unable to reserve required pages.') --=20 You are receiving this mail because: You are the assignee for the bug.=