Subject: Re: kernel->userland r/o page mapping
To: None <tech-kern@netbsd.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: tech-kern
Date: 03/08/2007 15:13:17
On Thu, Mar 08, 2007 at 07:45:52AM -0500, Matthew Mondor wrote:
> For some applications I noticed that it would be useful to have minor
> live kernel information bits accessible efficiently in userland in
> read-only mode.  For instance a new structure could be defined and some
> userland library functions could obtain a pointer to it in the process
> vm space to access the fields, unprivileged and efficiently.

That's the comm page idea. For things like gettimeofday() you need to
store the current time, cpu, frequency and can interpolate using TSC in
userland. Compare the values after you are done to detect involuntary
context switches. That's it.

Joerg