Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp184426ybv; Wed, 5 Feb 2020 03:47:32 -0800 (PST) X-Google-Smtp-Source: APXvYqyX4QpOr1S7aySwDpvYcz2Afwf/JBch2G2AHj2jLfrBsDinmIaeWEr74vfL2S4iqRcPht2x X-Received: by 2002:aca:b808:: with SMTP id i8mr2464806oif.66.1580903252031; Wed, 05 Feb 2020 03:47:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580903252; cv=none; d=google.com; s=arc-20160816; b=K5C5bPiXUVgeUr9JvMMGEcNzER3Lw6t7wdgZRSiCk9u2jhE8QOPPuRvtwnL3OPcgOM IYti9sH035ZrP5QxzhD99SNKBwedaXZQ4u8wLPvtPum2I6ZMWPPPHVPvJFB8LrnubUaR rLSMETNd6nHzeHSqhu/4B2bo/esYvnRNanXSUczCE4cw9BNbKlEpqKax37l9rEoxtWuE pOE8TKjNiSFlJlxHfm25mM10VZ7JIBqnBnDYAulNYxt3V+zK4s2liWTUhB77l/UipM3K blHo6yrMNuhQIdPj6Owe4JWPZ3t3VWqeoE2o9aoWiue3MtnKlrlf8fMDR7HCtg6UfsME moCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Jy6I9lCZXmqSIc0Oo7ZwAUc0APIjOD7+FskXlmNX0dE=; b=s1B+mkI7er8AUt+oWu+8II4k/ZNIf1d8q/A5G7IqsM7Nx2yiAmP2HTjrHLFexWxYqR Ao9nbTPYFi8ABvnNToTydEbBTBSHcF4iVKJq3Zd7UjLY1TQywaJaNGTTv9hP25+QHb8A 4G5RRVz9ngSK4flcMsZXrr3D7dT1DXmF1KFLbVZZDqegEvjfCeRbAzustJuieKNw+EZu 2zSdvXc8TUCt+DgSX+p3hmnoGevoWyFvkgES1OSuVPrGUC8du5P3wRdEj0JxArmgWFA4 4kelEvbBASp2LyOPQAOeS52IICfbgU2tH0uaAUnpc2fDq6og4HQh+Plsjra+cgGrSI8Q qY4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=fbUqiFBK; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si13662463otd.141.2020.02.05.03.47.20; Wed, 05 Feb 2020 03:47:32 -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; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=fbUqiFBK; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727330AbgBELqB (ORCPT + 99 others); Wed, 5 Feb 2020 06:46:01 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:45748 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727070AbgBELqA (ORCPT ); Wed, 5 Feb 2020 06:46:00 -0500 Received: by mail-lj1-f195.google.com with SMTP id f25so1950224ljg.12 for ; Wed, 05 Feb 2020 03:45:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Jy6I9lCZXmqSIc0Oo7ZwAUc0APIjOD7+FskXlmNX0dE=; b=fbUqiFBKKWfMvUVGayetzT7gBoVUOArtTvKe87cxlG4ADzVrq73rMKZXdR+K95XCj8 2tpgG6t6IONw5sP60aDQPIi6bEjTxNmgDQRNTBOF6qrPugG05rtCHYMncko/ND4Oe2J6 r5juTmm4ovUmOcVa1aFbKe9GkKmUd7VDww+dSp8QucR9SspUNhqp/6/XnMDjtqCOZCm+ qKdTR/LxfUsAecDs7AmpEc7Cuc0WG8lutxYO9rxW3DP42v5HUE+fiSgAC2sl51AiqrDI 7tiuH8OzxbBfsLnmX2PGY8JuKutQO0wJaxcNMEFDaSlRFOuKzWYVhw0WG5ELGFSaNkOP JFWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Jy6I9lCZXmqSIc0Oo7ZwAUc0APIjOD7+FskXlmNX0dE=; b=Do1W6Yyvcs6i0gJCrXY1Xp2hhr/1c066pdmg/l9sCWaqWkVX980sq9XAAEJcBLjMZn fP/MUWCLWwcSYtpDJyMlc3oPpEvUoDFrvrzwhWq1fwC4x5BM5a7I5z2bXF4iVTAxGz6h ugoch/Tc8tinBlxtGShOIshyhNagetgo+r3nEPZmUO7dARa7UyfGyE5yp4h3eS/eTbl9 DwGsGj7gyImRWW2LEBeNHa4sgpzGEDVXMd38HnLO1dFBC8ODa8qjKLIL6mts/mMCiTz9 nWaB5FZmYB7CzLFlssX0efQTjcOgg1HM2/MH0Kgs4WuZCvMqjftv3JiIgMSB4MxQ4c5p NO6A== X-Gm-Message-State: APjAAAWJlxzwQjkhL9TEOaDIPi8v5lgeUxcFfVsxWbGQdPwjobXi1eW7 LnF5BxHI8zgvDonuRVOyHK0zoQ== X-Received: by 2002:a2e:5056:: with SMTP id v22mr20108284ljd.164.1580903158629; Wed, 05 Feb 2020 03:45:58 -0800 (PST) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id w3sm13028052ljo.66.2020.02.05.03.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 03:45:58 -0800 (PST) Received: by box.localdomain (Postfix, from userid 1000) id 0BF46100AF6; Wed, 5 Feb 2020 14:46:12 +0300 (+03) Date: Wed, 5 Feb 2020 14:46:12 +0300 From: "Kirill A. Shutemov" To: John Hubbard Cc: Andrew Morton , Al Viro , Christoph Hellwig , Dan Williams , Dave Chinner , Ira Weiny , Jan Kara , Jason Gunthorpe , Jonathan Corbet , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Michal Hocko , Mike Kravetz , Shuah Khan , Vlastimil Babka , Matthew Wilcox , linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [PATCH v4 11/12] mm/gup_benchmark: support pin_user_pages() and related calls Message-ID: <20200205114612.foo7zrcplgxwmylt@box> References: <20200204234117.2974687-1-jhubbard@nvidia.com> <20200204234117.2974687-12-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200204234117.2974687-12-jhubbard@nvidia.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 04, 2020 at 03:41:16PM -0800, John Hubbard wrote: > Up until now, gup_benchmark supported testing of the > following kernel functions: > > * get_user_pages(): via the '-U' command line option > * get_user_pages_longterm(): via the '-L' command line option > * get_user_pages_fast(): as the default (no options required) > > Add test coverage for the new corresponding pin_*() functions: > > * pin_user_pages_fast(): via the '-a' command line option > * pin_user_pages(): via the '-b' command line option > > Also, add an option for clarity: '-u' for what is now (still) the > default choice: get_user_pages_fast(). > > Also, for the commands that set FOLL_PIN, verify that the pages > really are dma-pinned, via the new is_dma_pinned() routine. > Those commands are: > > PIN_FAST_BENCHMARK : calls pin_user_pages_fast() > PIN_BENCHMARK : calls pin_user_pages() > > In between the calls to pin_*() and unpin_user_pages(), > check each page: if page_maybe_dma_pinned() returns false, then > WARN and return. > > Do this outside of the benchmark timestamps, so that it doesn't > affect reported times. > > Reviewed-by: Ira Weiny > Signed-off-by: John Hubbard Acked-by: Kirill A. Shutemov -- Kirill A. Shutemov