[okl4-developer] Problem...
Peter Nguyen
peter.nguyen at adelaide.edu.au
Sun Nov 22 16:50:32 EST 2009
Hi,
I have come across an implementation problem. More specifically, I
have added some sampling facilities for OKL4 whereby samples are taken
of the system and temporarily stored in the kernel. These samples are
copied out to user space via a interrupt. The buffer for storing
samples is derived from the trace buffer functionality, with the
interrupt handler implemented in user-space, like the tracebuffer
interrupt handler.
The problem that I have is the following: my sampling environment
consists of a series of collection and processing threads, where there
are buffers for each collection thread. Processing threads are able to
read the data from these buffers to perform the required processing.
In terms of execution, the processing threads should block when there
is currently no data available for processing (which would apply when
profiling begins). The interrupt handler copies the samples to the
relevant buffers, and sends IPCs to the processing threads when the
batch of samples have been completely copied. The IPCs to the
processing threads allow for resumption of sample processing. However,
every time I try to execute the profiling, i keep getting a "kernel
access raised user pagefault" KDB message. Upon further investigation,
there's something within the virtual interrupt that causes that
message to occur. My profiling was tested while the iguana naming
server was used for execution.
I'm not at all sure why it would be doing this. In the case where the
processing threads don't block, the profiling actually executes to
completion, although the results will be wrong because the samples
will be attributed to the processing threads themselves. Furthermore,
in testing the profiling against a simple iguana app (where this app
consists of two threads that execute for a long time) with the
blocking measures in the processing threads, the profiling also
completes, with the samples attributed to the two threads in the
simple iguana app.
In terms of my execution environment, I'm using an ia32 build of OKL4
version 1.4.1.1, and have used a patch for the virtual interrupt from
this link: http://wiki.ok-labs.com/forum#nabble-f9692
Any help on this would be greatly appreciated as it has been bugging
me (no pun intended).
-----------------------------------------------------
Peter Nguyen
Jacaranda Research Group
More information about the Developer
mailing list