Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1725802imc; Mon, 11 Mar 2019 22:23:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4so9wcbFkpJMThIaCNKbmh0QpDimytWr1PIRVrw6/ZH/rr2prReSLMufwJlV46xwFgv5J X-Received: by 2002:a63:4563:: with SMTP id u35mr8970305pgk.417.1552368239653; Mon, 11 Mar 2019 22:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552368239; cv=none; d=google.com; s=arc-20160816; b=qRUtqvwreG5XKkbP8ZUAJjenUGh7hblXuEeFGKRfV8Dm2uvbokfRG3xP+JDcgxvYF3 4uxoXnSodKBLkAN0353QAfZYq6wF3hFQkYQcT/NMgj/a5S6vseNrr76sJAK3f31TRpA5 n+pya1wepZDn5ENGj8+ryyx8HZ/GkP3p+1Ojb9dAu+iE02tRz8xs0TWzsputv6dvk0Ta tVGilMmsKec7vz/TrJHAk+y2na41ZSX7mW2mj6r2HS4AOS7ImbTo5yAFolLgLzp5aGZm O1fW1ZfGKUsrYcG3VGs3IRKg9d3LN6ihcvG1kZBK2W0et9XQBXnL9Xf/J5uanZ7K6JxV QvaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=z01aYAg46TzuTIqJisqKm8re0ji3PJzla2eSuVgDaEg=; b=O7E1/agDBbEl3JpQdytfGt7pYVDNmFvyH23FD+twIxXgq6bs2eTRyQZl4sLJMHnq2P HB+64xxiOYVxrwKx1z47QLWEr2LA4/4jViizg6iUkdf9VK3+3GKkdCn5e+cup6XX++0x rwl8vDLN2rTOCwbhYtzlz1Ly1QubXqwOGLnZXJ6fd4hagaNtZNwx0aOE/tp09S8jxX+u QmGI5DpOE9jpLHMU5Hiuw27lQhn24fDTALlwlSvwdPVMCtkmI9VIETSsAVTB1wtDRXHY nKuThJq1LG9EYjwhjy9AsdKcQikhD+WM7rKuYKsPh19JRbe1Rc85fBOBQUHNWySYmB1L XEhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=h93TzIKV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m10si6986852pls.65.2019.03.11.22.23.43; Mon, 11 Mar 2019 22:23:59 -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; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=h93TzIKV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726524AbfCLFXW (ORCPT + 99 others); Tue, 12 Mar 2019 01:23:22 -0400 Received: from a9-32.smtp-out.amazonses.com ([54.240.9.32]:57742 "EHLO a9-32.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725824AbfCLFXW (ORCPT ); Tue, 12 Mar 2019 01:23:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1552368201; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=z01aYAg46TzuTIqJisqKm8re0ji3PJzla2eSuVgDaEg=; b=h93TzIKVo3t5INkiUh683/9f5Ugs9bfgUZdPiU/mr0UMqzn5NDgBRiJ3s5JEF+q8 MCB0EzTQifuAOul+pMn3x3RE6Uc8yfiVVPn2ZlbQ2S6YRNPiiBPKCSP9WUi6vkuKjqx +lSakYv0fmIQcKCWRIscw1prKTsiJYtGzxtnpPis= Date: Tue, 12 Mar 2019 05:23:21 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Dave Chinner cc: john.hubbard@gmail.com, Andrew Morton , linux-mm@kvack.org, Al Viro , Christian Benvenuti , Christoph Hellwig , Dan Williams , Dennis Dalessandro , Doug Ledford , Ira Weiny , 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 In-Reply-To: <20190310224742.GK26298@dastard> Message-ID: <01000169705aecf0-76f2b83d-ac18-4872-9421-b4b6efe19fc7-000000@email.amazonses.com> References: <20190306235455.26348-1-jhubbard@nvidia.com> <010001695b4631cd-f4b8fcbf-a760-4267-afce-fb7969e3ff87-000000@email.amazonses.com> <20190310224742.GK26298@dastard> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2019.03.12-54.240.9.32 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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?