From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerome Glisse Subject: Re: [RFC] Heterogeneous memory management (mirror process address space on a device mmu). Date: Tue, 6 May 2014 14:13:12 -0400 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-Transfer-Encoding: quoted-printable 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 , To: Linus Torvalds Return-path: Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Tue, May 06, 2014 at 10:43:22AM -0700, Linus Torvalds wrote: > On Tue, May 6, 2014 at 10:28 AM, Jerome Glisse wro= te: > > > > Also, just to be sure, are my changes to the radix tree otherwise > > acceptable at least in principle. >=20 > It looks like it adds several "loop over each page" cases just to > check whether each page might be on remote memory. >=20 > Which seems a complete waste of time 99.99% of the time. >=20 > But maybe I'm looking at the wrong patch. >=20 > 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 entr= ies it got out of the radix tree are not special one and because many place i= n 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 func= tions 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, J=E9r=F4me -- 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