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=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 CF56FC352A2 for ; Wed, 5 Feb 2020 11:46:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 93F0521927 for ; Wed, 5 Feb 2020 11:46:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="fbUqiFBK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 93F0521927 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3D0D96B00B8; Wed, 5 Feb 2020 06:46:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 35B176B00B9; Wed, 5 Feb 2020 06:46:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1FAED6B00BA; Wed, 5 Feb 2020 06:46:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0091.hostedemail.com [216.40.44.91]) by kanga.kvack.org (Postfix) with ESMTP id 025316B00B8 for ; Wed, 5 Feb 2020 06:46:00 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B183D2DFD for ; Wed, 5 Feb 2020 11:46:00 +0000 (UTC) X-FDA: 76455894480.27.beds83_17515bbf24c40 X-HE-Tag: beds83_17515bbf24c40 X-Filterd-Recvd-Size: 5149 Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Wed, 5 Feb 2020 11:46:00 +0000 (UTC) Received: by mail-lj1-f194.google.com with SMTP id x14so1942510ljd.13 for ; Wed, 05 Feb 2020 03:46:00 -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=UkzRx47dErnnmLhRIfPAmGeCpu4JzugFWyMdiXyeEACbD7AYOc54lgv78gDQQ7hZIT tOmoRCbmOzSmEgivDpMIydkmRi/fMmNsf3u7wB1YtvsxOUPzd94CTnOAPEqQydbAQsWa Su2sjiiOSzC9D2OBFnF3ZBDbAKdujWCYa0/hdFCUzGREWGsc+Yu4CGc3qZ/o2MJxoNS2 hmRsIN/QktRK6w7Muj/vXtUwWtpw8fwiu2CRtuDy0iga7COkBLtiPzOUxfYj+2f8ud7Q 1rIl1UuIm6EKZjZZumBhrVK0Ik0TCMrSZjZ54nuIAFCT66E6Xggw7HD973HTO5qRGDXv 1R0w== X-Gm-Message-State: APjAAAUYoKIvLFqezqiVW2dKKWtiT98NAn2+gLjbaPO6+11HFpiiuEqM 8Gdv4wqfGAL25RA/3ssbzO16/A== X-Google-Smtp-Source: APXvYqyYwLXyW1HUby3u5z2IhHyV0WiYO1K3JWIkU6l6dX312E3ieNWtdHp2AH5LJPi+2PXC1G4V7w== 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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