From owner-freebsd-current@FreeBSD.ORG Mon Jan 3 15:36:42 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C3EB106566B for ; Mon, 3 Jan 2011 15:36:42 +0000 (UTC) (envelope-from hasegaw@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5959E8FC08 for ; Mon, 3 Jan 2011 15:36:42 +0000 (UTC) Received: by gxk8 with SMTP id 8so5625362gxk.13 for ; Mon, 03 Jan 2011 07:36:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=yjusnV8O1I68LHYW3jtCuWX7a93wobByf32+8D2/tZ4=; b=ABw4sYM8Bc10T0spt2HNbbo++HpWSTWzV/Zn0YuDVNRaO10oJzYdDB1gSi9EcZQjHo RHhkxkKh0vuA3E5FlFi7P3+WtzhtL3jGs/k/5pqqwcUXmudtxnD/hVa3NIk8fPkLK+/J 5S1FBSeiZ4c4Pgz4gWWFSXw3wajaaEOB0mJgU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=WhDaPIL063lN19o82ZlQwEdWu0wmhr1b5FxLk4QPkkswc+3cx3XGtcKHz6Mo04zNbh JcqgB1njaus1Urm6PT2qHL0QZ4GC6M/t8tUZRm+0JTFl3ESWFhzIKp761DBTAYUf4hRs qtM96q1lHYy1mSNIR7HpOSQzVLZz2WCPRujYw= MIME-Version: 1.0 Received: by 10.90.32.19 with SMTP id f19mr12587969agf.138.1294067461184; Mon, 03 Jan 2011 07:11:01 -0800 (PST) Received: by 10.91.147.11 with HTTP; Mon, 3 Jan 2011 07:11:01 -0800 (PST) Date: Tue, 4 Jan 2011 00:11:01 +0900 Message-ID: From: Takeshi HASEGAWA To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: wakatono@todo.gr.jp, soda@netbsd.org, rusty@au.ibm.com, Takeshi HASEGAWA , ito@virtualtech.jp, aliguori@us.ibm.com Subject: Another virtio drivers for FreeBSD X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 03 Jan 2011 15:36:42 -0000 Hi freebsd-current, I noticed there are some threads about virtio drivers for FreeBSD and NetBSD on this mailing list, so I would like to post my virtio drivers. I've worked on these drivers for a few months to understand para-virtalized drivers. I sent early versions to Rusty Russel, the author of virtio, since I attended to Rusty's virtio session at LinuxCon 2010 Tokyo and decided to work on it. My virtio-net & virtio-blk driver is not complete just now, but it looks working fine. I confirmed these drivers working with FreeBSD 8.1-R on Fedora 14 KVM. Both driver can deliver better performance than h/w emulation. http://ysr.jp/~hasegaw/virtio-20110103-2316.tar.gz I'm sorry for very nasty code; I am newbie in both of C and kernel-space code. ;) Now I am suffering with performance problem with virtio-blk driver. I've heard some people said FreeBSD's disk I/O on KVM is very poor so I have implemented block I/O, but the paravirtual driver's performance is still very bad - "almost same" with SCSI emulation, expecting CPU stress. http://ysr.jp/~hasegaw/20101203virtio-blk5.txt Now I am doubting FreeBSD and qemu-kvm's storage layer may not be compatible so well. Anyone is examining about this? I especially thank to Noriyuki Soda because he gave me a lot of advices when I was suffering with usage of bus_dma framework and some other issues. For NetBSD, it looks Makoto Minoura has already ported virtio drivers. (I'm not sure these are already commited to main tree or not) http://www.minoura.org/~minoura/virtio-100605/ -- Takeshi HASEGAWA