Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5041021imu; Wed, 19 Dec 2018 04:44:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/VAuXJx1yinVi/K8GkCfc558iWqqfg8CLzNhffOXkJAUv55R+ckWtEeEu1+wwJkH2iwtya0 X-Received: by 2002:a63:d846:: with SMTP id k6mr19699904pgj.251.1545223487135; Wed, 19 Dec 2018 04:44:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545223487; cv=none; d=google.com; s=arc-20160816; b=Q3UlR4mAZy+dMmyZgP9cAmX5dF6OYGSspW6g1kegtIqPjQ3BL18/jtRBw/ozTo+xEE 9rM/2SK36J/d3C6ZKImWWKemY9sgJg0lWBiSVPH1DV5/U35kmlGuoOFpyVCbxJqeIhTe bWx7lSO9b5Non9XT6dd5vDAh11o+448LrWnEXtl3NpeOCOmyXfAEefvRyHnlL93sdKTY FZ3cTvyF9q4WR9fOkwCkAMVXEtRFypmkNyjvuN0b3KYBkCZ2Ufxa4enLqKpXgNWaPro9 a6niShtwwCTL16WBx+56IqQLZ0Y691BfyM+wzqRtMWqebS5IVfyBgieA2G50q3e5IGLp K83w== 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=qKGfvQ2aKIAJcS6UScKoGp4IX7cQ+R8QpwtFtoh9TmE=; b=E6gScIwpccgmj55nHXzWZAhx0IB0cCBBbdftmf0i0B9tT4UEKLsgdqlJrT6Fn1lZxN bgmk6iWZ5VhpakgDxkDf9HlqtBasDjnp/XFL4w6XeDKNtMhV9xue8PuzmV0VUQtrgYNn sxyfPG74H6vQH8cN2wL7OAbrfN66FyLi2SMaabGST0zP/9T7Tp1SOJFzfKxcrygIF0QF TbL1Hifqlyk+bsZGu40BdAc3Hkww7UOz7a/ulCyL2biVA+bw0lLjFUfvjQ9ixV0rgeai a/uTajSOc1nt4M3LlKloWi5jKHZbkQNARU4QyxUXfL8U7diQaW5i5P+0a9z1m2WBwRWS smoQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b17si15528228pgk.581.2018.12.19.04.44.31; Wed, 19 Dec 2018 04:44:47 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729252AbeLSLTZ (ORCPT + 99 others); Wed, 19 Dec 2018 06:19:25 -0500 Received: from mx2.suse.de ([195.135.220.15]:34608 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726652AbeLSLTZ (ORCPT ); Wed, 19 Dec 2018 06:19:25 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id F1FC3B0A5; Wed, 19 Dec 2018 11:19:22 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 049DB1E1463; Wed, 19 Dec 2018 12:19:22 +0100 (CET) Date: Wed, 19 Dec 2018 12:19:22 +0100 From: Jan Kara To: Dan Williams Cc: Jason Gunthorpe , Dave Chinner , Jan Kara , Jerome Glisse , John Hubbard , Matthew Wilcox , John Hubbard , Andrew Morton , Linux MM , tom@talpey.com, Al Viro , benve@cisco.com, Christoph Hellwig , Christopher Lameter , "Dalessandro, Dennis" , Doug Ledford , Michal Hocko , Mike Marciniszyn , rcampbell@nvidia.com, Linux Kernel Mailing List , linux-fsdevel Subject: Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions Message-ID: <20181219111921.GB18345@quack2.suse.cz> References: <20181208022445.GA7024@redhat.com> <20181210102846.GC29289@quack2.suse.cz> <20181212150319.GA3432@redhat.com> <20181212214641.GB29416@dastard> <20181214154321.GF8896@quack2.suse.cz> <20181216215819.GC10644@dastard> <20181218103306.GC18032@quack2.suse.cz> <20181218234254.GC31274@dastard> <20181219030329.GI21992@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 18-12-18 21:26:28, Dan Williams wrote: > On Tue, Dec 18, 2018 at 7:03 PM Jason Gunthorpe wrote: > > > > On Wed, Dec 19, 2018 at 10:42:54AM +1100, Dave Chinner wrote: > > > > > Essentially, what we are talking about is how to handle broken > > > hardware. I say we should just brun it with napalm and thermite > > > (i.e. taint the kernel with "unsupportable hardware") and force > > > wait_for_stable_page() to trigger when there are GUP mappings if > > > the underlying storage doesn't already require it. > > > > If you want to ban O_DIRECT/etc from writing to file backed pages, > > then just do it. > > > > Otherwise I'm not sure demanding some unrealistic HW design is > > reasonable. ie nvme drives are not likely to add page faulting to > > their IO path any time soon. > > > > A SW architecture that relies on page faulting is just not going to > > support real world block IO devices. > > > > GPUs and one RDMA are about the only things that can do this today, > > and they are basically irrelevant to O_DIRECT. > > Yes. > > I'm missing why a bounce buffer is needed. If writeback hits a > DMA-writable page why can't that path just turn around and trigger > another mkwrite notifcation on behalf of hardware that will never send > it? "Nice try writeback, this page is dirty again". You are conflating two things here. Bounce buffer (or a way to stop DMA from happening) is needed because think what happens when RAID5 computes its stripe checksum while someone modifies the data through DMA. Checksum mismatch and all fun arising from that. Notifying filesystem about the fact that the page didn't get cleaned by the writeback and still can be modified by the DMA is a different thing. Honza -- Jan Kara SUSE Labs, CR