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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 CCCD5C433FE for ; Sat, 5 Dec 2020 00:27:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4567E22D6E for ; Sat, 5 Dec 2020 00:27:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4567E22D6E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 65A986B0036; Fri, 4 Dec 2020 19:27:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E3B16B005D; Fri, 4 Dec 2020 19:27:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D29C6B0068; Fri, 4 Dec 2020 19:27:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0231.hostedemail.com [216.40.44.231]) by kanga.kvack.org (Postfix) with ESMTP id 32E976B0036 for ; Fri, 4 Dec 2020 19:27:41 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id ECF08181AEF31 for ; Sat, 5 Dec 2020 00:27:40 +0000 (UTC) X-FDA: 77557340280.15.fall35_0301ac4273c8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id CD47F1814B0C7 for ; Sat, 5 Dec 2020 00:27:40 +0000 (UTC) X-HE-Tag: fall35_0301ac4273c8 X-Filterd-Recvd-Size: 4140 Received: from mail-qv1-f65.google.com (mail-qv1-f65.google.com [209.85.219.65]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Sat, 5 Dec 2020 00:27:40 +0000 (UTC) Received: by mail-qv1-f65.google.com with SMTP id g19so3719394qvy.2 for ; Fri, 04 Dec 2020 16:27:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=01x6l1IWZiD3qCX78W31jqyRDbJem6U+9Tih6qMoeb8=; b=Wqh1bGjF3Zh/fNse9SJKTmYtYbqGddG90ubBer42VyzvBOQtbPWXiLR94ZSpvtzYJi cPVaGW07edqa9TsEHUPwQN5xKHCtF59Riw2RN++gpd7zGehq0R75/ypwWUeQ3SLsq2f0 pMVGYKja3Pdaka72A6rH413y2fJVsEp1f2Snug1aEtI9DOkFvrt01kQB27VCH2u8wTym MVtA82F1f5ol2ol4uceFUfCfWGtDFUpClIEgSL4fcyJnq3ApIcqAGbIAlLBYneTop2eb emFxAlWLxrD8LZ/rx8B6VrqlYMChEOe4suwCcfbcRadNHzOLMsHOHtESrKLaaNL2ufSy WMUA== 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=01x6l1IWZiD3qCX78W31jqyRDbJem6U+9Tih6qMoeb8=; b=HzPUdGnbvzU3ILNzKV04W1yzQEshlL93p8yN34dooHM0ge+VTW5vQp+QWdt6glBTUZ AfKiVwoKvycj1KxT4k09RIteurBS+dv1lWSdyJZiI8vjVK+589unRjNk/hfQlrjSfa9m S480NUqGiJHljeRA9AV4b+EDiw1LRe9NCy02kmLWiBAladJTAK/uGul7JDv4dgPojjJa P1M3AwkqjxzNOZWp1I0B+Dxl0xjrDsdzCN8HY/R+wHxsVhzI6w2utYQYUtgPwBhRqVzD WZgl9F0k+UlcoiwHeUTcckVg0VOAM+LzdJyPs2HMKEx8dI3zVKudr5jd+cIG9cpGr2xC a18A== X-Gm-Message-State: AOAM531nPxTtIIzcmqvVqDNG+8m7M5trUWapQXfY0J49387f+DM19Tv3 MS0Oibru4PNsskztBWm3fGpVeA== X-Google-Smtp-Source: ABdhPJw1wqJAzYkT5l8Vdg7DBGKg2MObCXohC7YILrkDIUE6ipO3yEluldfGbaPPvnsx34rxAcCBcw== X-Received: by 2002:ad4:4baa:: with SMTP id i10mr8598620qvw.40.1607128059678; Fri, 04 Dec 2020 16:27:39 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id x185sm7082949qka.37.2020.12.04.16.27.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2020 16:27:38 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1klLQH-006HPj-Lp; Fri, 04 Dec 2020 20:27:37 -0400 Date: Fri, 4 Dec 2020 20:27:37 -0400 From: Jason Gunthorpe To: John Hubbard Cc: Andrew Morton , linux-mm , Dan Williams , Ira Weiny , Pavel Tatashin Subject: Re: [PATCH] mm/gup: remove the vma allocation from gup_longterm_locked() Message-ID: <20201205002737.GG5487@ziepe.ca> References: <0-v1-5551df3ed12e+b8-gup_dax_speedup_jgg@nvidia.com> <99dc35be-62c1-56b6-ae37-024a2b2ab81d@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99dc35be-62c1-56b6-ae37-024a2b2ab81d@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 Fri, Dec 04, 2020 at 01:36:27PM -0800, John Hubbard wrote: > On 12/4/20 11:39 AM, Jason Gunthorpe wrote: > > Long ago there wasn't a FOLL_LONGTERM flag so this DAX check was done by > > post-processing the VMA list. > > > > These days it is trivial to just check each VMA to see if it is DAX before > > processing it inside __get_user_pages() and return failure if a DAX VMA is > > encountered with FOLL_LONGTERM. > > > > Removing the allocation of the VMA list is a significant speed up for many > > call sites. > > This all looks nice, and if you actually have quantifiable perf results as you > imply above, then let's put them right here. I don't really have a good perf setup, it is just obvious that removing the calls to the allocator will speed up cases like RDMA that call gup in batches of 512 pages, or vfio which calls in batches of 1. :) Jason