From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junaid Shahid Subject: Re: [PATCH v3 3/8] kvm: x86: mmu: Fast Page Fault path retries Date: Thu, 15 Dec 2016 15:36:48 -0800 Message-ID: <10369248.Ox3tqWMzUc@js-desktop.mtv.corp.google.com> References: <1481071577-40250-4-git-send-email-junaids@google.com> <1948ea57-76c4-dfe1-bdd2-09dbf265747f@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: kvm@vger.kernel.org, andreslc@google.com, pfeiner@google.com, pbonzini@redhat.com To: Xiao Guangrong Return-path: Received: from mail-pg0-f51.google.com ([74.125.83.51]:35657 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752342AbcLOXgu (ORCPT ); Thu, 15 Dec 2016 18:36:50 -0500 Received: by mail-pg0-f51.google.com with SMTP id p66so24996029pga.2 for ; Thu, 15 Dec 2016 15:36:50 -0800 (PST) In-Reply-To: <1948ea57-76c4-dfe1-bdd2-09dbf265747f@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thursday, December 15, 2016 03:20:19 PM Xiao Guangrong wrote: =20 > Why not include lockless_walk into the loop, retry 4 times for a inva= lid sp is expensive. Yes, we can move the page table walk inside the loop as well. But I=E2=80= =99m sorry I don=E2=80=99t fully understand how an invalid sp will lead= to retrying 4 times. Could you please elaborate a bit? Wouldn=E2=80=99= 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? =20 > I am curious that did you see this retry is really helpful? :) No, I haven=E2=80=99t done a comparison with and without the retries si= nce it seemed to be a fairly simple optimization. And it may not be str= aightforward to reliably reproduce the situation where it will help. Thanks, Junaid