From owner-freebsd-current@FreeBSD.ORG Sat Mar 22 13:26:47 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4522106566B for ; Sat, 22 Mar 2008 13:26:47 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: from web63914.mail.re1.yahoo.com (web63914.mail.re1.yahoo.com [69.147.97.129]) by mx1.freebsd.org (Postfix) with SMTP id 7FB688FC15 for ; Sat, 22 Mar 2008 13:26:47 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: (qmail 19155 invoked by uid 60001); 22 Mar 2008 13:26:46 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=dkYGTkcddA2PfME20s164eYwjbm7+YEo9dXtYAQth6E5GrhplTK3cXwlgknsdZeQmIPtKzHI7dzO9k0/5VvG3vbywMPstFsV7xGNFYcn0t2xC/rdbXni72ihS+mpFmLJMXjcrjV6d4F/112ucP2OvX5kNtdBPogFYoPAssVg5iU=; X-YMail-OSG: PgcuaMoVM1ny5W3rfPAB2Epl3DvRfy7ribcdSoTO Received: from [24.45.195.185] by web63914.mail.re1.yahoo.com via HTTP; Sat, 22 Mar 2008 06:26:46 PDT Date: Sat, 22 Mar 2008 06:26:46 -0700 (PDT) From: Barney Cordoba To: Poul-Henning Kamp , Julian Elischer In-Reply-To: <9428.1206171107@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <416202.18656.qm@web63914.mail.re1.yahoo.com> Cc: current@freebsd.org Subject: Re: kvm_read() vs ioctl performance 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: Sat, 22 Mar 2008 13:26:48 -0000 --- Poul-Henning Kamp wrote: > In message <47E46682.4020403@elischer.org>, Julian > Elischer writes: > > >>> tried a shared memory page? > >> > >> No, but I built a test and kvm_read is 70 times > >> faster, in > >> case anyone is interested. > > The shared memory approach is much better than that, > you should > go that way. > > Look at the adlink driver for an example. I can't easily follow this driver, given the superior comments :) I don't see this in the handbook. Is there a document which describes both kernel and userland implementation? My concern is this: stats may be updated in iterations of 100K+ times per second, while stats are only gathered once every few seconds. Even a tiny addition to the kernel cpu cycles can make it a "cut off your head to stop a nosebleed" scenario. I don't want to lose cpu cycles for the sake of saving a fraction of a ms every few minutes. Barney ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ