kvm_read() vs ioctl performance
Barney Cordoba
barney_cordoba at yahoo.com
Sat Mar 22 06:26:48 PDT 2008
--- Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
> In message <47E46682.4020403 at 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
More information about the freebsd-current
mailing list