Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3905081ybe; Mon, 16 Sep 2019 03:25:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxA1Z4leFJpNCbGw5C2sL3qVXxFtdk4ZxY2Jc7lo3dOdvYPpkCKLYu0O/PoFAyXIP3oSR+P X-Received: by 2002:a17:906:5644:: with SMTP id v4mr1722571ejr.52.1568629514970; Mon, 16 Sep 2019 03:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568629514; cv=none; d=google.com; s=arc-20160816; b=RyrM3HkjpJrU1meuKp4iZzPympIVRbx9tIXD2Y0i0SZEgSlhFsqZ/wKiwOt2EyLwYN 0GsvtggpPWEyrK5FvC0FrqjOCLi/VUp2TfQ7f6VJ2+pnRi4Yn3PMxyWKapxAqSYtTgI4 4TKdebKz92BOmuLrowR0ay3UxrLsyr7R5WRRszUT3vgvJGbcJ3G2yNI5j1ypP3dbbDgA 3Za91xwxg/jOXJTLwJnfhUZTLj6AMVdpircYPerOceV1kGCNG1+BtBohj2JwnNARW8PN hahd4UriIxJ06v0pwcixzpOVhc3ZNqRZaA/xusK29Dt7f4SM0TucCaOwtWt/+zkyWMXO GBPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6c0nZaBPyfxRJBP1x7CxvAJ/ZjmFhBQPaFGw/S18y7Q=; b=mwB7C8NchLPMwhmQMhL1TibDfIBYJSKPkkvW/hY7V1vre9zHXmRdEERis0hdckneEj OeTECuWVhag30+UHPq9WabI2xCSoPIgVIpXBHP5XZh7HStGqYB3GrZOC3uC6QOPy8Fk9 8RtO2ZkXC2JR+JxMoquzuvsxFZxyBRzth6S1JCuIe0QUPWxvnLHaP1UEYTq8+5VIZQO1 dAK4UOx68gdkpzZ4Cu3rJoG5rxrx88GdUmCcqQcaGIsvzWwOOHrGAqiZYYq+qS7mBfgW x4lsjmBbnPO/GWVvHoO0uluuGjD8nRRYtfNdbJ5AihiSzuiLJhdbxiTO3t9bTTnDJJxB bwhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PdN+yvh+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7si19081512ejz.17.2019.09.16.03.24.50; Mon, 16 Sep 2019 03:25:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PdN+yvh+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730878AbfIPIKI (ORCPT + 99 others); Mon, 16 Sep 2019 04:10:08 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:46933 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725951AbfIPIKH (ORCPT ); Mon, 16 Sep 2019 04:10:07 -0400 Received: by mail-ot1-f66.google.com with SMTP id g19so34740640otg.13; Mon, 16 Sep 2019 01:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6c0nZaBPyfxRJBP1x7CxvAJ/ZjmFhBQPaFGw/S18y7Q=; b=PdN+yvh+WkL6iTNeSqdLkEMFCZuiZNphjnxqHzIDG1WPT6d+7zDv5reX301C2lGIt9 yk9R1E+caTso+dcazIzGIBL7KBjoY+5UPkQC8tTJgIL41qrJxTHIvj78+yUfiUwZjPVR sUZ/lhzI5IB72qOAexg+ij1CHYmnRHiwRFCtGheXfb9HYwWbWjjFHN6tqHGKX6fwylIM A1QjtFgIhufwSpa2X6MjxZj80eM2BzRZ1AypvIF+Qdxk61/cMJjjeD3jkP8JZjq5Drfm xFg9sc68AVSQWQNakBToufjyZnAjDuCiFVtCCQX6WBxQCb/yFdoeLFr4WCjxAWyHMD59 y7+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6c0nZaBPyfxRJBP1x7CxvAJ/ZjmFhBQPaFGw/S18y7Q=; b=UkKM97CCpQkmU014ydr0n2A3gBA3fhle50cDALd+SgEQlVc7p04yMiL619sQLAApwk Pg8OFrLFKAVqz53pc+SRNDC/nNE/ZevZxyG+4EkEiX+c4b6oqxBjfhHp+3fgKUpdPFVt NSLLX/1g2toE9ZqQJZJcXbtWWapWp7UO2JWgrIV03NlUZjz4vVsk/ZVq6h6yG0HbxuR3 Pt5ICuWyCqTZrj0ztH0XgXCcmLLLIa7ky2XknkzKdnVols5374IV0RX62y0V405Lsc+s 0vU1/ishNFGDLPypP6600FYqjr4OcodMiVGDA6RtVritR+UqxcUMqpi6v1sxpxCpl4MX aSEw== X-Gm-Message-State: APjAAAXXREyo1sM3tjCuw2GJKuDo/3AQRDydcNS6M8dSsuMycg+Qqjlk jLvlPAFJICVvaB/9VogxJM7BU0TMIrm0ASgaoWU= X-Received: by 2002:a9d:aa8:: with SMTP id 37mr49055047otq.56.1568621406942; Mon, 16 Sep 2019 01:10:06 -0700 (PDT) MIME-Version: 1.0 References: <1566980342-22045-1-git-send-email-wanpengli@tencent.com> <8054e73d-1e09-0f98-4beb-3caa501f2ac7@redhat.com> <82ff90b6-f518-e2a8-c4f5-ef4b294af15e@redhat.com> In-Reply-To: <82ff90b6-f518-e2a8-c4f5-ef4b294af15e@redhat.com> From: Wanpeng Li Date: Mon, 16 Sep 2019 16:09:55 +0800 Message-ID: Subject: Re: [PATCH v3 1/2] KVM: LAPIC: Tune lapic_timer_advance_ns smoothly To: Paolo Bonzini Cc: Wanpeng Li , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 Sep 2019 at 15:49, Paolo Bonzini wrote: > > On 16/09/19 06:02, Wanpeng Li wrote: > > Hi Paolo, > > > > Something like below? It still fluctuate when running complex guest os > > like linux. Removing timer_advance_adjust_done will hinder introduce > > patch v3 2/2 since there is no adjust done flag in each round > > evaluation. > > That's not important, since the adjustment would be continuous. > > How much fluctuation can you see? After I add a trace_printk to observe more closely, the adjustment is continuous as expected. > > > I have two questions here, best-effort tune always as > > below or periodically revaluate to get conservative value and get > > best-effort value in each round evaluation as patch v3 2/2, which one > > do you prefer? The former one can wast time to wait sometimes and the > > later one can not get the best latency. In addition, can the adaptive > > tune algorithm be using in all the scenarios contain > > RT/over-subscribe? > > I prefer the former, like the patch below, mostly because of the extra > complexity of the periodic reevaluation. How about question two? Wanpeng