Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1085512pxb; Thu, 9 Sep 2021 20:14:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPqW95UgLHZT67fuhrhjYwyxfPTDzkVb0mgDCKu601Rcw8fxSZc17SGp5/48h6sBB3cF7E X-Received: by 2002:a05:6e02:e03:: with SMTP id a3mr4819256ilk.144.1631243672446; Thu, 09 Sep 2021 20:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631243672; cv=none; d=google.com; s=arc-20160816; b=HYOtOIYzvT4Imm9qV/r1O5cH0ZFPk9mARDNHqzY5vWYiKqVVOAuI2Kw7cxkqwM4Xar o1/AtS8Bjo3gSj6Ynvi3e6StJij4ROvp2ZI8JgkCE4qVXJ7VaBWyzPEIvq9ppUM6D/WY Np4NsIoKuzPd+JRtTnNUFrSBmYC9u2C/0toSO6Wq1x0casLAtnludAXYRmCOQNBGqlmC KR9W6K7ODFkf5lcjA/jM1FH/jdkjuGsE3tRnmVmu6ZATa5iUsboll2HcFovppnjYKhUa PNxBkno0icms6C0N3Q84AXPWYHyBME1iiKFa/3yk0PaeoHDR3lKeOarglQZVYFG1nTg4 ZrsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=JAbLHE2WIlBwVQ0tOZinVURT1vmfOyQyFbowxLV3d74=; b=t3IvbRbS7w8VjXlxsiLD7oTjdMnE9n0E5ojlMpJRDPuEODP3BRXON8bQgnJUwNfpIP k1BsnS3V9PReUGunqyB+pj46vFcRFtzbowGSRCIW1ju66wZr1YJUwpSPZi835A6rPzAI 1QKlWAQXSLHZ3C+ys4fDBdlv8gb6rNLRDJUwqBbytx837aPISY0+LQlbDxB6EwrB5DLA bkEqMIRsz+xlWeEuFIBGxKUjprDLGJh6Zg1vUG9EMr6XexuYV1c9ab+4hgNNrTP8ymDd EQVeZad04DjHZSedHMHGQBWsU2AoHXpfa3jhYrxG6fwb/WpaE/8RJEC+Ct6zgx95xHSJ FvFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e17si4104915iot.109.2021.09.09.20.14.19; Thu, 09 Sep 2021 20:14:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229900AbhIJDOo (ORCPT + 99 others); Thu, 9 Sep 2021 23:14:44 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:59090 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbhIJDOo (ORCPT ); Thu, 9 Sep 2021 23:14:44 -0400 Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOWwh-002mvm-Ny; Fri, 10 Sep 2021 03:11:19 +0000 Date: Fri, 10 Sep 2021 03:11:19 +0000 From: Al Viro To: Jens Axboe Cc: Linus Torvalds , Pavel Begunkov , Linux Kernel Mailing List , linux-fsdevel Subject: Re: [git pull] iov_iter fixes Message-ID: References: <5971af96-78b7-8304-3e25-00dc2da3c538@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 09, 2021 at 09:05:13PM -0600, Jens Axboe wrote: > On 9/9/21 8:57 PM, Al Viro wrote: > > On Thu, Sep 09, 2021 at 03:19:56PM -0600, Jens Axboe wrote: > > > >> Not sure how we'd do that, outside of stupid tricks like copy the > >> iov_iter before we pass it down. But that's obviously not going to be > >> very efficient. Hence we're left with having some way to reset/reexpand, > >> even in the presence of someone having done truncate on it. > > > > "Obviously" why, exactly? It's not that large a structure; it's not > > the optimal variant, but I'd like to see profiling data before assuming > > that it'll cause noticable slowdowns. > > It's 48 bytes, and we have to do it upfront. That means we'd be doing it > for _all_ requests, not just when we need to retry. As an example, current > benchmarks are at ~4M read requests per core. That'd add ~200MB/sec of > memory traffic just doing this copy. Umm... How much of that will be handled by cache? > Besides, I think that's moot as there's a better way. I hope so, but I'm afraid that "let's reload from userland on e.g. short reads" is not better - there's a plenty of interesting corner cases you need to handle with that.