From: David Hildenbrand Subject: Re: [RFC][Patch v8 0/7] KVM: Guest Free Page Hinting Date: Mon, 18 Feb 2019 17:59:06 +0100 Message-ID: <44740a29-bb14-e6e6-2992-98d0ae58e994@redhat.com> References: <20190204201854.2328-1-nitesh@redhat.com> <20190218114601-mutt-send-email-mst@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Nitesh Narayan Lal , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com, lcapitulino@redhat.com, pagupta@redhat.com, wei.w.wang@intel.com, yang.zhang.wz@gmail.com, riel@surriel.com, dodgen@google.com, konrad.wilk@oracle.com, dhildenb@redhat.com, aarcange@redhat.com, Alexander Duyck To: "Michael S. Tsirkin" Return-path: In-Reply-To: <20190218114601-mutt-send-email-mst@kernel.org> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 18.02.19 17:49, Michael S. Tsirkin wrote: > On Sat, Feb 16, 2019 at 10:40:15AM +0100, David Hildenbrand wrote: >> It would be worth a try. My feeling is that a synchronous report after >> e.g. 512 frees should be acceptable, as it seems to be acceptable on >> s390x. (basically always enabled, nobody complains). > > What slips under the radar on an arch like s390 might > raise issues for a popular arch like x86. My fear would be > if it's only a problem e.g. for realtime. Then you get > a condition that's very hard to trigger and affects > worst case latencies. Realtime should never use free page hinting. Just like it should never use ballooning. Just like it should pin all pages in the hypervisor. > > But really what business has something that is supposedly > an optimization blocking a VCPU? We are just freeing up > lots of memory why is it a good idea to slow that > process down? I first want to know that it is a problem before we declare it a problem. I provided an example (s390x) where it does not seem to be a problem. One hypercall ~every 512 frees. As simple as it can get. No trying to deny that it could be a problem on x86, but then I assume it is only a problem in specific setups. I would much rather prefer a simple solution that can eventually be disabled in selected setup than a complicated solution that tries to fit all possible setups. Realtime is one of the examples where such stuff is to be disabled either way. Optimization of space comes with a price (here: execution time). -- Thanks, David / dhildenb