From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F926C433E6 for ; Wed, 10 Mar 2021 23:54:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A44164FC5 for ; Wed, 10 Mar 2021 23:54:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234187AbhCJXyK (ORCPT ); Wed, 10 Mar 2021 18:54:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:43014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234182AbhCJXxs (ORCPT ); Wed, 10 Mar 2021 18:53:48 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3FEB364FC5; Wed, 10 Mar 2021 23:53:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1615420428; bh=IsuxhJa3di+evhq8r8rK8ENoYFwOXOcaKK8a1eG0lmw=; h=Date:From:To:Subject:From; b=VoNBKLhFtACv/Q42HIc+e2eUJqYxqS0YApJvUEjsBLLlQ5duM6fQAc1xuyufZtDty 1jXH8glEU12Jdymi1ps4uRyYTDlx2VlNA5qnDvPsZOzcvLG0Li8tIAmz873Z1AJDaN 7a7XrQqkC0c+5sukSQtGZ4lJsqdA2LTwgWQ5dtew= Date: Wed, 10 Mar 2021 15:53:47 -0800 From: akpm@linux-foundation.org To: aarcange@redhat.com, axelrasmussen@google.com, mm-commits@vger.kernel.org, nadav.amit@gmail.com, peterx@redhat.com Subject: + userfaultfd-selftests-remove-the-time-check-on-delayed-uffd.patch added to -mm tree Message-ID: <20210310235347.21zapi-ae%akpm@linux-foundation.org> User-Agent: s-nail v14.8.16 Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The patch titled Subject: userfaultfd/selftests: remove the time() check on delayed uffd has been added to the -mm tree. Its filename is userfaultfd-selftests-remove-the-time-check-on-delayed-uffd.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/userfaultfd-selftests-remove-the-time-check-on-delayed-uffd.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/userfaultfd-selftests-remove-the-time-check-on-delayed-uffd.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Peter Xu Subject: userfaultfd/selftests: remove the time() check on delayed uffd There seems to have no guarantee that time() will return the same for the two calls even if there's no delay, e.g. when a fault is accidentally crossing the changing of a second. Meanwhile, this message is also not helping that much since delay could happen with a lot of reasons, e.g., schedule latency of resolving thread. It may not mean an issue with uffd. Neither do I see this error triggered either in the past runs. Even if it triggers, it'll be drown in all the rest of test logs. Remove it. Link: https://lkml.kernel.org/r/20210310004511.51996-3-peterx@redhat.com Signed-off-by: Peter Xu Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Nadav Amit Signed-off-by: Andrew Morton --- tools/testing/selftests/vm/userfaultfd.c | 8 -------- 1 file changed, 8 deletions(-) --- a/tools/testing/selftests/vm/userfaultfd.c~userfaultfd-selftests-remove-the-time-check-on-delayed-uffd +++ a/tools/testing/selftests/vm/userfaultfd.c @@ -568,7 +568,6 @@ static void *locking_thread(void *arg) unsigned long long count; char randstate[64]; unsigned int seed; - time_t start; if (bounces & BOUNCE_RANDOM) { seed = (unsigned int) time(NULL) - bounces; @@ -605,7 +604,6 @@ static void *locking_thread(void *arg) page_nr += 1; page_nr %= nr_pages; - start = time(NULL); if (bounces & BOUNCE_VERIFY) { count = *area_count(area_dst, page_nr); if (!count) { @@ -668,12 +666,6 @@ static void *locking_thread(void *arg) count++; *area_count(area_dst, page_nr) = count_verify[page_nr] = count; pthread_mutex_unlock(area_mutex(area_dst, page_nr)); - - if (time(NULL) - start > 1) - fprintf(stderr, - "userfault too slow %ld " - "possible false positive with overcommit\n", - time(NULL) - start); } return NULL; _ Patches currently in -mm which might be from peterx@redhat.com are hugetlb-dedup-the-code-to-add-a-new-file_region.patch hugetlg-break-earlier-in-add_reservation_in_range-when-we-can.patch mm-introduce-page_needs_cow_for_dma-for-deciding-whether-cow.patch mm-use-is_cow_mapping-across-tree-where-proper.patch hugetlb-do-early-cow-when-page-pinned-on-src-mm.patch hugetlb-pass-vma-into-huge_pte_alloc-and-huge_pmd_share.patch hugetlb-pass-vma-into-huge_pte_alloc-and-huge_pmd_share-fix.patch hugetlb-userfaultfd-forbid-huge-pmd-sharing-when-uffd-enabled.patch hugetlb-userfaultfd-forbid-huge-pmd-sharing-when-uffd-enabled-fix.patch mm-hugetlb-move-flush_hugetlb_tlb_range-into-hugetlbh.patch hugetlb-userfaultfd-unshare-all-pmds-for-hugetlbfs-when-register-wp.patch userfaultfd-selftests-use-user-mode-only.patch userfaultfd-selftests-remove-the-time-check-on-delayed-uffd.patch userfaultfd-selftests-dropping-verify-check-in-locking_thread.patch userfaultfd-selftests-only-dump-counts-if-mode-enabled.patch userfaultfd-selftests-unify-error-handling.patch