From owner-freebsd-current@FreeBSD.ORG Mon May 3 14:55:27 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D24EF16A4CE for ; Mon, 3 May 2004 14:55:27 -0700 (PDT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6749B43D45 for ; Mon, 3 May 2004 14:55:25 -0700 (PDT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 82E28ACAF4; Mon, 3 May 2004 23:55:23 +0200 (CEST) Date: Mon, 3 May 2004 23:55:23 +0200 From: Pawel Jakub Dawidek To: freebsd-current@freebsd.org Message-ID: <20040503215523.GU24376@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oOg9qlz9Be97MsnX" Content-Disposition: inline User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 Subject: GEOM Gate committed! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.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: Mon, 03 May 2004 21:55:28 -0000 --oOg9qlz9Be97MsnX Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello. I committed GEOM Gate. For those who aren't aware of what it is, few words of explanation. GEOM Gate itself (as a GEOM class) is a bridge between GEOM and userland applications that want to handle I/O requests in userland. Such an application is able to create a ggate provider by ioctl(2) mechnism and receive I/O requests directed to this newly created provider. I committed 3 applications that made use of GEOM Gate: ggatel(8) - GEOM Gate local control utility. ggatec(8) - GEOM Gate network client and control utility. ggated(8) - GEOM Gate network daemon. Ggatel is only an example for programmers how to use GEOM Gate mechanism, but it could also be used as an replacement for md(4) file-backed devices or as a "GEOMificator" for not GEOM-aware disk devices. For example, one is not able use gbde(8) on floppy disks, with ggatel(8) it is possible: # ggatel create -u 5 /dev/fd0 # gbde init /dev/ggate5 # gbde attach ggate5 # newfs /dev/ggate5.bde # mount /dev/ggate5.bde /secret # cp /private/foo /secret/ # umount /secret # gbde detach ggate5 # ggatel destroy -u 5 Anyway. More interesting use is disk device (or files) exporting through the network. Here is an example how to use CD-ROM from machine 'server' on machine 'client': server# echo "10.0.0.0/8 RO /dev/acd0" > /etc/gg.exports server# ggated client# ggatec create -u 5 server.mydomain /dev/acd0 client# mount_cd9660 /dev/ggate5 /cdrom That was easy. While playing with GEOM Gate I decided to test 'make -j2 buildkernel' on GENERIC kernel: 1: 559s 2: 560s 3: 729s where: 1 - /usr/src and /usr/obj on local /dev/data.stripe, which is two SATA disks striped (~118MB/s). 2 - /usr/src is on SATA disk /dev/ad6, /usr/obj is on SATA disk /dev/ad8, but both disks are exported through 1Gbit network with GEOM Gate and used on test machine. 3 - Simlar situation to 2, but /usr/src and /usr/obj are mounted over NFS. Interesting. It shows not only that GEOM Gate is faster that NFS (what I wanted to proof), but also that disk speed isn't so important. I get ~35MB/s on ggate devices over 1Gbit network. We can do some optimizations in the future, for example instead of copying data from kernel to userland, we should map bio_data into userland process, but I'm not a VM guru to do this. Thing to note: ggated(8) is absolutely GEOM-unaware and not FreeBSD specific at all. It is a simple network daemon that opens given device or file and read from/write to it, that's all. So it should be really trivial to port it to other operating systems and exports disk devices from them. Comments, suggestion, bug reports are of course more than welcome. Enjoy! --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --oOg9qlz9Be97MsnX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAlr/LForvXbEpPzQRAnl3AKDotnW4pETF+SfvKmSxi7EBRCb3gwCeK3rF 9dw4f7BG9MaEA6NDeRUjAfQ= =jjUG -----END PGP SIGNATURE----- --oOg9qlz9Be97MsnX--