Change vma_list_mutex from mutex to rwlock

vma_list_mutex protects both vma_list and all page table modifications
It means that only one thread at a time can serve a page fault, others
will sleep on the mutex. Our pte instantiation code is mostly written
with lockless instantiation in mind, so if not for the mutex we could
allow page faults to proceed in parallel. By changing vma_list_mutex
mutex to rwlock and taking it for "read" in a page fault handler (since
it does not modify vma_list) we can allow more then one page faults to
proceed simultaneously. All other operation that either cannot modify
page table locklessly or modify vma_list have to take the lock for "write"

This patch ties up a couple of loose ends in lockless pte instantiation,
change vma_list_mutex into rwlock and adds write page cache lock
(previously write page cache was protected by vma_list_mutex, but it no
longer is).

Signed-off-by: Gleb Natapov <gleb@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Drop write_lock while retrieving ARC buffer

ZFS code may sleep if data the page cache is asking for is not present
in memory. Sleeping while holding a lock will prevent other threads from
processing page fault. This patch drops write_lock while calling into
ZFS, but after lock is acquired back we need to recheck that page was
not instantiated in a write cache. If it was write page cache needs to
be mapped instead of ARC cache. The patch achieves that by returning
to a faulting thread without mapping anything at which point fault is
retried and write cache page is mapped.

Signed-off-by: Gleb Natapov <gleb@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>