Re: kvm_read() vs ioctl performance




--- Poul-Henning Kamp <phk@xxxxxxxxxxxxxx> wrote:

In message <47E46682.4020403@xxxxxxxxxxxx>, 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
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"