Re: kvm_read() vs ioctl performance
- From: Julian Elischer <julian@xxxxxxxxxxxx>
- Date: Fri, 21 Mar 2008 18:53:06 -0700
Barney Cordoba wrote:
--- Julian Elischer <julian@xxxxxxxxxxxx> wrote:
Barney Cordoba wrote:I have an app which reads stats from the kerneliterations,
periodically, and there can be a lot of
sometimes 20,000 or more. I'm thinking ofconvertingfrom an ioctl method to kvm_read(). KVM iscertainlysimpler, but its not clear what overhead isinvolved,since kvm_read() likely has to call the kernelalso.Does anyone have a handle on the difference inmodule
overhead, assuming that the ioctl call is to a
which does nothing more than copy the data andreturn?
tried a shared memory page?
No, but I built a test and kvm_read is 70 times
faster, in
case anyone is interested.
cool..
the only downside is that we are trying to get away from kvm direct access. (which is why a shared page might give the same result with a stable API which is not libkvm... BTW on an SMP machine you have
no way to ensure that your stats are coherent if you use libkvm.
Barney
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: kvm_read() vs ioctl performance
- From: Poul-Henning Kamp
- Re: kvm_read() vs ioctl performance
- From: Barney Cordoba
- Re: kvm_read() vs ioctl performance
- References:
- Re: kvm_read() vs ioctl performance
- From: Barney Cordoba
- Re: kvm_read() vs ioctl performance
- Prev by Date: Re: kvm_read() vs ioctl performance
- Next by Date: Re: kvm_read() vs ioctl performance
- Previous by thread: Re: kvm_read() vs ioctl performance
- Next by thread: Re: kvm_read() vs ioctl performance
- Index(es):
Relevant Pages
|