lguest: restore boot speed
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 16 Dec 2010 23:03:15 +0000 (17:03 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 16 Dec 2010 06:33:15 +0000 (17:03 +1030)
commitbb4093deb259ea9c92415796a6a139e35272f8a8
tree806e7be7f7194d91e9135bc2f6af64a5ca2fdd7b
parentbb6f1d9a99f1947d91693de62ed54ac3bf1e2dfe
lguest: restore boot speed

lguest is dumb and drops *all* the pagetables for set_pte (which is
only used for kernel mapping manipulation, so it's OK without highmem).

But it's used a lot in boot, too.  As a guest optimization, we
suppressed this flushing until the first page switch.  Now we have
initial_page_table, that happens much earlier, so extend the heuristic
to wait until we switch to something other than the swapper_pg_dir or
initial_page_table.

As measured on my laptop under kvm, this dropped the time-to-mount-root
from 48 seconds to 4.3 seconds.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
arch/x86/lguest/boot.c