Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7783509rwd; Tue, 20 Jun 2023 06:16:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6C94JncELII3ev8o4OA59Sbm/HZz3eiLNKRKVwuTGM2EqIdIyQp4SM+wPgiq3w692xpdnZ X-Received: by 2002:a17:902:e5c9:b0:1b0:3742:e732 with SMTP id u9-20020a170902e5c900b001b03742e732mr15376350plf.23.1687266971266; Tue, 20 Jun 2023 06:16:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687266971; cv=none; d=google.com; s=arc-20160816; b=mJlDUpjrfLntRgFyWpewdthZ+99p150AY9JGf8zPjcMcvEIpB55JIqIXM9/MqwLF9i retLJCgcbin3ZeN0LlUSQdBFlpBboikd0tVM6VcA9kbz58voHrTLuPpcQWCdIt7CHSDH jW3AtQuwDD9KVE//YfwPG1S0rMltzVh0qN8YiOCTozO71Ya9TPVbZIAUXQvznNW1G6pt t73c2mkD4Vn7Fc+OOCX01KXbSA2nOtAmYAde94Uo92I10KoEiLmuztZZDlr/Muxba0hu yaEa0rdHa9bN8XTcZ9LC+MF2HpU1rE0pVaMq7Js2zeAKQV6qGQaPAkq++s3S+yrBcXwn w1oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=X93F7b0wOWdtuJBRHnqORIf5mXHGdp4ICFY23Klr0r0=; b=kN9nLAfIvHjwIbyesxJk3le5u9Kcm7thT5fr4ZWoH5D1WEIsm/apemiZ2H+OFbgajc ueXQxWPY5y6At66KjTSfubPBQMz0CwSwaiQUy72IFEw2ViBKZ5IfXv5jdCTjhR0VzDax 9oPp8M4TOTx+8AFDc/yegXcCzQoKHrsTXLwAMyuMj/ufDM+gpYc3KJ4p62wRkgXHGzZ7 b/ZDw+p/8FjH/OIBch9kzpyFFJ64ZVONBXPGLrfCx4rgulaPqZGHW6D1k0w3/JS078hm BO1BJJf0bISXfdm314TZNneBkqyTyoXMOC9XG2dEHPSbykMQLluVg9y6MTh+QCWcL6/l XQzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h3-20020a170902b94300b001b39ba937d1si1844994pls.330.2023.06.20.06.15.56; Tue, 20 Jun 2023 06:16:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232617AbjFTNBC (ORCPT + 99 others); Tue, 20 Jun 2023 09:01:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232487AbjFTNAw (ORCPT ); Tue, 20 Jun 2023 09:00:52 -0400 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66702170A; Tue, 20 Jun 2023 06:00:36 -0700 (PDT) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-3f99aa36d18so6098345e9.1; Tue, 20 Jun 2023 06:00:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687266035; x=1689858035; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=X93F7b0wOWdtuJBRHnqORIf5mXHGdp4ICFY23Klr0r0=; b=OqqDccxaNYK5K3d98pfgNW7/Ll1qR4eLEoPTGluvID+UPYyEF74c6N2P8F8xOTTCQT 2YiPn45rdos8PQBzoE8dmEBTNIaijq3QGDjpGmwO3DmEw/IsVnirmNEj444sCrea3R64 bvwmuUNkUmUgU5UVdSViqcdUv1hYo1nUyt5a7d+cNT2I3ATFWe19srg/bvgWG3CT923h dFbMAjVKUC0RMrrrjDNZ5lvoCWokJz8yx1S5sfBGAilIRk5B4K1W+/cnkr4jceaWTRvS gtXQiIJ2RVLs5I+F8Heqcx4oL+OmnQ1qBUnNuvhZo3MjqUXkfAdKu26ywf3tiW99YEvv FwXg== X-Gm-Message-State: AC+VfDzRQYpLGuaCZHEAio7lqYmhtsyT7Z0+1q/cmWQmQx8X5vEbhMCv 6Gnzl+XJ1I0TD4dnfTo/anA= X-Received: by 2002:a1c:ed17:0:b0:3f5:f543:d81f with SMTP id l23-20020a1ced17000000b003f5f543d81fmr13305521wmh.3.1687266034561; Tue, 20 Jun 2023 06:00:34 -0700 (PDT) Received: from [192.168.64.192] (bzq-219-42-90.isdn.bezeqint.net. [62.219.42.90]) by smtp.gmail.com with ESMTPSA id z8-20020a05600c220800b003f9b12b1598sm5339723wml.22.2023.06.20.06.00.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jun 2023 06:00:34 -0700 (PDT) Message-ID: <028fd6f1-6fc2-6e8d-3de0-71c2b8f6b754@grimberg.me> Date: Tue, 20 Jun 2023 16:00:31 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH net-next v2 10/17] nvme: Use sendmsg(MSG_SPLICE_PAGES) rather then sendpage Content-Language: en-US From: Sagi Grimberg To: David Howells , Willem de Bruijn Cc: netdev@vger.kernel.org, Alexander Duyck , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Ahern , Matthew Wilcox , Jens Axboe , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Keith Busch , Jens Axboe , Christoph Hellwig , Chaitanya Kulkarni , linux-nvme@lists.infradead.org References: <648f353c55ce8_33cfbc29413@willemb.c.googlers.com.notmuch> <20230617121146.716077-1-dhowells@redhat.com> <20230617121146.716077-11-dhowells@redhat.com> <755077.1687109321@warthog.procyon.org.uk> <55e7058b-07d0-3619-3481-2d70e95875ea@grimberg.me> In-Reply-To: <55e7058b-07d0-3619-3481-2d70e95875ea@grimberg.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>      struct bio_vec bvec; >>>      struct msghdr msg = { .msg_flags = MSG_SPLICE_PAGES | ... }; >>> >>>      .. >>> >>>      bvec_set_virt >>>      iov_iter_bvec >>>      sock_sendmsg >>> >>> is a frequent pattern. Does it make sense to define a wrapper? Same >>> for bvec_set_page. >> >> I dunno.  I'm trying to move towards aggregating multiple pages in a bvec >> before calling sendmsg if possible rather than doing it one page at a >> time, >> but it's easier and more obvious in some places than others. > > That would be great to do, but nvme needs to calculate a data digest > and doing that in a separate scan of the payload is not very cache > friendly... > > There is also the fact that the payload may be sent in portions > asynchronously driven by how the controller wants to accept them, > so there is some complexity there. > > But worth looking at for sure. > > The patch looks good to me, taking it to run some tests > (from sendpage-3-frag branch in your kernel.org tree correct?) > > For now, you can add: > Reviewed-by: Sagi Grimberg Patches seem to hold up. Tested-by: Sagi Grimberg However if possible, can you please split nvme/host and nvme/target changes? We try to separate host side and target side changes in the same patch.