All of
 help / color / mirror / Atom feed
* [dpdk-dev] [Bug 725] script broken
@ 2021-06-03 15:08 bugzilla
  2021-06-03 19:36 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: bugzilla @ 2021-06-03 15:08 UTC (permalink / raw)
  To: dev

            Bug ID: 725
           Summary: script broken
           Product: DPDK
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: other
  Target Milestone: ---

Hi Folks,

It seems like the usertools/ 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/ -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 pages"
as 1 != 0, and does *not* continue attempting other pages sizes/things.

This check and "sys.exit()" was introduce in this commit:

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/ b/usertools/
index fb368b6933..0ef667c5f9 100755
--- a/usertools/
+++ b/usertools/
@@ -68,8 +68,10 @@ def set_hugepages(path, pages):
     except FileNotFoundError:
         sys.exit("Invalid page size. Valid page sizes: {}".format(
-    if get_hugepages(path) != pages:
-        sys.exit('Unable to reserve required pages.')
+    num_pages = get_hugepages(path)
+    print("num pages {0} and pages {1}".format(num_pages, pages))
+    if num_pages != pages:
+        print('Unable to reserve required pages.')

You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-03 19:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 15:08 [dpdk-dev] [Bug 725] script broken bugzilla
2021-06-03 19:36 ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.