Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2262301ybc; Wed, 13 Nov 2019 11:29:56 -0800 (PST) X-Google-Smtp-Source: APXvYqyWyquWm9wHhpiQO1BXbVXiKAFsRrb+IM0TZWZJD3D4lHEAlQoXeGMuHw9qyZlg2QcP1o/7 X-Received: by 2002:aa7:c894:: with SMTP id p20mr5663045eds.145.1573673396005; Wed, 13 Nov 2019 11:29:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573673395; cv=none; d=google.com; s=arc-20160816; b=rfyBLzu03BYg3sahC+O7e0nN2sB9JL12tm3KG9AQb30GKF/fpI7dw8y/pclXiwoJcu jOmbVRtFQEPYt7qoNuBhacOJHmVhXLUkbTpx+XW8N+SmilUAcpHGE7NvC9SsNEFWIec0 A9JnA/yZnIYTF8piUh8TLDL3YmTR4cBDo+1fQFgbpgJzWxC5wPVovLLwZPpxJwJg3gjb XpbvVOiE78fTfzu+p/dc11uaOZesqEx6akSrAx0BaAr1qLAQ+EDOvG5XcnJe/qT6IdHv tdCCK5m+dIQPVfyEDqj3hAnWOUr4ZN/AzHin5qUSxdn4j8PqhiYY6Oz4A9dT9hXhLj6x r77g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=R5gi88FKcnhq9OehA21DwjbypyMEOzZOrf3K47XIoEM=; b=wk52v6m9ljSIdAzuJSCmuH3ICkZ0LQjuKvXw43p2xp3ohe4+rsn2KPRwA3rlMazpjW +dD8PV7DsnbIvLwGbigV957OMJJd/wdAusHLpXVSDjA8RizmC+g2TlchH3OUm2S7u0kJ Y66UzX6/YWFHcge2Au2cePqSgID2dNyAd8lCWUnt8o8lsDXsTA3EMRzfgUykB3Few+ri 1EEuXpp+Rrqui9attROP1ExVM8c8UOvSmarkmzROVazK8pn4qamX/ntHJfLZWgpvuZ6r uxAj1bb1//g2iNrnSh84paQKNBRekIoBjSIA3mVGfbJwII0tJZpAw6ONJpITjon47CsA m5rA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g27si1854613ejc.219.2019.11.13.11.29.31; Wed, 13 Nov 2019 11:29:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728740AbfKMTGG (ORCPT + 99 others); Wed, 13 Nov 2019 14:06:06 -0500 Received: from mga17.intel.com ([192.55.52.151]:44893 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727290AbfKMTGF (ORCPT ); Wed, 13 Nov 2019 14:06:05 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 11:06:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,301,1569308400"; d="scan'208";a="198545356" Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by orsmga008.jf.intel.com with ESMTP; 13 Nov 2019 11:06:02 -0800 Date: Wed, 13 Nov 2019 11:06:02 -0800 From: Ira Weiny To: John Hubbard Cc: Andrew Morton , Al Viro , Alex Williamson , Benjamin Herrenschmidt , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Christoph Hellwig , Dan Williams , Daniel Vetter , Dave Chinner , David Airlie , "David S . Miller" , Jan Kara , Jason Gunthorpe , Jens Axboe , Jonathan Corbet , =?iso-8859-1?B?Suly9G1l?= Glisse , Magnus Karlsson , Mauro Carvalho Chehab , Michael Ellerman , Michal Hocko , Mike Kravetz , Paul Mackerras , Shuah Khan , Vlastimil Babka , bpf@vger.kernel.org, dri-devel@lists.freedesktop.org, kvm@vger.kernel.org, linux-block@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, linux-rdma@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [PATCH v4 22/23] selftests/vm: run_vmtests: invoke gup_benchmark with basic FOLL_PIN coverage Message-ID: <20191113190602.GC12947@iweiny-DESK2.sc.intel.com> References: <20191113042710.3997854-1-jhubbard@nvidia.com> <20191113042710.3997854-23-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191113042710.3997854-23-jhubbard@nvidia.com> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 12, 2019 at 08:27:09PM -0800, John Hubbard wrote: > It's good to have basic unit test coverage of the new FOLL_PIN > behavior. Fortunately, the gup_benchmark unit test is extremely > fast (a few milliseconds), so adding it the the run_vmtests suite > is going to cause no noticeable change in running time. > > So, add two new invocations to run_vmtests: > > 1) Run gup_benchmark with normal get_user_pages(). > > 2) Run gup_benchmark with pin_user_pages(). This is much like > the first call, except that it sets FOLL_PIN. > > Running these two in quick succession also provide a visual > comparison of the running times, which is convenient. > > The new invocations are fairly early in the run_vmtests script, > because with test suites, it's usually preferable to put the > shorter, faster tests first, all other things being equal. > > Signed-off-by: John Hubbard Reviewed-by: Ira Weiny > --- > tools/testing/selftests/vm/run_vmtests | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/tools/testing/selftests/vm/run_vmtests b/tools/testing/selftests/vm/run_vmtests > index 951c507a27f7..93e8dc9a7cad 100755 > --- a/tools/testing/selftests/vm/run_vmtests > +++ b/tools/testing/selftests/vm/run_vmtests > @@ -104,6 +104,28 @@ echo "NOTE: The above hugetlb tests provide minimal coverage. Use" > echo " https://github.com/libhugetlbfs/libhugetlbfs.git for" > echo " hugetlb regression testing." > > +echo "--------------------------------------------" > +echo "running 'gup_benchmark -U' (normal/slow gup)" > +echo "--------------------------------------------" > +./gup_benchmark -U > +if [ $? -ne 0 ]; then > + echo "[FAIL]" > + exitcode=1 > +else > + echo "[PASS]" > +fi > + > +echo "------------------------------------------" > +echo "running gup_benchmark -c (pin_user_pages)" > +echo "------------------------------------------" > +./gup_benchmark -c > +if [ $? -ne 0 ]; then > + echo "[FAIL]" > + exitcode=1 > +else > + echo "[PASS]" > +fi > + > echo "-------------------" > echo "running userfaultfd" > echo "-------------------" > -- > 2.24.0 >