On Tue, May 06, 2014 at 10:43:22AM -0700, Linus Torvalds wrote: > On Tue, May 6, 2014 at 10:28 AM, Jerome Glisse <j.glisse@xxxxxxxxx> 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, Jérôme -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>