Re: [PATCH] KVM: try __get_user_pages_fast even if not in atomic context

2018-08-06 Thread Andrea Arcangeli
Hello, On Mon, Aug 06, 2018 at 01:44:49PM +0200, Paolo Bonzini wrote: > On 06/08/2018 09:51, Xiao Guangrong wrote: > > > > > > On 07/27/2018 11:46 PM, Paolo Bonzini wrote: > >> We are currently cutting hva_to_pfn_fast short if we do not want an > >> immediate exit, which is represented by !async

Re: [PATCH] KVM: try __get_user_pages_fast even if not in atomic context

2018-08-06 Thread Paolo Bonzini
On 06/08/2018 09:51, Xiao Guangrong wrote: > > > On 07/27/2018 11:46 PM, Paolo Bonzini wrote: >> We are currently cutting hva_to_pfn_fast short if we do not want an >> immediate exit, which is represented by !async && !atomic.  However, >> this is unnecessary, and __get_user_pages_fast is *much*

Re: [PATCH] KVM: try __get_user_pages_fast even if not in atomic context

2018-08-06 Thread Xiao Guangrong
On 07/27/2018 11:46 PM, Paolo Bonzini wrote: We are currently cutting hva_to_pfn_fast short if we do not want an immediate exit, which is represented by !async && !atomic. However, this is unnecessary, and __get_user_pages_fast is *much* faster because the regular get_user_pages takes pmd_loc

Re: [PATCH] KVM: try __get_user_pages_fast even if not in atomic context

2018-07-30 Thread David Hildenbrand
On 27.07.2018 17:46, Paolo Bonzini wrote: > We are currently cutting hva_to_pfn_fast short if we do not want an > immediate exit, which is represented by !async && !atomic. However, > this is unnecessary, and __get_user_pages_fast is *much* faster > because the regular get_user_pages takes pmd_loc

[PATCH] KVM: try __get_user_pages_fast even if not in atomic context

2018-07-27 Thread Paolo Bonzini
We are currently cutting hva_to_pfn_fast short if we do not want an immediate exit, which is represented by !async && !atomic. However, this is unnecessary, and __get_user_pages_fast is *much* faster because the regular get_user_pages takes pmd_lock/pte_lock. In fact, when many CPUs take a nested