From: Andrew Morton Subject: Re: [PATCH 28/83] mm: Change timing of notification to IOMMUs about a page to be invalidated Date: Thu, 10 Jul 2014 15:15:51 -0700 Message-ID: <20140710151551.55646da50617fe9997e2830c@linux-foundation.org> References: <1405029208-6703-1-git-send-email-oded.gabbay@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) by gabe.freedesktop.org (Postfix) with ESMTP id 54BEC6E3C0 for ; Thu, 10 Jul 2014 15:15:53 -0700 (PDT) In-Reply-To: <1405029208-6703-1-git-send-email-oded.gabbay@amd.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Oded Gabbay Cc: Andrew Lewycky , Hugh Dickins , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Jianyu Zhan , linux-mm , =?ISO-8859-1?Q?J=E9r=F4me?= Glisse , Alex Deucher , Naoya Horiguchi , Cyrill Gorcunov , Joonsoo Kim , "Kirill A. Shutemov" List-Id: dri-devel@lists.freedesktop.org On Fri, 11 Jul 2014 00:53:26 +0300 Oded Gabbay wrote: > From: Andrew Lewycky > > This patch changes the location of the mmu_notifier_invalidate_page function > call inside try_to_unmap_one. The mmu_notifier_invalidate_page function > call tells the IOMMU that a pgae should be invalidated. > > The location is changed from after releasing the physical page to > before releasing the physical page. > > This change should prevent the bug that would occur in the > (rare) case where the GPU attempts to access a page while the CPU > attempts to swap out that page (or discard it if it is not dirty). um OK, but what is the effect on all the other mmu_notifier_ops.invalidate_page() implementations? Please spell this out in full detail within the changelog and be sure to cc the affected maintainers.