Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VDR recording glitches



Carsten Koch wrote:
> with optimum buffering strategies in the kernel and
> in the driver, I would not expect to see these
> problems, before the average disk transfer rate goes
> below the average rate of data coming from the card.

The problem ist not directly the communication speed between the
harddisk and the hostsystem. It is the number of interrupts per second
and the time a interrupt service routine (ISR) needs to process the
request. 
The DVB card gets the different streams not via DMA into different
memory areas (like it would be reasonable). Actually it uses a dual
ported RAM which is accessed through an universal parallel port (called
DEBI) on the SAA 7146 PCI-Bridge. 
Everytime the firmware writes a block of a stream to the DP-RAM an
interrupt is generated on the hostsystem. As you can see the DP-RAM has
a size of 8Kbytes and the actual size for transfers of data is limited
to 7168 Bytes. Now the calculation is simple:

If you are recording an av-stream of 5Mbit/s (which is 640kBytes/s) your
host system gets 640*1024/7168=91 interrupts per second. This is in fact
not really much.

A problem might occur if the ISR takes too much time without re-enabling
other interrupts.

The same calculations can be done for data transferred from/to harddisks
via PIO- or DMA-mode.

>From my subjective view there is no reason, why recording should cause
serious timing problems even on slow systems. At this time further
profiling tests would be necessary to find out where's the problem in
your particular cases.


> As far as I remember, even with DMA off, the average
> disk transfer rate is still more than a factor of two
> faster than the average rate of data coming from the card.
> 
> So, I'd say we're seeing a driver bug (or at least a
> driver weakness) here.
> 
> Ralph, what do you think?
> 
> Carsten.


Home | Main Index | Thread Index