From patchwork Wed Mar 10 00:45:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 12126791 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 53D1EC433E0 for ; Wed, 10 Mar 2021 00:45:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D12EF650A2 for ; Wed, 10 Mar 2021 00:45:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D12EF650A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 71CF38D015B; Tue, 9 Mar 2021 19:45:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F4B38D0148; Tue, 9 Mar 2021 19:45:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56D8F8D015B; Tue, 9 Mar 2021 19:45:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0131.hostedemail.com [216.40.44.131]) by kanga.kvack.org (Postfix) with ESMTP id 3A74A8D0148 for ; Tue, 9 Mar 2021 19:45:19 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id F101A5DC6 for ; Wed, 10 Mar 2021 00:45:18 +0000 (UTC) X-FDA: 77902120716.13.173B42B Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf02.hostedemail.com (Postfix) with ESMTP id EB667407F8F8 for ; Wed, 10 Mar 2021 00:45:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615337118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L8nfZJKhv+r2vlPxmKndFS7iJCcyevUUZHWcDdBpSWU=; b=FT3rtg9wNAJ3hfV4tppfQBGyLxfyfrwuBu2EOYIZ+6WKxRYUIwRM0DA9pjlRgQ+HKKkYWl 5EXeUgf1AkJavBieQIPNqYNHFPoIbQExfHTeR+J86+ECGgk7KBt4Wo+1MB2Zi9jg3mzuOT IJWc36RrH3xUQIJvDFGrH1TYf0+jnSI= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-151-25B1N__aMLCo92vi-jO3gg-1; Tue, 09 Mar 2021 19:45:16 -0500 X-MC-Unique: 25B1N__aMLCo92vi-jO3gg-1 Received: by mail-qk1-f197.google.com with SMTP id a1so11467884qkn.11 for ; Tue, 09 Mar 2021 16:45:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=L8nfZJKhv+r2vlPxmKndFS7iJCcyevUUZHWcDdBpSWU=; b=CU3XtJKkERnMioLBOJ+1mPBl5TLwtvL8Ls4xO0P47emx6gq2TyoTHAWlUMEbUN7Gck FWh/ws9ZCjqtRQEjp6hZQvuGZ4++8FsAkOpGiAnjTOqLHzXTyTggZaM1rLELpJym3vb5 UVcEO6APwAAxUv+58K/rAP5GtNPdWw1Ii9gl8qL6h0PXH9pE19/JtNcXWSWWYv4aCYJY 9ByKiVLR3ZUWSS8zJW5bSqWqHhWKAbIIFFk0spmOG3NZ8t+p7N/9BslmaLXrp4KJxV6s Z8QxmL0Blt8hSCX+THUe3+IiNXPvinCpEedKzSeG6Fyj/WQeyguoU8SYazJbUrJIdB29 +Ptg== X-Gm-Message-State: AOAM533z60zIsjtl5cuOTxHn+pNYOy82Ipg7RYTnI1cqBaHbcGtg4UxM +9NcYfGr6c1gToqvk+9KgLbPqApZ419sr9/8Spqud1y9z75tVCbnMSAZUzbUBIRXzA3G0divOFh 0iKfielvHA54c2slM/5hm1EYVtbwQu+x4SuHj2bjAGL9vblTSXFwfpDpwdlNQ X-Received: by 2002:ac8:4b6d:: with SMTP id g13mr628867qts.369.1615337115820; Tue, 09 Mar 2021 16:45:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9J0zcGuXi54OqQD2AFWa8MzixYYXJTZo09HsFe6Yfl7ExISUIhiuuss3NULI5dWVcc5p3jg== X-Received: by 2002:ac8:4b6d:: with SMTP id g13mr628846qts.369.1615337115510; Tue, 09 Mar 2021 16:45:15 -0800 (PST) Received: from xz-x1.redhat.com (bras-vprn-toroon474qw-lp130-25-174-95-95-253.dsl.bell.ca. [174.95.95.253]) by smtp.gmail.com with ESMTPSA id b27sm11418173qkl.102.2021.03.09.16.45.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 16:45:15 -0800 (PST) From: Peter Xu To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Axel Rasmussen , Andrew Morton , peterx@redhat.com, Andrea Arcangeli , Nadav Amit Subject: [PATCH 2/5] userfaultfd/selftests: Remove the time() check on delayed uffd Date: Tue, 9 Mar 2021 19:45:08 -0500 Message-Id: <20210310004511.51996-3-peterx@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210310004511.51996-1-peterx@redhat.com> References: <20210310004511.51996-1-peterx@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Stat-Signature: dzibuf8dshf9x7iqnsff3xb7wkp11fpz X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: EB667407F8F8 Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf02; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=216.205.24.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615337110-511256 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 saw 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. Signed-off-by: Peter Xu --- tools/testing/selftests/vm/userfaultfd.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c index 6dab8ef034a0..5cde062f07bc 100644 --- a/tools/testing/selftests/vm/userfaultfd.c +++ b/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;