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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8B6AC4332F for ; Tue, 18 Oct 2022 14:48:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230260AbiJROs5 (ORCPT ); Tue, 18 Oct 2022 10:48:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230117AbiJROsx (ORCPT ); Tue, 18 Oct 2022 10:48:53 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8455D8EEE for ; Tue, 18 Oct 2022 07:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=xIxk1ZJXHiq+L/K5Scay6tItIt3SSciUv3926kxIpBo=; b=ixIhGjGVgflEaaE8r7777QDZ5A VrDUvR/pWbIv8fFDXyIWUT3KWF343f/h3b+nv4ujJnJw+6vNd1rsvxPae3Tzu6CDRiBUs32KMiKwB bHtkvxDpKSCWH5XgUzpOUL7BGHfL4wQFwombXV9F+ha9zWyF27L6tfne035VgNB5W4DS15XZ1hQlC 4MvQ4NLDzYMsPQ8v2rgZobHss9UQEzo9nX/YDPo0qB/QMmjpXinlqG6ygeU6TGSjKplPX/R/6fH2S 5xcZVkNSTebZpgqEVam1oRPWiGySAlc0kAmZzrjgey4bFnSZmz50pFQQvT0APFh5rbVTELWQoJenA lErID+YA==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1okntb-007NJM-GF; Tue, 18 Oct 2022 14:48:43 +0000 Date: Tue, 18 Oct 2022 07:48:43 -0700 From: Christoph Hellwig To: David Howells Cc: Al Viro , jlayton@redhat.com, smfrench@gmail.com, hch@infradead.org, willy@infradead.org, linux-fsdevel@vger.kernel.org Subject: Re: [RFC][PATCH] iov_iter: Add extraction functions Message-ID: References: <3750754.1662765490@warthog.procyon.org.uk> <281330.1666103382@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <281330.1666103382@warthog.procyon.org.uk> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, Oct 18, 2022 at 03:29:42PM +0100, David Howells wrote: > Note that iov_iter_get_pages2() doesn't handle KVEC-class iterators, which > this code does - for kmalloc'd, vmalloc'd and vmap'd memory and for global and > stack variables. What I've written gets the physical addresses but > doesn't/can't pin it (which probably means I can't just move my code into > iov_iter_get_pages2()). Please look at the long discussion on Ira's patches for iov_iter_pin_pages where we went through this over and over again. We need to handle all of these in the common helper. > Further, my code also treats multipage folios as single units which > iov_iter_get_pages2() also doesn't - at least from XARRAY-class iterators. > > The UBUF-/IOVEC-extraction code doesn't handle multipage folios because > get_user_pages_fast() doesn't - though perhaps it will need to at some point. Yes, we need to be smarter about folios. But that is nothing magic about network file systems. I have old patches that added a (barely working) variant of get_user_pages_fast that exported bio_vecs and I think willy planned to look into a folio based version of get/pin user pages. But one thing at a time. I think the work from Ira to switch to proper pinning and sort out the weirdnesses for non-users buffer types is the first priority. After that proper folio or large contiguous range support is another item. But none of that is helped by parallel infrastructure.