Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Mar 2008 13:32:21 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Barney Cordoba <barney_cordoba@yahoo.com>
Cc:        Julian Elischer <julian@elischer.org>, current@freebsd.org
Subject:   Re: kvm_read() vs ioctl performance 
Message-ID:  <11008.1206192741@critter.freebsd.dk>
In-Reply-To: Your message of "Sat, 22 Mar 2008 06:26:46 MST." <416202.18656.qm@web63914.mail.re1.yahoo.com> 

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

In message <416202.18656.qm@web63914.mail.re1.yahoo.com>, Barney Cordoba writes
:

>I can't easily follow this driver, given the superior
>comments :) 

Look at the mmap() function.

>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.

The point about using shared memory, is that it is just
that: shared memory.

The memory the kernel writes to, is the same memory the
userland reads from.

There is _no_ overhead anywhere.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



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