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=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 8D80AC4338F for ; Wed, 4 Aug 2021 14:14:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6514C60EE8 for ; Wed, 4 Aug 2021 14:14:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238659AbhHDOOV (ORCPT ); Wed, 4 Aug 2021 10:14:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238560AbhHDOOV (ORCPT ); Wed, 4 Aug 2021 10:14:21 -0400 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95765C061798 for ; Wed, 4 Aug 2021 07:14:07 -0700 (PDT) Received: by mail-il1-x12a.google.com with SMTP id i9so1791423ilk.9 for ; Wed, 04 Aug 2021 07:14:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6E78/6zLDHtWRwajFV5K+kCnVIVVes2MqNHejOQaS6E=; b=vhAPM98ttnDbUN4JAbm0oJHOwVuyzxx1A3gOH5ff9H+jkXHwXrh98SfBcCaCrEdXH2 htkVLFQJctJNT86mLuAlVwF2pSypVr7j5GVJi7UdTdfNVM9LRK4riLcQEzvk6IsiAxeO TPDDQJ0GW4LhBu9bix1JjBdiMvHfRujOg5EsLWfNXAiuHNjei3JkNC3GVeY7GE5svhsR dICREVX9pTY4wrdbx+noHQlbci9Fk8DE25D+RGniZwRLo2pz+zqVNZ5StlqOY6GJ78yH TQwlL7+reOx2rucQq3DcsR2OT4VcCcvfWt9K4B9I+Bvpl9zjPZ7JgK3lGMzibwsJV8GT JGGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6E78/6zLDHtWRwajFV5K+kCnVIVVes2MqNHejOQaS6E=; b=nF20RBU0dRON+o5mPVRsnznw9rzAbHOJeGqtdn50JOk/U+IWD5Z2geUkIEZXo/Q5yZ ydV/wV3SNwwiHY2ST4rT8AlFVkfYG10c1Jy0lEytpXHNxi5PgpapYlgoNRFtWLzT0JzO TpkoJtWOiuL2H1VENPNyApW0B7dVUs7SoGarlAf6QolYyzt89O6Y1kTD3wDUU4zY+K6P /8MEaSQSnocuMdlc2FTk5faRV+50cQ094DTunrTjNWNxdzSA7DTrta2+Ekxq7lo/EXYh MSX5PGqR0m3RvyNTO/TUbYqGrpofjTgpu87nskVA8WpWZTEOJEG0geM7X48Ab7263hV0 jGMA== X-Gm-Message-State: AOAM533M3a9EGTSVqcpx5vUdIhLngvvTS2WbxYcQ+KV7Lpl00nmeJSw8 WvW3+pEmf4E0qSilesaoYnfm9XSqPD5jvYXOIBQ= X-Google-Smtp-Source: ABdhPJzI07cnNLAaxl2fP6+LCl/V6mxvF+ndNz0UwEqi0SZof6epBx37dsf8PW4pOi/lXNC8iZe7Ls1qtbBBa7OxdhE= X-Received: by 2002:a05:6e02:2190:: with SMTP id j16mr823136ila.144.1628086447042; Wed, 04 Aug 2021 07:14:07 -0700 (PDT) MIME-Version: 1.0 References: <20210722110325.371-1-borisp@nvidia.com> <20210722110325.371-3-borisp@nvidia.com> <6f7f96dc-f1e6-99d9-6ab4-920126615302@gmail.com> <20210723050302.GA30841@lst.de> In-Reply-To: From: Or Gerlitz Date: Wed, 4 Aug 2021 17:13:55 +0300 Message-ID: Subject: Re: [PATCH v5 net-next 02/36] iov_iter: DDP copy to iter/pages To: Al Viro , Christoph Hellwig , Sagi Grimberg Cc: Boris Pismenny , Boris Pismenny , David Ahern , Jakub Kicinski , David Miller , Saeed Mahameed , axboe@fb.com, Keith Busch , Eric Dumazet , Shai Malin , boris.pismenny@gmail.com, linux-nvme@lists.infradead.org, Linux Netdev List , benishay@nvidia.com, Or Gerlitz , Yoray Zack , Boris Pismenny , Ben Ben-Ishay , Or Gerlitz , Yoray Zack Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Jul 23, 2021 at 8:30 AM Al Viro wrote: > On Fri, Jul 23, 2021 at 07:03:02AM +0200, Christoph Hellwig wrote: > > On Thu, Jul 22, 2021 at 11:23:38PM +0300, Boris Pismenny wrote: >>> This routine, like other changes in this file, replicates the logic in >>> memcpy_to_page. The only difference is that "ddp" avoids copies when the >>> copy source and destinations buffers are one and the same. >> Now why can't we just make that change to the generic routine? > Doable... replace memcpy(base, addr + off, len) with > base != addr + off && memcpy(base, addr + off, len) > in _copy_to_iter() and be done with that... Guys, AFAIR we did the adding ddp_ prefix exercise to the copy functions call chain ddp_hash_and_copy_to_iter -> ddp_copy_to_iter -> _ddp_copy_to_iter -> ddp_memcpy_to_page to address feedback given on earlier versions of the series. So let's decide please.. are we all set to remove the ddp_ prefixed calls and just plant the new check (plus a nice comment!) as Al suggested? re the comments given on ddp_memcpy_to_page, upstream move to just call memcpy, so we need not have it anyway, will be fixed in v6 if we remain with ddp_ call chain or becomes irrelevant if we drop it.