From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by kanga.kvack.org (Postfix) with ESMTP id 73E4D6B0035 for ; Wed, 7 May 2014 03:16:03 -0400 (EDT) Received: by mail-ve0-f179.google.com with SMTP id oy12so722857veb.24 for ; Wed, 07 May 2014 00:16:03 -0700 (PDT) Received: from gate.crashing.org (gate.crashing.org. [63.228.1.57]) by mx.google.com with ESMTPS id uv3si2454709vdc.203.2014.05.07.00.16.01 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 07 May 2014 00:16:01 -0700 (PDT) Message-ID: <1399446892.4161.34.camel@pasglop> Subject: Re: [RFC] Heterogeneous memory management (mirror process address space on a device mmu). From: Benjamin Herrenschmidt Date: Wed, 07 May 2014 17:14:52 +1000 In-Reply-To: <20140506161836.GC6731@gmail.com> References: <1399038730-25641-1-git-send-email-j.glisse@gmail.com> <20140506102925.GD11096@twins.programming.kicks-ass.net> <20140506150014.GA6731@gmail.com> <20140506153315.GB6731@gmail.com> <20140506161836.GC6731@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Jerome Glisse Cc: Linus Torvalds , Peter Zijlstra , linux-mm , Linux Kernel Mailing List , linux-fsdevel , Mel Gorman , "H. Peter Anvin" , Andrew Morton , Linda Wang , Kevin E Martin , Jerome Glisse , Andrea Arcangeli , Johannes Weiner , Larry Woodman , Rik van Riel , Dave Airlie , Jeff Law , Brendan Conoboy , Joe Donohue , Duncan Poole , Sherry Cheung , Subhash Gutti , John Hubbard , Mark Hairgrove , Lucien Dunning , Cameron Buschardt , Arvind Gopalakrishnan , Haggai Eran , Or Gerlitz , Sagi Grimberg , Shachar Raindel , Liran Liss , Roland Dreier , "Sander, Ben" , "Stoner, Greg" , "Bridgman, John" , "Mantor, Michael" , "Blinzer, Paul" , "Morichetti, Laurent" , "Deucher, Alexander" , "Gabbay, Oded" , Davidlohr Bueso On Tue, 2014-05-06 at 12:18 -0400, Jerome Glisse wrote: > > I do understand that i was pointing out that if i move to, tlb which i > am fine with, i will still need to sleep there. That's all i wanted to > stress, i did not wanted force using mmu_notifier, i am fine with them > becoming atomic as long as i have a place where i can intercept cpu > page table update and propagate them to device mmu. Your MMU notifier can maintain a map of "dirty" PTEs and you do the actual synchronization in the subsequent flush_tlb_* , you need to add hooks there but it's much less painful than in the notifiers. *However* Linus, even then we can't sleep. We do things like ptep_clear_flush() that need the PTL and have the synchronous flush semantics. Sure, today we wait, possibly for a long time, with IPIs, but we do not sleep. Jerome would have to operate within a similar context. No sleep for you :) Cheers, Ben. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org