Re: [PATCH 4/4] KVM: arm64: Don't retrieve memory slot again in page fault handler

2021-03-15 Thread Keqian Zhu
Hi Gavin, On 2021/3/15 17:56, Gavin Shan wrote: > Hi Keqian, > > On 3/15/21 7:25 PM, Keqian Zhu wrote: >> On 2021/3/15 12:18, Gavin Shan wrote: >>> We needn't retrieve the memory slot again in user_mem_abort() because >>> the corresponding memory slot has been passed from the caller. This >> I

Re: [PATCH 4/4] KVM: arm64: Don't retrieve memory slot again in page fault handler

2021-03-15 Thread Gavin Shan
Hi Keqian, On 3/15/21 7:25 PM, Keqian Zhu wrote: On 2021/3/15 12:18, Gavin Shan wrote: We needn't retrieve the memory slot again in user_mem_abort() because the corresponding memory slot has been passed from the caller. This I think you are right, though fault_ipa will be adjusted when we try

Re: [PATCH 4/4] KVM: arm64: Don't retrieve memory slot again in page fault handler

2021-03-15 Thread Keqian Zhu
Hi Gavin, On 2021/3/15 12:18, Gavin Shan wrote: > We needn't retrieve the memory slot again in user_mem_abort() because > the corresponding memory slot has been passed from the caller. This I think you are right, though fault_ipa will be adjusted when we try to use block mapping, the

[PATCH 4/4] KVM: arm64: Don't retrieve memory slot again in page fault handler

2021-03-14 Thread Gavin Shan
We needn't retrieve the memory slot again in user_mem_abort() because the corresponding memory slot has been passed from the caller. This would save some CPU cycles. For example, the time used to write 1GB memory, which is backed by 2MB hugetlb pages and write-protected, is dropped by 6.8% from