From patchwork Fri Apr 21 16:53:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 13220402 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 55DFCC77B76 for ; Fri, 21 Apr 2023 16:54:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232821AbjDUQyw (ORCPT ); Fri, 21 Apr 2023 12:54:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233097AbjDUQya (ORCPT ); Fri, 21 Apr 2023 12:54:30 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E479015455 for ; Fri, 21 Apr 2023 09:54:13 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-524c7deb811so148711a12.1 for ; Fri, 21 Apr 2023 09:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20221208.gappssmtp.com; s=20221208; t=1682095990; x=1684687990; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=jJjBJGEfJiS7YGgszLHv/hYXIaig0UdlIIh45n7z4Z8=; b=YkNT/0z3eyfTjfi1ClB+GrZTvG8lz3E50RTQieg2h6pQib5FvEfO+Rh80h0qhgZx2/ a5Ntw1wGohaRwn3IEcR4K8iYnLIAdv2Gfs1uXuQJy+yDHgbjwKTCq57vStBUyXInYyFT YHBU5QBIw3AW06BfzWjcE06gA30l6q/+mVMTqrpMvYiC9BYIX4IqWpDpGwtGL/y7Wl8k wLnRGOt+ePzZ4K5XpL4JV6+DPXHpbPtafcSix9dtkdzkoNJkxq2NLeXkUUkGGIzbawFT jhIG9k/QDXglDRgT2X0G4qEChhRtHc0Yy7TdjyiX8dunsulgVXv5c1n2nqxN0MSc07Wb 4Jbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682095990; x=1684687990; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=jJjBJGEfJiS7YGgszLHv/hYXIaig0UdlIIh45n7z4Z8=; b=bOlyCGD5LgjF7Qy2OvEViwp+r0cFwvDCDTpdSQNJ8MAMb1PH2jQpRc60woHPRo93/u lU5myA+ETZSAR4KUQCWc/mIWDOEonZGwPEhS9eU5dmcGDLCR6yVbq6HMBMVki9h8OMV1 lLLLhs40ShSVSvTXsz2oRbEMXQmkUnm2Ihh+4FqUDFA6CDy2hCbzZtsxah7IKA3Qsk1E RGhsOZNdxhvckC+Q8D0gjgnQBRyLfowX6/Y+hvj75TYx1UHUA0XuMVqxCU0TQ/XRvy3U QbjAHi5GrDnFC6p7EV2KGg1207d6gFFn8i7+RCSmENr9aBHDNXuwSIXPir6eMf+ECUaZ KDag== X-Gm-Message-State: AAQBX9c6qeMSLLaRfihPOeYiAky2tpAJ2t4K1DYtDFgZ7kzVCZg2BwuO XajQpzKpUvzs/HAMoLck0crxHd8WLpI+Jh8rqM0= X-Google-Smtp-Source: AKy350ZTen2cUopOLeGpkkSB7i7dL41K6pa9Gw5ccAzPMa5fhhJBPhG5/WdzpHjTaRoYTRC+jJ3klA== X-Received: by 2002:a17:903:2447:b0:1a6:b196:619d with SMTP id l7-20020a170903244700b001a6b196619dmr6815727pls.6.1682095989578; Fri, 21 Apr 2023 09:53:09 -0700 (PDT) Received: from [192.168.1.136] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id j5-20020a170902c08500b001a92a5703e1sm2983337pld.53.2023.04.21.09.53.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Apr 2023 09:53:09 -0700 (PDT) Message-ID: Date: Fri, 21 Apr 2023 10:53:08 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US To: Linus Torvalds Cc: "linux-fsdevel@vger.kernel.org" , Christian Brauner From: Jens Axboe Subject: [GIT PULL] Turn single vector imports into ITER_UBUF Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Hi Linus, This series turns singe vector imports into ITER_UBUF, rather than ITER_IOVEC. The former is more trivial to iterate and advance, and hence a bit more efficient. From some very unscientific testing, ~60% of all iovec imports are single vector. One fixup patch from Josh since this was last posted, fixing a UACCESS complaint that was due to the compiler optimization gone wrong where it moves user_access_begin() outside of copy_compat_iovec_from_user(). This has been in linux-next for about a month without any complaints, outside of the above mentioned UACCESS warning. Please pull for 6.4-rc1! The following changes since commit 3a93e40326c8f470e71d20b4c42d36767450f38f: Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm (2023-03-27 12:22:45 -0700) are available in the Git repository at: git://git.kernel.dk/linux.git tags/iter-ubuf.2-2023-04-21 for you to fetch changes up to 50f9a76ef127367847cf62999c79304e48018cfa: iov_iter: Mark copy_compat_iovec_from_user() noinline (2023-04-12 10:46:48 -0600) ---------------------------------------------------------------- iter-ubuf.2-2023-04-21 ---------------------------------------------------------------- Jens Axboe (11): block: ensure bio_alloc_map_data() deals with ITER_UBUF correctly iov_iter: add iter_iovec() helper IB/hfi1: check for user backed iterator, not specific iterator type IB/qib: check for user backed iterator, not specific iterator type ALSA: pcm: check for user backed iterator, not specific iterator type iov_iter: add iter_iov_addr() and iter_iov_len() helpers iov_iter: remove iov_iter_iovec() iov_iter: set nr_segs = 1 for ITER_UBUF iov_iter: overlay struct iovec and ubuf/len iov_iter: convert import_single_range() to ITER_UBUF iov_iter: import single vector iovecs as ITER_UBUF Josh Poimboeuf (1): iov_iter: Mark copy_compat_iovec_from_user() noinline block/blk-map.c | 7 +-- drivers/infiniband/hw/hfi1/file_ops.c | 10 ++-- drivers/infiniband/hw/qib/qib_file_ops.c | 4 +- drivers/net/tun.c | 3 +- drivers/vhost/scsi.c | 2 +- fs/btrfs/file.c | 11 ++-- fs/fuse/file.c | 2 +- fs/read_write.c | 11 ++-- include/linux/uio.h | 57 ++++++++++++++------ io_uring/net.c | 4 +- io_uring/rw.c | 35 ++++++------- lib/iov_iter.c | 89 +++++++++++++++++++++----------- mm/madvise.c | 9 ++-- sound/core/pcm_native.c | 26 ++++++---- 14 files changed, 165 insertions(+), 105 deletions(-)