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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 A5468C49EA5 for ; Thu, 24 Jun 2021 07:50:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91B04613C7 for ; Thu, 24 Jun 2021 07:50:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231772AbhFXHxK (ORCPT ); Thu, 24 Jun 2021 03:53:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231709AbhFXHxK (ORCPT ); Thu, 24 Jun 2021 03:53:10 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16BBCC061756 for ; Thu, 24 Jun 2021 00:50:51 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id d1so1882202plg.6 for ; Thu, 24 Jun 2021 00:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=DuYrhRvvccPm1tuDDRCCJiwUp+nK5oGg2qx9gi2wCLU=; b=E1tHorlJ2Q3RtXy2nJKFiv2TCi095JaxSn8/8u2+X3wgTQWTBERzbcf8H4HdZg/T15 WDx7sMNuR9tHuIW8agdQY9Svoaxg8LsQLdkVMfUpZcReVik/5HGC/wKs9bkHPmizsW0x thwgR+kpE3br7f3hLc1a8UugLTUYy5GjHzWlJMeb1S9HGzIDSkbfqN4IzukNrCw9fs3d SiHtiYec9lBpnDytaWTGjJ+PwAoqne0/37fIYfRDFtIsZQP2755XH7Hmmeh9+1fQ34Dv cE+7PmvyVj0kFKXZBvdA47kpRpGZ/G21O3ag+H3jWvj61qrcT1ItX2FlPQCF2oq+9Slf o2gA== 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=DuYrhRvvccPm1tuDDRCCJiwUp+nK5oGg2qx9gi2wCLU=; b=brY1dxGM+lUUxlVA2tg6jEqyj/AYVHXEz95+Jwkq/GaM6vA89X/Ku6DFz0HfsB0m2y F45VTHqIvx+ORJIVPO6lKT4emVyAbWGu6YlowSV0mvQQQO9zKHMwHlY7SKnK36KMUa4S ZAHm6RuYuATcBwWITqeANxa1cw/0fFb2kmr4qxjl6yKnfGuBUM5MBn5Kn20ZkTmQECAC wqSDh2ZzfwCNwR8Rui+VfvNQBeAL/JeUKU/CMsxV5DbnWICy3GE/Dbkea25n7nmWhsLl eTJEV83RD7oy9GzGgV+Aai1FDula03goZrXh57IYGFI3bvveT3bdjjIP6fMvrh6YyDqu tG5w== X-Gm-Message-State: AOAM532WXLkxsdnqpEd/8o8Pgd//z8iR+aBfXpDPVFyKU2r/gJVGPxSR b4H9fsAreHvAD6nTli2WaDNfHw== X-Google-Smtp-Source: ABdhPJyRfmSm1SUcUfxHGjDwmKcuk2FKqzM9vMqnbJyAcd/YNIZVThg+ZpYpW8IvtZGBWva8L+Kzsg== X-Received: by 2002:a17:902:ff16:b029:123:426a:9331 with SMTP id f22-20020a170902ff16b0290123426a9331mr3202253plj.34.1624521050548; Thu, 24 Jun 2021 00:50:50 -0700 (PDT) Received: from relinquished.localdomain ([2601:602:8b80:8e0::ce6a]) by smtp.gmail.com with ESMTPSA id z204sm2029060pfc.84.2021.06.24.00.50.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Jun 2021 00:50:49 -0700 (PDT) Date: Thu, 24 Jun 2021 00:50:49 -0700 From: Omar Sandoval To: Christoph Hellwig Cc: Matthew Wilcox , Al Viro , Linus Torvalds , Dave Chinner , linux-fsdevel , linux-btrfs , Linux API , Kernel Team , Dave Chinner Subject: Re: [PATCH RESEND x3 v9 1/9] iov_iter: add copy_struct_from_iter() Message-ID: References: <20210622220639.GH2419729@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Thu, Jun 24, 2021 at 07:41:12AM +0100, Christoph Hellwig wrote: > I'm also really worried with overloading the regular r/w path and > iov_iter with ever more special cases. We already have various > performance problems in the path, and adding more special cases ain't > gonna help. The changes to the normal path are: * An extra check for RWF_ENCODED and FMODE_ENCODED_IO in kiocb_set_rw_flags(). * Splitting some of the checks in generic_write_checks() into a new function. * Checks for the IOCB_ENCODED flag in the filesystem's read_iter/write_iter. At least for Btrfs, the rest happens in a completely separate code path. So, there are a couple of extra checks, but it's not as drastic as it might first appear.