From owner-freebsd-virtualization@FreeBSD.ORG Thu Jun 11 11:49:08 2015 Return-Path: Delivered-To: freebsd-virtualization@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 0C7C5ACE for ; Thu, 11 Jun 2015 11:49:08 +0000 (UTC) (envelope-from stefan.andritoiu@gmail.com) Received: from mail-ob0-x244.google.com (mail-ob0-x244.google.com [IPv6:2607:f8b0:4003:c01::244]) (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 C6C151FB5 for ; Thu, 11 Jun 2015 11:49:07 +0000 (UTC) (envelope-from stefan.andritoiu@gmail.com) Received: by obcwm4 with SMTP id wm4so418848obc.3 for ; Thu, 11 Jun 2015 04:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=CjJaGwNQv6r9NETt1pUlK7GC41Nd0LlkJsgNojaK5qk=; b=S5N7+nbOcql+lj3MawruCyJVvZJ7ekWia8E2XKlgvGUC8DU1iv0/8A7JrDJmfeUMDC V9tb2Kd/xDJC7A7wL0ufEZagI6TIQNH2eIzRIcJ/F91BwMYxTBr85oswFwE4yqUFPzrG Q2Aa+tlSEz9zTgygfpxhb3JLfM7lGN1DA2XW/H/fa5j1ogyAt/7wfVDTIWpdMdFiMtO+ R1VJy9fOWZoGviHra5iOqL7OSx3jqWjvqyYp5Uiqt0nLdpiCkuV9ChhHKLyZBhgFuzfk GeyaXkAetUhE2tZtxsMETM18w8GgACIcHUfK3LJHsEDnIEA9kdyDJ/0q/59mjMzKA5lf 2Gsg== MIME-Version: 1.0 X-Received: by 10.60.155.97 with SMTP id vv1mr7513585oeb.15.1434023347200; Thu, 11 Jun 2015 04:49:07 -0700 (PDT) Received: by 10.60.82.168 with HTTP; Thu, 11 Jun 2015 04:49:07 -0700 (PDT) In-Reply-To: <5579555D.5060002@citrix.com> References: <5579555D.5060002@citrix.com> Date: Thu, 11 Jun 2015 14:49:07 +0300 Message-ID: Subject: Re: Lock Holder Preemption on bhyve From: Stefan Andritoiu To: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Cc: freebsd-virtualization@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 11:49:08 -0000 Hi Roger Thank you for the links, I have been looking for more information on Paravirtualized ticket spinlocks for a later project. I know how Xen handles LHP, but it does so through what are called "invasive methods", that modify the guest. For now, my work focuses on a non-invasive methods in which the guest is not aware that it is a guest. In hopes to offer a solution to LHP, regardless of the guest OS. Thank you, Stefan On Thu, Jun 11, 2015 at 12:31 PM, Roger Pau Monn=C3=A9 wrote: > Hello, > > El 06/06/15 a les 0.59, Stefan Andritoiu ha escrit: >> Hello everyone, >> >> My name is Stefan Andritoiu and I'm currently studying Computer >> Science in my 4th year at the University POLITEHNICA of Bucharest. >> I'm fairly new to the FreeBSD operating system, having only a >> background in Linux. For the past few months I've been investigating >> the problem of Lock Holder Preemption on bhyve, how other hypervisors >> deal with this problem and a possible implementation of these >> solutions on bhyve. >> I am currently working on implementing Gang Scheduling on FreeBSD to >> test if it is a viable solution. I also plan to continue my work, by >> implementing and testing other techniques of avoiding overhead caused >> by lock holder preemption, and comparing their results. > > FWIW, Xen doesn't do gang-scheduling, so the lock-holder preemption > problem is solved inside of the guest by using > pvspinlocks/pvticketlocks. Not to detriment the work you are doing on > gang-scheduling, but having some like this would help FreeBSD when > running in all virtualized environments regardless of whether the > underlying hypervisor does gang-scheduling or not. Some more information > about it: > > https://blog.xenproject.org/2012/05/11/benchmarking-the-new-pv-ticketlock= -implementation/ > http://www-archive.xenproject.org/files/xensummitboston08/LHP.pdf > https://lwn.net/Articles/556141/ > > Roger.