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.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable 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 65183C10F05 for ; Wed, 20 Mar 2019 14:59:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 410E32184E for ; Wed, 20 Mar 2019 14:59:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728456AbfCTO7O (ORCPT ); Wed, 20 Mar 2019 10:59:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54522 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726487AbfCTO7O (ORCPT ); Wed, 20 Mar 2019 10:59:14 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6EB206698A; Wed, 20 Mar 2019 14:59:13 +0000 (UTC) Received: from redhat.com (ovpn-123-180.rdu2.redhat.com [10.10.123.180]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6C80A6CE59; Wed, 20 Mar 2019 14:59:04 +0000 (UTC) Date: Wed, 20 Mar 2019 10:59:02 -0400 From: Jerome Glisse To: William Kucharski Cc: John Hubbard , Dave Chinner , "Kirill A. Shutemov" , john.hubbard@gmail.com, Andrew Morton , Linux MM , Al Viro , Christian Benvenuti , Christoph Hellwig , Christopher Lameter , Dan Williams , Dennis Dalessandro , Doug Ledford , Ira Weiny , Jan Kara , Jason Gunthorpe , Matthew Wilcox , Michal Hocko , Mike Rapoport , Mike Marciniszyn , Ralph Campbell , Tom Talpey , LKML , linux-fsdevel@vger.kernel.org, Andrea Arcangeli Subject: Re: [PATCH v4 1/1] mm: introduce put_user_page*(), placeholder versions Message-ID: <20190320145901.GA3216@redhat.com> References: <20190319120417.yzormwjhaeuu7jpp@kshutemo-mobl1> <20190319134724.GB3437@redhat.com> <20190319141416.GA3879@redhat.com> <20190319212346.GA26298@dastard> <20190319220654.GC3096@redhat.com> <20190319235752.GB26298@dastard> <20190320000838.GA6364@redhat.com> <20190320043319.GA7431@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 20 Mar 2019 14:59:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 20, 2019 at 08:55:17AM -0600, William Kucharski wrote: > > > > On Mar 19, 2019, at 10:33 PM, Jerome Glisse wrote: > > > > So i believe best we could do is send a SIGBUS to the process that has > > GUPed a range of a file that is being truncated this would match what > > we do for CPU acces. There is no reason access through GUP should be > > handled any differently. > > This should be done lazily, as there's no need to send the SIGBUS unless > the GUPed page is actually accessed post-truncate. Issue is that unlike CPU access we might not be able to detect device access and thus it is not something we can do lazily for everyone. Cheers, Jérôme