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,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 7B631C433C1 for ; Tue, 30 Mar 2021 13:49:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C62D36192B for ; Tue, 30 Mar 2021 13:49:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C62D36192B 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 402FE6B007E; Tue, 30 Mar 2021 09:49:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3B2A66B0081; Tue, 30 Mar 2021 09:49:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 208506B0082; Tue, 30 Mar 2021 09:49:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id 029B56B007E for ; Tue, 30 Mar 2021 09:49:55 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B020B8249980 for ; Tue, 30 Mar 2021 13:49:55 +0000 (UTC) X-FDA: 77976673950.12.9304052 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by imf23.hostedemail.com (Postfix) with ESMTP id 6FEC9A00039A for ; Tue, 30 Mar 2021 13:49:54 +0000 (UTC) Received: by mail-qk1-f178.google.com with SMTP id y18so15822456qky.11 for ; Tue, 30 Mar 2021 06:49:54 -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=cVXpnZxXv6yHCnSM/DTKVxaY2Rfy2IhtzC0a2VwgjAs=; b=eapJqowaFe1+eVMDwPsIM+bpEjESgis+Hktp7GkYkYkpyggfW6NMPTv3Eb+tMgP+Ae J0FIOrJh8qsknFlubqnacIGvF2ioh/AXDEyzqqBlwYzn18Y6w46ePgkZOfXD1Mdm2FCK wiZBNq7rAidyeNsKL5sxlSNMr1CU3eG90OULZITNelx2novLIyK7TRT64c1GYaIDZuYI vNJWsjdbGRz7G9+bIHvgwAg2XdnBM4XFpXXKXtOTSh6+U2PK0TEH13WosSfSSxK+wZzK buOZ18Nvu9A27hnaEMLBbLUMlm20AhQFktK3LJHubyYa3FR65ILAjorLgioKzQDp/4rx rAzA== 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=cVXpnZxXv6yHCnSM/DTKVxaY2Rfy2IhtzC0a2VwgjAs=; b=ViFZ8gwh/OwyrjCNdQth1I9lCbAUQsVG5cZk/URheD2s8eF/SDKilmvdR9JGu4u25l /u5DkCqHhwWJxz+GxUuDd2eoVzKGAcC1EwI1ypaxXN++28COP3/bKJsx9Et3RTSKMcBZ FxvUv9EsdNzmMDRbK3FhtXj0PhBxmoI971nPEntONoYDTtk9FswP7w3Ee5mlW+biz3fg itf7O/gMB+KCcP3gb2s+hw5S2lVKctcq1p9ayI+EOq1/df5D+VLMsgADfq6QqaoDT/eW 4Hu0HPNamD00M8uwXfSg47hKxLXb4B+hCdKKMMXLjI1GR9W7FTrJqClO3XtitFrD70YL /+Zw== X-Gm-Message-State: AOAM531Pt7by0eZL8opfL5+bjKc2pKrBzJSJB3jh/3qfmMyhjm3m8y9X g/XnhXkX2NXcoJCXOtvh37k0OA== X-Google-Smtp-Source: ABdhPJzLvsFKN8J/s1Zqd4IjZyotN4j338+vin2Qg/BPBs3kJ7s1XDuVFJPUQwJECfg35Nm3TA/FjA== X-Received: by 2002:a37:638f:: with SMTP id x137mr29805289qkb.199.1617112194440; Tue, 30 Mar 2021 06:49:54 -0700 (PDT) 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 z8sm13142809qtn.12.2021.03.30.06.49.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 06:49:53 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lREkj-005tlO-3a; Tue, 30 Mar 2021 10:49:53 -0300 Date: Tue, 30 Mar 2021 10:49:53 -0300 From: Jason Gunthorpe To: Dan Williams Cc: Joao Martins , Christoph Hellwig , Shiyang Ruan , Vishal Verma , Dave Jiang , Ira Weiny , Matthew Wilcox , Jan Kara , Andrew Morton , david , linux-fsdevel , Linux Kernel Mailing List , Linux MM , linux-nvdimm Subject: Re: [PATCH 3/3] mm/devmap: Remove pgmap accounting in the get_user_pages_fast() path Message-ID: <20210330134953.GT2710221@ziepe.ca> References: <161604048257.1463742.1374527716381197629.stgit@dwillia2-desk3.amr.corp.intel.com> <161604050866.1463742.7759521510383551055.stgit@dwillia2-desk3.amr.corp.intel.com> <66514812-6a24-8e2e-7be5-c61e188fecc4@oracle.com> <20210325143419.GK2710221@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 6FEC9A00039A X-Stat-Signature: dd85x43f5bzcnk46tboqyegjtdnz1ejf Received-SPF: none (ziepe.ca>: No applicable sender policy available) receiver=imf23; identity=mailfrom; envelope-from=""; helo=mail-qk1-f178.google.com; client-ip=209.85.222.178 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617112194-56630 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 Mon, Mar 29, 2021 at 04:24:19PM -0700, Dan Williams wrote: > On Thu, Mar 25, 2021 at 7:34 AM Jason Gunthorpe wrote: > > > > On Thu, Mar 18, 2021 at 10:03:06AM -0700, Dan Williams wrote: > > > Yes. I still need to answer the question of whether mapping > > > invalidation triggers longterm pin holders to relinquish their hold, > > > but that's a problem regardless of whether gup-fast is supported or > > > not. > > > > It does not, GUP users do not interact with addres_space or mmu > > notifiers > > Ok, but the SIGKILL from the memory_failure() will drop the pin? In the general case I doubt it.. I think this is fine, we shouldn't expect unplugging a driver to not block if there are open users. Demading DMA users to be able to shoot down access to system memory is a really big kernel change. Jason