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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C5DAC83F3E for ; Tue, 5 Sep 2023 14:16:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6DD558D0009; Tue, 5 Sep 2023 10:16:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 68D098D0001; Tue, 5 Sep 2023 10:16:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57C1E8D0009; Tue, 5 Sep 2023 10:16:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 49B288D0001 for ; Tue, 5 Sep 2023 10:16:12 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 09F17B3A87 for ; Tue, 5 Sep 2023 14:16:12 +0000 (UTC) X-FDA: 81202743384.25.BBF27BA Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf27.hostedemail.com (Postfix) with ESMTP id 3079E4002D for ; Tue, 5 Sep 2023 14:16:09 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=none; spf=none (imf27.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1693923370; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references; bh=vnOz0gb6RMe+IEDTgbcyl1C0TR/uYfAPwVZI+DIZPJ8=; b=1JajHZq7VnsSTzOtKyE24lMKzpeHgGQptyuY7VNH0VaIHx+5HFeAkMoDNNSBbYJn7ntYI6 aVhV/tjtbG9zs3rwXUP+Kar01HE0yflUaGFUChG9fED3t0cCxXTbLWabnrQGIAG5YcnsVd Rt4AUsOnJ6ulaVYPCI+yPis9c2I9B5c= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; dmarc=none; spf=none (imf27.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1693923370; a=rsa-sha256; cv=none; b=amjeM5EjVNYBVIMk80F/eKnpBzRTOcXirJsP5EpSOiMxUvQwN/moB3SpHktH4I2v8uo9gR 9lGqugJsnXd2h7a4Jwmm0U462odUsJf7CEUfVN4b/gFByj3c+Aso6/ypdsoiI16463qGaH QYCIj2amWI5rVCxs2peevkH31ea0iD8= Received: by verein.lst.de (Postfix, from userid 2407) id 9D9CC6732A; Tue, 5 Sep 2023 16:16:04 +0200 (CEST) Date: Tue, 5 Sep 2023 16:16:04 +0200 From: Christoph Hellwig To: Jan Kara , David Howells , David Hildenbrand , Peter Xu Cc: Lei Huang , miklos@szeredi.hu, Xiubo Li , Ilya Dryomov , Jeff Layton , Trond Myklebust , Anna Schumaker , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , John Fastabend , Jakub Sitnicki , Boris Pismenny , linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, ceph-devel@vger.kernel.org, linux-mm@kvack.org, v9fs@lists.linux.dev, netdev@vger.kernel.org Subject: getting rid of the last memory modifitions through gup(FOLL_GET) Message-ID: <20230905141604.GA27370@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspam-User: X-Stat-Signature: 79i9wy4ib4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jwm Fm6rIR16zutJRwPgN2MKquQOivKKdMEP16NBq+1CpfI4aTghgjDUR0HPxpPeEM+2iyZGtymTvjQYVYwUwCg2uFj4KzcfLX4dvHev06D7NBLv6fW3vHEem0kzFrzoXj+0v6wwJn7X5akhXtRKvniUYj/PVNAV7gj1x/zDgG9fd7q+mJwI= 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: Hi all, we've made some nice progress on converting code that modifies user memory to the pin_user_pages interface, especially though the work from David Howells on iov_iter_extract_pages. This thread tries to coordinate on how to finish off this work. The obvious next step is the remaining users of iov_iter_get_pages2 and iov_iter_get_pages_alloc2. We have three file system direct I/O users of those left: ceph, fuse and nfs. Lei Huang has sent patches to convert fuse to iov_iter_extract_pages which I'd love to see merged, and we'd need equivalent work for ceph and nfs. The non-file system uses are in the vmsplice code, which only reads from the pages (but would still benefit from an iov_iter_extract_pages conversion), and in net. Out of the users in net, all but the 9p code appear to be for reads from memory, so they don't pin even if a conversion would be nice to retire iov_iter_get_pages* APIs. After that we might have to do an audit of the raw get_user_pages APIs, but there probably aren't many that modify file backed memory. I'm also wondering what a good debug aid would be for detecting writes to file backed memory without a previous reservation, but everything either involves a page flag or file system code. But if someone has an idea I'm all ear as something mechanical to catch these uses would be quite helpful.