[lkml]   [1997]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectTimer queues: Which one should I use...
Hi, thanks for your effort to support Zip drive, writes:
> I've only just joined this mailing list but I've heard that there has
> been some discussion on timer queues. I have been working on a driver
> (Iomega parallel port ZIP drive) and found that tq_scheduler stops
> polling/processing when the system loads up (gcc -O2 does it quiet
> nicely when compiling the gcc source).
> I've since switched to using tq_timer with more stable results but
> apparently there has been a performance drop. Any suggestions?

While the tasks of tq_timer are executed by timer ticks, tq_immediate
runs (somewhat) immediately. You can queue some tasks on the queue of
tq_immediate, and the tasks are executed when bottom_half is called.
For example, you can queue a task in the interrupt handler, and the
task is executed when the control exits interrupt handler and
bottom_half is called. Another example is, you can queue a task in
normal kernel mode (not interrupt), and when the control goes back to
userland, bottom_half is called and the task is executed.

queue_task(&task, &tq_immediate);

Although I don't know much about ZIP drive, here is a idea:
For slow command (seek/write/...): use tq_timer
For fast command (read/status/..): use tq_immediate

Hope this helps,
NIIBE Yutaka

 \ /
  Last update: 2005-03-22 13:39    [W:0.042 / U:0.900 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site