From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qc0-f170.google.com (mail-qc0-f170.google.com [209.85.216.170]) by kanga.kvack.org (Postfix) with ESMTP id 9B27C6B005A for ; Tue, 6 May 2014 14:13:20 -0400 (EDT) Received: by mail-qc0-f170.google.com with SMTP id i8so3205567qcq.1 for ; Tue, 06 May 2014 11:13:20 -0700 (PDT) Received: from mail-qg0-x22f.google.com (mail-qg0-x22f.google.com [2607:f8b0:400d:c04::22f]) by mx.google.com with ESMTPS id x1si5539136qal.50.2014.05.06.11.13.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 May 2014 11:13:20 -0700 (PDT) Received: by mail-qg0-f47.google.com with SMTP id j107so2618876qga.6 for ; Tue, 06 May 2014 11:13:19 -0700 (PDT) Date: Tue, 6 May 2014 14:13:12 -0400 From: Jerome Glisse Subject: Re: [RFC] Heterogeneous memory management (mirror process address space on a device mmu). Message-ID: <20140506181308.GG6731@gmail.com> References: <20140506102925.GD11096@twins.programming.kicks-ass.net> <20140506150014.GA6731@gmail.com> <20140506153315.GB6731@gmail.com> <20140506161836.GC6731@gmail.com> <20140506172853.GF6731@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Linus Torvalds Cc: 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, May 06, 2014 at 10:43:22AM -0700, Linus Torvalds wrote: > On Tue, May 6, 2014 at 10:28 AM, Jerome Glisse wrote: > > > > Also, just to be sure, are my changes to the radix tree otherwise > > acceptable at least in principle. > > It looks like it adds several "loop over each page" cases just to > check whether each page might be on remote memory. > > Which seems a complete waste of time 99.99% of the time. > > But maybe I'm looking at the wrong patch. > > Linus It is patch 8 for core changes and patch 9 to demonstrate per fs changes. So yes each place that does radix tree lookup need to check that the entries it got out of the radix tree are not special one and because many place in the code gang lookup with pagevec_lookup there is need to go over entries that were looked up to take appropriate action. Other design is to do migration inside the various radix tree lookup functions but that means going out of rcu section and possibly sleeping waiting for the GPU to copy back things into system memory. I could grow the radix function to return some bool to avoid looping over for case where there is no special entry. Cheers, Jerome -- 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