Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Mar 2008 15:36:24 -0700 (PDT)
From:      Barney Cordoba <barney_cordoba@yahoo.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        current@freebsd.org
Subject:   Re: kvm_read() vs ioctl performance
Message-ID:  <817070.5892.qm@web63911.mail.re1.yahoo.com>
In-Reply-To: <47E40196.6060703@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--- Julian Elischer <julian@elischer.org> wrote:

> Barney Cordoba wrote:
> > 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?
> 
> tried a shared memory page?

No, but I built a test and kvm_read is 70 times
faster, in
case anyone is interested.

Barney


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?817070.5892.qm>