diff mbox series

[Bug,3867] New: timer validation test fails when using 1GB huge pages

Message ID 01000163b674b125-d5dd17be-2896-4433-a9e2-863037c2b31a-000000@email.amazonses.com
State New
Headers show
Series [Bug,3867] New: timer validation test fails when using 1GB huge pages | expand

Commit Message

bugzilla-daemon@bugs.linaro.org May 31, 2018, 1:48 p.m. UTC
https://bugs.linaro.org/show_bug.cgi?id=3867

            Bug ID: 3867
           Summary: timer validation test fails when using 1GB huge pages
           Product: OpenDataPlane - linux- generic reference
           Version: v1.15.0.0
          Hardware: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: ---
         Component: Timers
          Assignee: lng-odp@lists.linaro.org
          Reporter: josep.puigdemont@linaro.org
                CC: lng-odp@lists.linaro.org
  Target Milestone: ---

As mentioned in comment #2 in bug 3774, the timer validation tests fails when
using 1GB huge pages.

It seems that the kernel zeroes-out the page before handing it out to user
space, and this seems to be done at the first write to the page, that is, once
it is committed (initially the page is only reserved). For 2MB huge pages the
procedure may be fast enough, but for 1GB pages it seems to be too time
consuming, and may be the reason the first timer is delayed, causing the test
to fail.

To check this a patch that "touches" a page when it is mapped was tried:

        new_block->user_len = size;


This patch makes the timer test succeed again with 1GB huge pages, but causes
shmem_linux to fail. The reason is that the shared memory file is opened by two
different processes, one writes some well known data into it, which is read by
the other one. The problem is that the second process, when creating the shared
memory, now writes a zero where something else is expected to be read later.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
diff mbox series

Patch

diff --git a/platform/linux-generic/odp_ishm.c
b/platform/linux-generic/odp_ishm.c
index fc2f948c..8c40399d 100644
--- a/platform/linux-generic/odp_ishm.c
+++ b/platform/linux-generic/odp_ishm.c
@@ -969,6 +969,8 @@  int _odp_ishm_reserve(const char *name, uint64_t size, int
fd,
                return -1;
        }

+       *((int *)addr) = 0;
+
        /* remember block data and increment block seq number to mark change */
        new_block->len = len;