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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 7C0B1C4338F for ; Thu, 22 Jul 2021 21:20:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E34360C41 for ; Thu, 22 Jul 2021 21:20:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231962AbhGVUjY (ORCPT ); Thu, 22 Jul 2021 16:39:24 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:33276 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231260AbhGVUjY (ORCPT ); Thu, 22 Jul 2021 16:39:24 -0400 X-Greylist: delayed 1060 seconds by postgrey-1.27 at vger.kernel.org; Thu, 22 Jul 2021 16:39:23 EDT Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6fj8-002yyA-IB; Thu, 22 Jul 2021 20:55:30 +0000 Date: Thu, 22 Jul 2021 20:55:30 +0000 From: Al Viro To: Boris Pismenny Cc: dsahern@gmail.com, kuba@kernel.org, davem@davemloft.net, saeedm@nvidia.com, hch@lst.de, sagi@grimberg.me, axboe@fb.com, kbusch@kernel.org, edumazet@google.com, smalin@marvell.com, boris.pismenny@gmail.com, linux-nvme@lists.infradead.org, netdev@vger.kernel.org, benishay@nvidia.com, ogerlitz@nvidia.com, yorayz@nvidia.com, Boris Pismenny , Ben Ben-Ishay , Or Gerlitz , Yoray Zack Subject: Re: [PATCH v5 net-next 02/36] iov_iter: DDP copy to iter/pages Message-ID: References: <20210722110325.371-1-borisp@nvidia.com> <20210722110325.371-3-borisp@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210722110325.371-3-borisp@nvidia.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Jul 22, 2021 at 02:02:51PM +0300, Boris Pismenny wrote: > From: Boris Pismenny > > When using direct data placement (DDP) the NIC writes some of the payload > directly to the destination buffer, and constructs SKBs such that they > point to this data. To skip copies when SKB data already resides in the > destination we use the newly introduced routines in this commit, which > check if (src == dst), and skip the copy when that's true. > > As the current user for these routines is in the block layer (nvme-tcp), > then we only apply the change for bio_vec. Other routines use the normal > methods for copying. Please, take a look at -rc1 and see the changes in lib/iov_iter.c in there.