Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4697118imu; Tue, 18 Dec 2018 21:31:26 -0800 (PST) X-Google-Smtp-Source: AFSGD/VXPWIl0N9Olcl94FY54v7lJYPyJACCxLMkF63/Pu4qV8cCS5DGzpsSjjyTmRzoRaGcsdcG X-Received: by 2002:a62:c28e:: with SMTP id w14mr19257500pfk.115.1545197486521; Tue, 18 Dec 2018 21:31:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545197486; cv=none; d=google.com; s=arc-20160816; b=cganYBWbHNbD7l4Nylyhm3ZyjTS3eCkIlXU62vXC/ydnFCfC54MnwUfHIoly67dP8B MQiBTqGo5vvqWiqNOJ0oFCNNlC0LcmrK1x/MIeWlxUTSgSJCP3d+T5Mx7SKmINfgKdHo h2eCtJyf1T3h0ebvzhWNKx/R0mF1ksgAa/zjCDSkSmQ8QJcauZmrpjKY2ge40kxM5bx1 sWLEvUPyCwxgPKW4ijUa6YLUyEvKuhvKd9ekGlwBfGJNya+8c52twj9HKP4X1uWV9V1+ hIC/5fp/ZCSvsbDRTTtAGs3tImeFL0nvu8OjGn6hjNKuIvWrLIjxajZYbY932ZqXl2ar TJ+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=TjCpzgo0z2DvoSBkodr70hp1a2SwXaNqJ5VlPftliKI=; b=Ou0ndXWIs4B5sZUuMe4oklmsYyQ8af4VbjTSbXqfP5+GIg30+0wKgNrO8gp65dZTM7 JD9XzISBgR9RYQxQkXGdgDk71SxMg7xVLLCmrI0ouP0RtGXemKqcJWwhmFTusGvb3Hfa SihVCzs90Ijfaws4IT+zHZbqfxTiLamTZ0zU8zA89qWyYg2VZysTvhSf3Evh69X1zIMz Vv4EsPTqgZliXf0LTpla/OkRy16xWaM6HvxEdm0PQEieMcsuc5K/pyWziQf+Q3x/+kVR XgRmJuFNX8zlhAmdjEBQyZFpgjtad4ThnwHBfqYrptXU6LWWkvGJoARhamfiOXRUOS4T CpVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=UT1zFWSB; 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 b14si16052639pfc.156.2018.12.18.21.31.10; Tue, 18 Dec 2018 21:31:26 -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; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=UT1zFWSB; 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 S1727418AbeLSF0k (ORCPT + 99 others); Wed, 19 Dec 2018 00:26:40 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:46553 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726704AbeLSF0k (ORCPT ); Wed, 19 Dec 2018 00:26:40 -0500 Received: by mail-ot1-f67.google.com with SMTP id w25so17981083otm.13 for ; Tue, 18 Dec 2018 21:26:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TjCpzgo0z2DvoSBkodr70hp1a2SwXaNqJ5VlPftliKI=; b=UT1zFWSB/8a1hvGdQWTWn1vteMr6dk2GiubywndLJfutScDJni4yE5HOvEHC1YUMPa XOCL8XACp6eBCtMQMzH/AWR2nBJiHiwA7fys5zwFoViTxsP9Syhdo7YeDqa6DqsNS4St gDoQTs6EX7ilit3LllSme80dxoU677rSicRAdc65Z9PxIK4cHWxuxkPrF1uXaBBcWfOK 8Xb9mh0arbZhx9AsCQbAe/GiKEJrOVgVnzekfAbgH0TFNTKkoq3uXd7nDF9iF11Vwqmv jExsixD/y2BMLou0YK3skXl9NqrU0CpdiBO9kzvywrVDD0lzzzljdUKxMIytUrCm781D vxRQ== 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=TjCpzgo0z2DvoSBkodr70hp1a2SwXaNqJ5VlPftliKI=; b=aMx1lU6BAwJiyfWgy6HkymhVmVM+EIN2oD5lJaeDQJsZOTVwopmbBmUXk2dacHf0ES iyFTMA9ylXZVXrZhgPRAhiE536fOWuW1215AL7GGRIUWtI9AR0k2bZduaVfAnuyA2xMS 5i6P+ONaq0tvm2EifhmNo3CMPVpVkdgIXCJe1ZU0WKHC2lHZI7CCIcocutLxYVRt7S/N qcnA4+qbk4Qn5rAWmR7dE5LkXtzUtdzTJiB1nTPRz6J0bHZQTjFleZeEyKCIG5A0/PaW zymBm1J8xp8V/8piIkysGtkHmggYlxisPEDw6HkVa5dqg/HiDrfOpR6Tu+i6Nz79niQ/ 7hnA== X-Gm-Message-State: AA+aEWZQS+bejVrBDHtBFcFwrCZC0AMQM1zL1cCxGeu3Bc+OV+vnxe94 GauvbrSHqJZJv2CpA7vHqc5WC0QTO1ZkF+itTe16Pw== X-Received: by 2002:a9d:394:: with SMTP id f20mr3647750otf.98.1545197199005; Tue, 18 Dec 2018 21:26:39 -0800 (PST) MIME-Version: 1.0 References: <20181207191620.GD3293@redhat.com> <3c4d46c0-aced-f96f-1bf3-725d02f11b60@nvidia.com> <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> In-Reply-To: <20181219030329.GI21992@ziepe.ca> From: Dan Williams Date: Tue, 18 Dec 2018 21:26:28 -0800 Message-ID: Subject: Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions To: Jason Gunthorpe Cc: 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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".