Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: dvb-kernel budget tests
Emard wrote:
How about making an userspace daemon that will actually talk
to av7110 and feed back data to kernel?
Kernel driver would provide only saa7146 transport interface.
?!?
the common way to do this is that the ioctl/read/write function
initializes a communication state machine and issues the start command
to the hardware. Then it falls asleep and the interrupt handler wakes up
the calling process when the communication state has changed. The ioctl
returns when communication either failed or finished successfully. An
timer might get initialized as watchdog for buggy hardware.
Well - these state machines can get tricky but are the proper way to
solve these problems. Threads like the arm_mon should go away at some point.
OK, I'd rather see the bloat go away.
I'd like to comment something that I don't know is it handled
properly.
Imagine this: TS stream being played by some application
and sw_demux is initialized to filter pids for that
application. Then comes another application that wants
to also filter something else.
Another application wants to fetch different pid, so it
wants to update sw_demux structures. As we now have list,
and not a single integer there are more problems arising.
List fetch/update is complex operation, memory allocation,
pointer arithmetic and data read/write.
Consider vpeirq is calling sw_demux regularly to filter data,
while at the same time we try to update the sw_demux pid list.
No complex software operation (and calling the software demux is usually
something pretty complex - ) should ever run in irq context but it
tasklets or or a bottom half.
In the middle of updating, vpeirq calls sw_demux and finds
halfway-updated list. That could be good chance to get OOPS?
Tasklets are serialized and run only once a time. The important thing is
that you have to check at the end of the tasklet function if there is
more work to do (if another interrupt occured while the tasklet was
running).
Holger
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index