On Thu, 04 Sep 2003 20:23:08 +0200, Peter Graf wrote:

> Hi,
> I made an experimental boost of QLwIP speed to the Ethernet maximum of 10 
> Mbit/sec, which results in a massive amount of calls to MT.SUSJB, MT.RELJB 
> and MT.PRIOR, typically several thousands per second.
> After days of of debugging attempts, I still have strange effects that lead 
> me to a slight concern about the scheduler. The problem is hard to 
> reproduce and even harder to debug lack of appropriate tools. It seems like 
> under rare timing conditions a job is not released after a call to 
> MT.RELJB. The problem does no longer occur when I reduce the amount of the 
> three mentioned OS calls to several hundreds per second.
> It can still be a side effect of a bug in my code, nevertheless I'd like to 
> know if such a massive use of job state transition and rescheduling has 
> ever been tested before. Any ideas?
> Is it even possible that the number of SUSJB/RELJB/PRIOR calls per frame 
> interrupt is limited?

Well, I guess the problem is that all three calls are exiting via the
scheduler (they are not atomic traps). My guess is that calling them in
rapid succession (more than once every 1/50th of second) makes the job
to reenter recursively the scheduler and to fill up the supervisor stack...

It might work under SMSQ/E (bigger stack, much better and faster scheduler),
but this is definitely not recommended under QDOS...

Plus, I'm a bit surprised that you are apparently using jobs to fetch the
data from the ethernet card... It should be done via an interrupt handler
instead... Actually, the best design would be to have the Q60 fast interrupt
handler to fill a buffer, and a frame interrupt task to move the data from
that buffer into a bigger one for your job to fetch it in big chunks...).


Reply via email to