From owner-freebsd-current@freebsd.org Wed Jun 27 16:47:54 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 181A2102C645 for ; Wed, 27 Jun 2018 16:47:54 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x236.google.com (mail-lf0-x236.google.com [IPv6:2a00:1450:4010:c07::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59AAE8597D; Wed, 27 Jun 2018 16:47:53 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x236.google.com with SMTP id a4-v6so2063023lff.5; Wed, 27 Jun 2018 09:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=91vUDIaS2seBYYXwfzS3lGRpmRtB5+QD2NLGtHKUce4=; b=RM4bLObw1R5LWVtfq7WyDKejYAod1yImopscSnyZtOghFs/Vy6tA8D4v7CEc4woxPj zrgcT2nkabw9BbOAc0mTPxbAapo90PvZQ0cllk/ud5xSR8Oy3OU1baKZltd/Es90mU2Y nPRoqh/Gt/IMuzhun/1c7XdqDC3NHdKwMEfpFp5r4G63dTR9r9TO8xSWfec0ytnOF/vt VgDVXdE049dL1klp6CwrKCqY862ENAc5Owx2f3tRsij2Ob9V7JxMHaqAVNVu8OCmgbdz PwANwvxWpP+FtcPK/JlKop2G8+mbUsS3nBfXlRf+uEBoJv0vyFErhdnkPxGcgRib5lL5 +0Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=91vUDIaS2seBYYXwfzS3lGRpmRtB5+QD2NLGtHKUce4=; b=qzjLiKoALa+1klauX4KhgKqaoGplg3l5c+xndX49n+sjgqm983PaWKsq61asp56Y71 4r96qJu7v4wsC0PRlzszh/MLR1rL5hoGVpdOgqM04mTGVteGGVF4Lvnn7px3HGjCdYNe Kb/zyQDSLDxr9MWml027KxQ7Hx1RYFE91Xw/VjPeckgRLKPTI9CExzsWfDS13/FeZFrm R5y2HQnevhRLmJPfMLMLyE5FvY4/rCo1fu7oU78QJEAvKrfKZyMBUrjxznLpG3VU/v5J KZK6kTWuPe7iObHael4euauo28CEVWK65G4Z420y582mP6Ya2UuVvXNteNt7dfdvf5J7 jx+A== X-Gm-Message-State: APt69E3/8IIWL3tiRB7Nc45tPEfLqF5Ho/i8ns2xRrqAfVRQgSLBlnO6 tOr77An2Y931J/Tm13iUruzHc/BJ8V0jBnTrobs= X-Google-Smtp-Source: AAOMgpdWO6YI/jrLnS3I32K4U+rkRVH3ssMCTyknYLJXTjgPSFzlM5cX+wXayVjqK8sOTYOojba6kgaXT+A0bmdWFdA= X-Received: by 2002:a19:385a:: with SMTP id d26-v6mr4996565lfj.47.1530118071491; Wed, 27 Jun 2018 09:47:51 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 2002:ab3:1b91:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 09:47:50 -0700 (PDT) In-Reply-To: <4d7957f6-9497-19ff-4dbb-436bb6b05a56@FreeBSD.org> References: <8ac353c5-d188-f432-aab1-86f4ca5fd295@FreeBSD.org> <4d7957f6-9497-19ff-4dbb-436bb6b05a56@FreeBSD.org> From: Alan Somers Date: Wed, 27 Jun 2018 10:47:50 -0600 X-Google-Sender-Auth: uCVjQOJuJlSuyZnCc6AXRRds9aQ Message-ID: Subject: Re: TSC calibration in virtual machines To: Jung-uk Kim Cc: Andriy Gapon , FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 16:47:54 -0000 On Wed, Jun 27, 2018 at 10:36 AM, Jung-uk Kim wrote: > On 06/27/2018 03:14, Andriy Gapon wrote: > > > > It seems that TSC calibration in virtual machines sometimes can do more > harm > > than good. Should we default to trusting the information provided by a > hypervisor? > > > > Specifically, I am observing a problem on GCE instances where calibrated > TSC > > frequency is about 10% lower than advertised frequency. And apparently > the > > advertised frequency is the right one. > > > > I found this thread with similar reports and a variety of workarounds > from > > administratively disabling the calibration to switching to a different > timecounter: > > https://lists.freebsd.org/pipermail/freebsd-cloud/2017- > January/000080.html > > We already do that for VMware hosts since r221214. > > https://svnweb.freebsd.org/changeset/base/221214 > > We should do the same for each hypervisor. > > Jung-uk Kim > > We probably should. But why does calibration fail in the first place? If it can fail in a VM, then it can probably fail on bare metal too. It would be worth investigating.