From owner-freebsd-current@FreeBSD.ORG Sun Jan 4 19:00:52 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 396373E8; Sun, 4 Jan 2015 19:00:52 +0000 (UTC) Received: from mail-wg0-x22e.google.com (mail-wg0-x22e.google.com [IPv6:2a00:1450:400c:c00::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C0038BFF; Sun, 4 Jan 2015 19:00:51 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id x13so26400090wgg.5; Sun, 04 Jan 2015 11:00:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=r9Jjxl4IBQeMusxhS2QvouJHSLOShUwuWSjeAieLjpU=; b=Q91lWExQMe09Vzn7uL1vG9IIv9noofo4QyylXYARcuzsC9COj6kqZhBcJKghg1Uti8 vkXmS9A+nleU4fw0ZBenH6FyhGtzCUpfOXNH2oo+uO0qDlqu5e190JvqgE3rYvwsvPht dzeOx5nxm+xJVwwvmB52WPp10U+0mMpj1dltPCfnVtFFoirjg9hbVyXp070IXJZnvZG3 Qsh6i9r1XUsXHcl8iScYKeOfVAM5aAX+cWnv+Uo7aiEvSJuKbplx86Vvi17qSyezUZ2R y2XkIYKwsMLYAkgXERuhLTJE2XID5eBuZslFpXioqXH5VR7SUKyM9OKbhmLJjt32heiF E/YQ== MIME-Version: 1.0 X-Received: by 10.180.14.136 with SMTP id p8mr18159102wic.20.1420398050052; Sun, 04 Jan 2015 11:00:50 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Sun, 4 Jan 2015 11:00:49 -0800 (PST) In-Reply-To: References: Date: Sun, 4 Jan 2015 11:00:49 -0800 X-Google-Sender-Auth: SmBt7x2ob9AwSZZGjIXV4ldzyeA Message-ID: Subject: Re: [CFT] Paravirtualized KVM clock From: Adrian Chadd To: Bryan Venteicher Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD-current , "freebsd-arch@freebsd.org" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 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: Sun, 04 Jan 2015 19:00:52 -0000 ... so, out of pure curiousity - what's making the benchmark go faster? Is it userland side of things calling clock methods, or something in the kernel, or both? -adrian On 4 January 2015 at 09:56, Bryan Venteicher wrote: > For the last few weeks, I've been working on adding support for KVM clock > in the projects/paravirt branch. Currently, a KVM VM guest will end up > selecting either the HPET or ACPI as the timecounter source. Unfortunately, > this is very costly since every timecounter fetch causes a VM exit. KVM > clock allows the guest to use the TSC instead; it is very similar to the > existing Xen timer. > > The performance difference between HPET/ACPI and KVMCLOCK can be dramatic: > a simple disk benchmark goes from 10K IOPs to 100K IOPs. > > The patch is attached is attached or available at [1]. I'd appreciate any > testing. > > Also as a part of this, I've tried to generalized a bit of our existing > hypervisor guest code, with the eventual goal of being able to support more > invasive PV operations. The patch series is viewable in Phabricator. > > https://reviews.freebsd.org/D1429 - paravirt: Generalize parts of the XEN > timer code into pvclock > https://reviews.freebsd.org/D1430 - paravirt: Add interface to calculate > the TSC frequency from pvclock > https://reviews.freebsd.org/D1431 - paravirt: Add simple hypervisor > registration and detection interface > https://reviews.freebsd.org/D1432 - paravirt: Add detection of bhyve using > new hypervisor interface > https://reviews.freebsd.org/D1433 - paravirt: Add detection of VMware using > new hypervisor interface > https://reviews.freebsd.org/D1434 - paravirt: Add detection of KVM using > new hypervisor interface > https://reviews.freebsd.org/D1435 - paravirt: Add KVM clock timecounter > support > > My current plan is to MFC this series to 10-STABLE, and commit a > self-contained KVM clock to the other stable branches. > > [1] - https://people.freebsd.org/~bryanv/patches/kvm_clock-1.patch > > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"