From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946836AbcBRQNf (ORCPT ); Thu, 18 Feb 2016 11:13:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39466 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946808AbcBRQNd (ORCPT ); Thu, 18 Feb 2016 11:13:33 -0500 Subject: Re: [PATCH v2 01/14] KVM: x86: change PIT discard tick policy To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org References: <1455736496-374-1-git-send-email-rkrcmar@redhat.com> <1455736496-374-2-git-send-email-rkrcmar@redhat.com> Cc: kvm@vger.kernel.org, Yuki Shibuya , Rik van Riel From: Paolo Bonzini Message-ID: <56C5EDA9.9030204@redhat.com> Date: Thu, 18 Feb 2016 17:13:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <1455736496-374-2-git-send-email-rkrcmar@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/02/2016 20:14, Radim Krčmář wrote: > Discard policy uses ack_notifiers to prevent injection of PIT interrupts > before EOI from the last one. > > This patch changes the policy to always try to deliver the interrupt, > which makes a difference when its vector is in ISR. > Old implementation would drop the interrupt, but proposed one injects to > IRR, like real hardware would. This seems like what libvirt calls the "merge" policy: Merge the missed tick(s) into one tick and inject. The guest time may be delayed, depending on how the OS reacts to the merging of ticks where the merged tick is the one placed into IRR. Unlike discard, "merge" can starve the guest through an interrupt storm. Rik, I think you originally worked on the missed tick policies in Xen. Is the above correct? If so, do you recall what would be the reason to use the merge policy instead of the discard policy? Paolo