Logging/printf's in RT env

Adam Lackorzynski adam at os.inf.tu-dresden.de
Thu Aug 4 15:09:12 CEST 2005

On Thu Aug 04, 2005 at 13:45:12 +0200, Rene Wittmann wrote:
> I have also the problem that I want to output some of my symbols+values
> during the execution of my application.
> Furthermore I'm working in the RT scheduling mode (with APIC one shot
> mode).
> I have three timeslices:
>    1. mandatory
>    2. optional
>    3. "mandatory" (if part of optional was executed)
> The preempter recognizes timeslice overruns and sets a
> global variable, the working thread checks this variable and therefore
> knows about those "events".
> This works fine if my priorites are set to 50,30,50, 
> but fails after a few periods with a pagefault if setting the priorities to 
> 200,190,200.
> In each part I use some calls to LOG() to output a few things I'm
> interested in. If I leave out those LOG()-calls, it works also with the
> high priorites (200,190,200).
> So I assume, there's a LOG-buffer overflow (as the LOG priority is not
> that high)?
> Could I prevent this by using printf instead of LOG or is LOG just a
> kind of macro for printf?

printf is usually also a log function.

The priorities of the logserver are at 32, so in the first example
they're inbetween and in the latter one completely below.

Does the PF go away when you add --prio 210 (or similar) as an argument
to log?

Can you send me a backtrace with unstripped binaries when the PF
happens? Thanks.

Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/

More information about the l4-hackers mailing list