Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1081678pxb; Thu, 9 Sep 2021 20:06:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwl1YKR3N7qh6UyStzDJygc6jHj/nDuZG6CZM79usdA3sGekpYbleTg8tF2WgxJouz28Ofz X-Received: by 2002:a05:6e02:1248:: with SMTP id j8mr3789845ilq.62.1631243189273; Thu, 09 Sep 2021 20:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631243189; cv=none; d=google.com; s=arc-20160816; b=YJ/LPcMGJqNb3Sk6NqapO48I4D84NdZMOIsP8d7eVlQwnYVQTvqT+m9HEpx88PJmI6 6gH+xIKvyyn/QSubclsVZFE3kX1MDRVfE6/FUZzI0Oj2EQTM6hzVIuhl0KQC98+sX3JW qitAjMLDq75yUO4Yzt/Qk/jPEaiUSo6DSvWgB+YQnO8nzZBFJ2F0jaSSy9gC4hiaK3Z8 icPRgQtLvsZ1iPvww9PNK/If4KRcf0rYImitkeeW/V1JBWeyYc691xDRTzKJnFO2XR+k 5KUOK08rB7WrvyXKEb224NUYEGr5SyYFcflvLBaEPdiI4L2EbSC7CeRD5wrmjMiCsixr N5KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=ckHEoUSZG06/v0xdmjoglvI+4kzhx1aBPoVlF1LTWhE=; b=Dv23VK31Xn0UA4qFd3au0vP4q3zmIP8z909DOnPVOfqvrDmUbJk/639jAhguQnbCvQ O0sxmlAq/ugxkjYigFvGfRRP7el3E8R6y3CYeNgUF05ZIQlwV+Q0deHaLi4J/61bOusQ zqXD/epIbu4sDf7EEng55Ycm5p9Z2or0cg9PSQ43BiZ1qAdNIRZx1d6sRAG+NUU+NIZ9 3KD++GAYeD2ZRwwL6yPpbLHpOHZUVhzh+3XrU/nRIMI86q1BxJ3BbEd8HTVta4Huqv4y OOHk+rRdSQMJgzFsvEYoglXtgw1zGmnodUn4WpWyoOXty49JXMr/MIArr9HN0njwfH3V CsrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=HROPzrfa; 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 m9si3598667iow.85.2021.09.09.20.06.16; Thu, 09 Sep 2021 20:06:29 -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; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=HROPzrfa; 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 S229933AbhIJDG0 (ORCPT + 99 others); Thu, 9 Sep 2021 23:06:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbhIJDGZ (ORCPT ); Thu, 9 Sep 2021 23:06:25 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9378C061574 for ; Thu, 9 Sep 2021 20:05:15 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id b7so574633iob.4 for ; Thu, 09 Sep 2021 20:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ckHEoUSZG06/v0xdmjoglvI+4kzhx1aBPoVlF1LTWhE=; b=HROPzrfaFpiM1E4ykNGOLXBxtZIhRdkQKnw0lcMLVTlhM9/MEoi4ZouuJ43EdrZsKU BVqpVQvHv8gCW6fOu2LJcnsviGDSYfDfE7vArHf0WzYPsQUFAzKMboanKLzJti/6V7iR Xakm/4xHp4w10kPFpJLfqngb9WVOU1lgg9dWKiy0GCkjxivcit9OIeUDa3IzmUdy08Ni R7UQOWYUREEqMCY3wC9KASvJg4aZ4J7wAM+E+CZXrdAQXkXzsZjFX94DZ29rhRbpAX/B EVOGcaKgbwKgwexZLEkoYcFoA/XOy0JSJj3zIDf6/D+YJv3MUG2FqOl076Mclw9oUfhA JRNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ckHEoUSZG06/v0xdmjoglvI+4kzhx1aBPoVlF1LTWhE=; b=eLZtEpMEldT8tiVNMPa9Ez3ZPbelrzB58dG2ORFsvsISmi9P9N1IuzOL/8vbV1WG8v NFa+VMkcJWMU4nuwYkhgQDL5hdRloJvPKrvuOkBBEXGwPN09fDEnyTiqp4eaIBTUG22B j/TzKrAfeSBuIk7o77wPGI3RgqT4psE1H39foTpKHAEEk0T9wO4k0cHbvNXnC6xC92Aj CWZkWKm9YYa+PUC8TPK83So08tpoNJ9o5aWtKmjAmM2f7E52/vxCy/zn4am2WoH+YaL0 Y14zEh2ewr0cl9zeAR/g+0yXDc3U227qqmkO5iNjedr4tOlFcjiPBCcRD8BhvWNu9VIw HRmw== X-Gm-Message-State: AOAM533wXmSaP4KN3kZ2Hy+DRufeDk+NExdwwq5CQpQQzxwQEeqjVnNt 3tl5hdLNwCeRYg0FLEw4yMEINQ== X-Received: by 2002:a02:c6b3:: with SMTP id o19mr2613095jan.5.1631243115081; Thu, 09 Sep 2021 20:05:15 -0700 (PDT) Received: from [192.168.1.116] ([66.219.217.159]) by smtp.gmail.com with ESMTPSA id u15sm1854658ilk.53.2021.09.09.20.05.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Sep 2021 20:05:14 -0700 (PDT) Subject: Re: [git pull] iov_iter fixes To: Al Viro Cc: Linus Torvalds , Pavel Begunkov , Linux Kernel Mailing List , linux-fsdevel References: <5971af96-78b7-8304-3e25-00dc2da3c538@kernel.dk> From: Jens Axboe Message-ID: Date: Thu, 9 Sep 2021 21:05:13 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Besides, I think that's moot as there's a better way. -- Jens Axboe