Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2339714imc; Tue, 12 Mar 2019 11:43:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrGzYm0OM91QbUHbI+NBskTtuhZB7FvxtuaAEulbVnNp1fsau+OgkxqgHMbWjDNtpYRL8X X-Received: by 2002:a63:694a:: with SMTP id e71mr19502626pgc.129.1552416188338; Tue, 12 Mar 2019 11:43:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552416188; cv=none; d=google.com; s=arc-20160816; b=qs4SPgx3s5zpR+YGGl2zHgqy5AiDy+OMhGMoV4AOlrq8pMiynzpajV7wtlW2CqvrVG Wa58CLhu3ysZD6/oP/sFAUuWDWIApvMXwrxEPg4NnFd0Oqr0QggFBcUMVyKS4q4FplvT biEgjTCISM6OSWP+Kqjq5A1r+HPrGDKEnbCtMbXo4zTUOenSZiCKNLRwj20n+ftzWgHl RkU/fgnzA+4no3NGfMD9n4B5JnfC7DRLC2hKhJBxnG1OtT9sCDwgXXWX0QAbIyq2/Nmh uHd5y7e3xtVl/RwN2n9Xt2kE1IfPz0uqiqnlS0up7WLpw36Q5h2HJLDpE9klBGnPxvqA 2R4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ALsnwes5ankFWQd/y9xm0PV9fR/e70I0ltHr+DSdKPc=; b=DMEpcjYlqr/9J11BLqjuFYQG/81AOSj39KcqJkqsTOwR/BEY+GOaaQypcKqnUjqCpT EVFRMwExvECDjiIXmizDduDv6aGnE/gsrOvcRvMpPkYS9l/mcsSRkpgDBXWDZBhViJAP p3f87sDnJ9sjDYVpciaIGhTZlakyOMEPSHD2kGQ/60LAW4Bio2S/dJiM97PR+OyVKJaG drFsV5xobUwiEqxg0NuTD/xXiefRzT5pCdoWHgktS5Ue9R5NnPwYAPmVLy8l0eH9e/0+ M32MrYTE2U7zdJx/0XWjRbeYGF5tvCM9wVHnaC/2oIuSPFXQ6skJ3n0WRF6BUtozKSfT bP6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r27si8089129pgl.316.2019.03.12.11.42.52; Tue, 12 Mar 2019 11:43:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726895AbfCLSlE (ORCPT + 99 others); Tue, 12 Mar 2019 14:41:04 -0400 Received: from mga17.intel.com ([192.55.52.151]:29281 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726360AbfCLSlE (ORCPT ); Tue, 12 Mar 2019 14:41:04 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2019 11:41:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,471,1544515200"; d="scan'208";a="306615952" Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by orsmga005.jf.intel.com with ESMTP; 12 Mar 2019 11:41:02 -0700 Date: Tue, 12 Mar 2019 03:39:33 -0700 From: Ira Weiny To: Christopher Lameter Cc: Dave Chinner , john.hubbard@gmail.com, Andrew Morton , linux-mm@kvack.org, Al Viro , Christian Benvenuti , Christoph Hellwig , Dan Williams , Dennis Dalessandro , Doug Ledford , Jan Kara , Jason Gunthorpe , Jerome Glisse , Matthew Wilcox , Michal Hocko , Mike Rapoport , Mike Marciniszyn , Ralph Campbell , Tom Talpey , LKML , linux-fsdevel@vger.kernel.org, John Hubbard Subject: Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions Message-ID: <20190312103932.GD1119@iweiny-DESK2.sc.intel.com> References: <20190306235455.26348-1-jhubbard@nvidia.com> <010001695b4631cd-f4b8fcbf-a760-4267-afce-fb7969e3ff87-000000@email.amazonses.com> <20190310224742.GK26298@dastard> <01000169705aecf0-76f2b83d-ac18-4872-9421-b4b6efe19fc7-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01000169705aecf0-76f2b83d-ac18-4872-9421-b4b6efe19fc7-000000@email.amazonses.com> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 12, 2019 at 05:23:21AM +0000, Christopher Lameter wrote: > On Mon, 11 Mar 2019, Dave Chinner wrote: > > > > Direct IO on a mmapped file backed page doesnt make any sense. > > > > People have used it for many, many years as zero-copy data movement > > pattern. i.e. mmap the destination file, use direct IO to DMA direct > > into the destination file page cache pages, fdatasync() to force > > writeback of the destination file. > > Well we could make that more safe through a special API that designates a > range of pages in a file in the same way as for RDMA. This is inherently > not reliable as we found out. I'm not following. What API was not reliable? In[2] we had ideas on such an API but AFAIK these have not been tried. From what I have seen the above is racy and is prone to the issues John has seen. The difference is that Direct IO has a smaller window than RDMA. (Or at least I thought we already established that?) "And also remember that while RDMA might be the case at least some people care about here it really isn't different from any of the other gup + I/O cases, including doing direct I/O to a mmap area. The only difference in the various cases is how long the area should be pinned down..." -- Christoph Hellwig : https://lkml.org/lkml/2018/10/1/591 > > > Now we have copy_file_range() to optimise this sort of data > > movement, the need for games with mmap+direct IO largely goes away. > > However, we still can't just remove that functionality as it will > > break lots of random userspace stuff... > > It is already broken and unreliable. Are there really "lots" of these > things around? Can we test this by adding a warning in the kernel and see > where it actually crops up? IMHO I don't think that the copy_file_range() is going to carry us through the next wave of user performance requirements. RDMA, while the first, is not the only technology which is looking to have direct access to files. XDP is another.[1] Ira [1] https://www.kernel.org/doc/html/v4.19-rc1/networking/af_xdp.html [2] https://lore.kernel.org/lkml/20190205175059.GB21617@iweiny-DESK2.sc.intel.com/