From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752248AbbE0FS4 (ORCPT ); Wed, 27 May 2015 01:18:56 -0400 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:52506 "EHLO e23smtp05.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751129AbbE0FSz convert rfc822-to-8bit (ORCPT ); Wed, 27 May 2015 01:18:55 -0400 From: "Aneesh Kumar K.V" To: j.glisse@gmail.com, akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , joro@8bytes.org, Mel Gorman , "H. Peter Anvin" , Peter Zijlstra , Andrea Arcangeli , Johannes Weiner , Larry Woodman , Rik van Riel , Dave Airlie , Brendan Conoboy , Joe Donohue , Duncan Poole , Sherry Cheung , Subhash Gutti , John Hubbard , Mark Hairgrove , Lucien Dunning , Cameron Buschardt , Arvind Gopalakrishnan , Haggai Eran , Shachar Raindel , Liran Liss , Roland Dreier , Ben Sander , Greg Stoner , John Bridgman , Michael Mantor , Paul Blinzer , Laurent Morichetti , Alexander Deucher , Oded Gabbay , =?utf-8?B?SsOpcsO0bWU=?= Glisse Subject: Re: [PATCH 03/36] mmu_notifier: pass page pointer to mmu_notifier_invalidate_page() In-Reply-To: <1432236705-4209-4-git-send-email-j.glisse@gmail.com> References: <1432236705-4209-1-git-send-email-j.glisse@gmail.com> <1432236705-4209-4-git-send-email-j.glisse@gmail.com> User-Agent: Notmuch/0.19+103~g294bb6d (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Wed, 27 May 2015 10:47:44 +0530 Message-ID: <87wpzulhtz.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15052705-0017-0000-0000-0000014FE1B7 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org j.glisse@gmail.com writes: > From: Jérôme Glisse > > Listener of mm event might not have easy way to get the struct page > behind and address invalidated with mmu_notifier_invalidate_page() > function as this happens after the cpu page table have been clear/ > updated. This happens for instance if the listener is storing a dma > mapping inside its secondary page table. To avoid complex reverse > dma mapping lookup just pass along a pointer to the page being > invalidated. ..... > diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h > index ada3ed1..283ad26 100644 > --- a/include/linux/mmu_notifier.h > +++ b/include/linux/mmu_notifier.h > @@ -172,6 +172,7 @@ struct mmu_notifier_ops { > void (*invalidate_page)(struct mmu_notifier *mn, > struct mm_struct *mm, > unsigned long address, > + struct page *page, > enum mmu_event event); > How do we handle this w.r.t invalidate_range ? -aneesh