From patchwork Thu May 31 13:48:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bugzilla-daemon@bugs.linaro.org X-Patchwork-Id: 137391 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp6625441lji; Thu, 31 May 2018 06:48:25 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKCSeTQ2GBJXx/lSJDjMiDMHmKM8ZAiE+hdvm0Q4xE4WIpaezcQXl6B/PlWytJ3YJi350+H X-Received: by 2002:a0c:95c1:: with SMTP id t1-v6mr2084975qvt.240.1527774505632; Thu, 31 May 2018 06:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527774505; cv=none; d=google.com; s=arc-20160816; b=fLQ8d03CszgEaB5GjBUSf4u8XMi19r/eUCh8daG8yM3wOuSOwBuEuvTVCRTbhNw8/X Kt8vfizsr1sJ2ADUgmIpJbAorZ7r36ACDBCfaTKQ8EitXSCl3Av7eishOH0hSeuXLNNs 8oCPacF3BMBPONkqkFWkmgR9IL6ggmVUpPEgvV9KGuJDgN2EQy4vIhennO/6+sLxs4aQ Yr83YiRWZ20EurfmPpbunkTaxeVHyHIVkNiU+vKBqdrorFBGKLUE5uxbFAJCzkkQMZG/ pAGCWmuOkO7R/gNsQNtxKNGisyCPDW8tMNunuQdkPpVyHJqGKYfwhUx//Nhh9QUZrQfs IUqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:feedback-id:mime-version:auto-submitted :message-id:date:to:from:delivered-to:arc-authentication-results; bh=TxiDD9957on7bb3OTpzFKhI1V/rEXBIWRl06Ksd3xvU=; b=IgD9rMufXlZ0N5msJqi4p97C8Y6Y8eq+razZx49K0lG1JEyIlWGlqs2hx5DMqbC4Wz 9BIAvvpTmAVs8kuB9e/OEEuU0OYQg2Mt3Cafs/Cocj/ovEGybm0nmERXzvJbTZB86Rjo 7dybAre1wdJYEKcqsdKOo77FZ1cw+uvlsDirIHaqdnoJDbDl5heAykVXmHIRoNUlYy2F cEKoL/eNO5tPddHf36pAYSkzmS5iv2mWO2BmDcorCur4rN990yO/O7QQ9x3K2LJmeMZn U/plO8HR4Rx8V0vOd85yfd+tJIoNcwlimfLKsmte5zWvHp9DkxvBVhhFFF7wfgU72QvG Qw3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id d1-v6si24290281qvj.170.2018.05.31.06.48.25; Thu, 31 May 2018 06:48:25 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id F0477616ED; Thu, 31 May 2018 13:48:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 7F7426089D; Thu, 31 May 2018 13:48:15 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id E83FB60F4E; Thu, 31 May 2018 13:48:12 +0000 (UTC) Received: from a8-95.smtp-out.amazonses.com (a8-95.smtp-out.amazonses.com [54.240.8.95]) by lists.linaro.org (Postfix) with ESMTPS id 6B2E56089D for ; Thu, 31 May 2018 13:48:11 +0000 (UTC) From: bugzilla-daemon@bugs.linaro.org To: lng-odp@lists.linaro.org Date: Thu, 31 May 2018 13:48:11 +0000 X-Bugzilla-Reason: CC AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: OpenDataPlane - linux- generic reference X-Bugzilla-Component: Timers X-Bugzilla-Version: v1.15.0.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: josep.puigdemont@linaro.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: lng-odp@lists.linaro.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 cc target_milestone Message-ID: <01000163b674b125-d5dd17be-2896-4433-a9e2-863037c2b31a-000000@email.amazonses.com> X-Bugzilla-URL: https://bugs.linaro.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SES-Outgoing: 2018.05.31-54.240.8.95 Feedback-ID: 1.us-east-1.Y2eXJruXwxqfBntQfC4/6O4zDrCY0XKEghZ/yI2DADM=:AmazonSES X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Subject: [lng-odp] [Bug 3867] New: timer validation test fails when using 1GB huge pages X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" 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 --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;