]> err.no Git - linux-2.6/commit
lguest: use get_user_pages_fast() instead of get_user_pages()
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 12 Aug 2008 22:52:53 +0000 (17:52 -0500)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 12 Aug 2008 07:52:53 +0000 (17:52 +1000)
commit71a3f4edc11b9dd7af28d003acbbd33496003da1
treeb727812682ca9f30169496a30a1e51620f53c7c9
parent912985dce45ef18fcdd9f5439fef054e0e22302a
lguest: use get_user_pages_fast() instead of get_user_pages()

Using a simple page table thrashing program I measure a slight
improvement.  The program creates five processes.  Each touches 1000
pages then schedules the next process.  We repeat this 1000 times.  As
lguest only caches 4 cr3 values, this rebuilds a lot of shadow page
tables requiring virt->phys mappings.

Before: 5.93 seconds
After: 5.40 seconds

(Counts of slow vs fastpath in this usage are 6092 and 2852462 respectively.)

And more importantly for lguest, the code is simpler.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/lguest/page_tables.c