From owner-freebsd-current@FreeBSD.ORG Fri Mar 21 17:37:06 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 DDF10106567F for ; Fri, 21 Mar 2008 17:37:06 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: from web63913.mail.re1.yahoo.com (web63913.mail.re1.yahoo.com [69.147.97.128]) by mx1.freebsd.org (Postfix) with SMTP id 738648FC4C for ; Fri, 21 Mar 2008 17:37:05 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: (qmail 886 invoked by uid 60001); 21 Mar 2008 17:37:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=fntMZT+G8OXATLzyvl2NVn+iO1CutvIn1aRKuVWkELMdcz1MsG3LfzDgLFQRwZgwVN/nhw8AsZ/oLnBd6fT+xKnEDKm8SDmZoJG2sdGrM0BN19h9PmZWL+BgQC5tdE7/KHE8IMLZr0LEN1eNG6b97MRLUZBv/QOvLsWzf75ur7c=; X-YMail-OSG: Za92ocoVM1nWyDJKjvmuK4um0ankzAV0eHqwVX_Dm3pMLpSr_G4ZPA.aAwcWjPUyA62NcsL2RUhFp3TkbLuInFDXFCQIQsdz3NLZizk9Inwxh7V.CUirg.VBQ4pJ3w-- Received: from [24.45.195.185] by web63913.mail.re1.yahoo.com via HTTP; Fri, 21 Mar 2008 10:37:04 PDT Date: Fri, 21 Mar 2008 10:37:04 -0700 (PDT) From: Barney Cordoba To: current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <454731.813.qm@web63913.mail.re1.yahoo.com> Cc: Subject: 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: Fri, 21 Mar 2008 17:37:07 -0000 I have an app which reads stats from the kernel periodically, and there can be a lot of iterations, sometimes 20,000 or more. I'm thinking of converting from an ioctl method to kvm_read(). KVM is certainly simpler, but its not clear what overhead is involved, since kvm_read() likely has to call the kernel also. Does anyone have a handle on the difference in overhead, assuming that the ioctl call is to a module which does nothing more than copy the data and return? Thanks, barney ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ