From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v1 3/6] kvm/x86: Reorg stimer_expiration() to better control timer restart Date: Thu, 7 Jan 2016 17:34:54 +0100 Message-ID: <568E93AE.1050401@redhat.com> References: <1450870121-15943-1-git-send-email-asmetanin@virtuozzo.com> <1450870121-15943-4-git-send-email-asmetanin@virtuozzo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , Roman Kagan , "Denis V. Lunev" , qemu-devel@nongnu.org To: Andrey Smetanin , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:37825 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751515AbcAGQfA (ORCPT ); Thu, 7 Jan 2016 11:35:00 -0500 In-Reply-To: <1450870121-15943-4-git-send-email-asmetanin@virtuozzo.com> Sender: kvm-owner@vger.kernel.org List-ID: On 23/12/2015 12:28, Andrey Smetanin wrote: > - stimer_send_msg(stimer); > - if (!(stimer->config & HV_STIMER_PERIODIC)) > - stimer->config |= ~HV_STIMER_ENABLE; > - else > - stimer_start(stimer); > + stimer->msg_pending = true; > + if (!stimer_send_msg(stimer)) { > + stimer->msg_pending = false; > + if (!(stimer->config & HV_STIMER_PERIODIC)) > + stimer->config |= ~HV_STIMER_ENABLE; Just because this is curious: sure it shouldn't be "&="? Paolo > + }