Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp1028642ima; Wed, 6 Feb 2019 12:25:21 -0800 (PST) X-Google-Smtp-Source: AHgI3IYEN/6qAUrgn6/ITSkDfEcDQrMCEdYA4ZB9UesgwE/JurbCgAakwGd/8mJ0eOMpH42BG6pm X-Received: by 2002:a17:902:e307:: with SMTP id cg7mr12593845plb.255.1549484721556; Wed, 06 Feb 2019 12:25:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549484721; cv=none; d=google.com; s=arc-20160816; b=kxtZRBfzC0UUXobv3gD67eikLyLV58fD0LzkYvwzjwKG4iTyHuybczHVL9KVZUiGiA X0uKmO4ZTmnpw+PeJdS4kdfRWUHkDifUyPN48vdGiFKL8ocHTQO0SjUxUDYjMgLVGb9j d3Svh0KluBebPpkV9owWJNGRKGEGAo+wy4D9I/fzjFh6KlW0XZlUF1J7w63xk9QFHPVr w9tv7IARyPCcVZBWJD5uwwem48Xlq+CtirueBY8GrE36JynlDHXzsVGy2ZC1S5MS4d17 ckh8jMR4Fc/b7Nl0zZNX7+XlhkO2J83Uh8GugeZSc5RKwQYNYnjS6nLg+V8/tZBhZYnP HLnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=RyJanDr7XhsVpbX9gf4xaTMuyifJidFjn57I15YnXg0=; b=t8GZxFXh1z+jSDBKRW6OfQFYaUWw8MsYsAJdws1J9yMllx+cchzYlQ7Xb5IMwPCCNF NvhcD9q98B7IZOZ0H+2VE4aV348lKigoaMQ01iPnBG9Ouh/UGOmuLWcZ+F4wqbY9pYW+ VyYYJJq3h67O8TKfh4NTfY6+6r24qEbHTfRHici0Tf7S23g/gVEOP0KXhAzQbnPCjDKq V4feOGkZf+ls9jCL4lU/1NLExHMjjgucFygLtczZnw3+TgTxACWw9eUkoDlWKh3yb5fx 8ukXMmt11jv0Zs3pzlon9/Tzlhtjq3KmxwIujea93G2wX0aRBBdpR5DKNHdssQk/Rv1M 7eSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=fDhEtHJ7; 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 v11si5992899pgo.11.2019.02.06.12.25.04; Wed, 06 Feb 2019 12:25:21 -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=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=fDhEtHJ7; 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 S1726576AbfBFUYS (ORCPT + 99 others); Wed, 6 Feb 2019 15:24:18 -0500 Received: from a9-114.smtp-out.amazonses.com ([54.240.9.114]:46676 "EHLO a9-114.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbfBFUYS (ORCPT ); Wed, 6 Feb 2019 15:24:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1549484657; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=IKQJI6P5KcnC2eHGyyi/rgikGuil/xT/2O0jHHw10a0=; b=fDhEtHJ779ZPKC8QBWbnCFtyLqOeIlaDQN/k8z1KTzhCp5BQk+dZKBet4B90Tzyc yeBtEEaYgRGcTEZ3DxRl/n5v9qjNl6N4jsH5rTebfAfQkj/+8ZwEgz90nynwe0zI2+E UhrOAlWNgtMfKAm66GB0jaGbrePsyVanR4Sv9zWA= Date: Wed, 6 Feb 2019 20:24:17 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Matthew Wilcox cc: Doug Ledford , Jason Gunthorpe , Jan Kara , Ira Weiny , lsf-pc@lists.linux-foundation.org, linux-rdma@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, John Hubbard , Jerome Glisse , Dan Williams , Dave Chinner , Michal Hocko Subject: Re: [LSF/MM TOPIC] Discuss least bad options for resolving longterm-GUP usage by RDMA In-Reply-To: <20190206194055.GP21860@bombadil.infradead.org> Message-ID: <01000168c47b8b6a-ba1b2cd5-0a53-4367-a296-aa0b0ba26359-000000@email.amazonses.com> References: <20190205175059.GB21617@iweiny-DESK2.sc.intel.com> <20190206095000.GA12006@quack2.suse.cz> <20190206173114.GB12227@ziepe.ca> <20190206175233.GN21860@bombadil.infradead.org> <47820c4d696aee41225854071ec73373a273fd4a.camel@redhat.com> <01000168c43d594c-7979fcf8-b9c1-4bda-b29a-500efe001d66-000000@email.amazonses.com> <20190206194055.GP21860@bombadil.infradead.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2019.02.06-54.240.9.114 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 Feb 2019, Matthew Wilcox wrote: > > > > Coming in late here too but isnt the only DAX case that we are concerned > > about where there was an mmap with the O_DAX option to do direct write > > There is no O_DAX option. There's mount -o dax, but there's nothing that > a program does to say "Use DAX". Hmmm... I thought that a file handle must have a special open mode to actually to a dax map. Looks like that is not the case. > > though? If we only allow this use case then we may not have to worry about > > long term GUP because DAX mapped files will stay in the physical location > > regardless. > > ... except for truncate. And now that I think about it, there was a > desire to support hot-unplug which also needed revoke. Well but that requires that the application unmaps the file. > > Maybe we can solve the long term GUP problem through the requirement that > > user space acquires some sort of means to pin the pages? In the DAX case > > this is given by the filesystem and the hardware will basically take care > > of writeback. > > It's not given by the filesystem. DAX provides a mapping to physical persistent memory that does not go away. Or its a block device. > > > In case of anonymous memory this can be guaranteed otherwise and is less > > critical since these pages are not part of the pagecache and are not > > subject to writeback. > > but are subject to being swapped out? Well that is controlled by mlock and could also involve other means like disabling swap.