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.9 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 4960DC47095 for ; Mon, 5 Oct 2020 17:35:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 949B1207BC for ; Mon, 5 Oct 2020 17:35:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="Ogo60Itj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 949B1207BC 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 E54B76B00AA; Mon, 5 Oct 2020 13:35:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E05526B00AC; Mon, 5 Oct 2020 13:35:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C80296B00AD; Mon, 5 Oct 2020 13:35:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0152.hostedemail.com [216.40.44.152]) by kanga.kvack.org (Postfix) with ESMTP id 9D08F6B00AA for ; Mon, 5 Oct 2020 13:35:34 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 27F793624 for ; Mon, 5 Oct 2020 17:35:34 +0000 (UTC) X-FDA: 77338573788.03.hate35_4415539271bf Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id E96D628A4EA for ; Mon, 5 Oct 2020 17:35:33 +0000 (UTC) X-HE-Tag: hate35_4415539271bf X-Filterd-Recvd-Size: 4741 Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Mon, 5 Oct 2020 17:35:33 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id v123so12862094qkd.9 for ; Mon, 05 Oct 2020 10:35:33 -0700 (PDT) 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=dKlbhuywYV4trrm533av5g+rTKLjmfZBMKtZHffEpfg=; b=Ogo60Itj+Op78dH8jXVJTtV1hFSvseMGAPGjIPJsWqBdL7wrA/UqdSqhsRz6b6AZDM I9lloFYxDZt04k/RrwXKkkLdJMtxhJtNbj12+kE6LDkefxEQsCuRyrXoqt5kaQaq6WYb TAJSecm4UNC7SEcfUU6PY9R+QlVJxVh8DUZlIM8VVCjCl2LyiL/ccw9cwG5QMQ2xTI44 Tsx7MrXatCC9vxW+HHqRf4BEp5WLpvB6gW+CUVpFiZvvvlnoDb5wXthNwJdpMlarLbeU y3GuwL2OQtzoT2TdhVV09xynxfFdakx3hgKX1AnIaRavPLMbXV35KK2VeBNdbDGcrEVO zBrg== 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=dKlbhuywYV4trrm533av5g+rTKLjmfZBMKtZHffEpfg=; b=jqzK76KoLGWJ+PpunbdIOHQ1IcD8MznvW1RXwVsL36kPKgakHJbpRmZSTrZKEbSTBn PB8W0cL75QkfYhonUETcBsrUiomR5jJabzAVJe/iuJjXzLdT3xk8PldpNsDlVFY69ltc wTuExxshDuASbbS69vzLnsvpYMChAEv/Bm5pe58v/2lpUsrLn5DQuvV7iytmuPqQFftr N9GjupohPTNaAucm6Bd1U4s0PskC48XXWRfqTzzyYmtCA9l8QBoT759qX4Xf2IPDI43Z YOsN8tshM8nC58mxXcwQQlrtrguDIxtwQN46JbViX3d2bUqw4wwD37ast9ychvG4NdJt zh3A== X-Gm-Message-State: AOAM531JSkNYFZFl3Fgb1XU2Yoff636U9Obkkrxj1w0y9F3jKH3XB1tg ygFGNoNUDFLv9GowA2cJ8rHQBQ== X-Google-Smtp-Source: ABdhPJxqFhDsb/GS5ATRJ1dE6t/BFvds0ofvMeomDoUgmoopjs8lj4GVNFEIhuceI6nxBgwZWdG7Tg== X-Received: by 2002:a37:9e87:: with SMTP id h129mr1161317qke.276.1601919332852; Mon, 05 Oct 2020 10:35:32 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id c13sm320627qtq.5.2020.10.05.10.35.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 10:35:32 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kPUOZ-00020z-L7; Mon, 05 Oct 2020 14:35:31 -0300 Date: Mon, 5 Oct 2020 14:35:31 -0300 From: Jason Gunthorpe To: Daniel Vetter Cc: John Hubbard , DRI Development , LKML , Daniel Vetter , Andrew Morton , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Jan Kara , Dan Williams , Linux MM , Linux ARM , linux-samsung-soc , "open list:DMA BUFFER SHARING FRAMEWORK" Subject: Re: [PATCH 2/2] mm/frame-vec: use FOLL_LONGTERM Message-ID: <20201005173531.GB5177@ziepe.ca> References: <20201002175303.390363-1-daniel.vetter@ffwll.ch> <20201002175303.390363-2-daniel.vetter@ffwll.ch> <20201003232441.GO9916@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000010, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, Oct 04, 2020 at 01:20:31PM +0200, Daniel Vetter wrote: > Yeah I think that works. I tried understanding gup.c code a bit more, > and it looks like FOLL_LONGTERM only works for the pup_fast variant > right now? All others seem to have this comment that it's somehow > incompatible with FAULT_FLAG_ALLOW_RETRY and daxfs. But grepping > around for that didn't show up anything, at least not nearby dax code. > For my understanding of all this, what's the hiccup there? IIRC it needs the VMA and various other flows can't return the vma list becuse they unlock the mmap_sem will running > For plans, I only started this for a bit of my own learning, but I > think I'll respin with the following changes: > - convert exynos and habanalabs to pin_user_pages_fast directly, > instead of going through this frame-vector detour +1 Jason