From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH v3 3/8] kvm: x86: mmu: Fast Page Fault path retries Date: Fri, 16 Dec 2016 21:13:13 +0800 Message-ID: <39de04e1-af5c-7c65-800c-bfb3295ba660@linux.intel.com> References: <1481071577-40250-4-git-send-email-junaids@google.com> <1948ea57-76c4-dfe1-bdd2-09dbf265747f@linux.intel.com> <10369248.Ox3tqWMzUc@js-desktop.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: kvm@vger.kernel.org, andreslc@google.com, pfeiner@google.com, pbonzini@redhat.com To: Junaid Shahid Return-path: Received: from mga05.intel.com ([192.55.52.43]:60619 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754718AbcLPNVr (ORCPT ); Fri, 16 Dec 2016 08:21:47 -0500 In-Reply-To: <10369248.Ox3tqWMzUc@js-desktop.mtv.corp.google.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/16/2016 07:36 AM, Junaid Shahid wrote: > > On Thursday, December 15, 2016 03:20:19 PM Xiao Guangrong wrote: > >> Why not include lockless_walk into the loop, retry 4 times for a invalid sp is expensive. > > Yes, we can move the page table walk inside the loop as well. But I’m sorry I don’t fully understand how an invalid sp will lead to retrying 4 times. Could you please elaborate a bit? Wouldn’t we break out of the loop in that case? Or do you mean the case when a huge page is getting broken down or built up? I mean the it is unlinked from the upper level page structure. > >> I am curious that did you see this retry is really helpful? :) > > No, I haven’t done a comparison with and without the retries since it seemed to be a fairly simple optimization. And it may not be straightforward to reliably reproduce the situation where it will help. So we are not sure if retry is really useful... After this change, all !W page fault can go to this fast path, i think it does not hurt the performance, but we'd better have a performance test.