Re: [PATCH] make dvb_ringbuffer compatible to dmxdev_buffer

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

 



Andreas Oberritter writes:
 > On Tue, 2006-03-14 at 13:46 +0100, Oliver Endriss wrote:
 > > It will break the av7110 driver.
 > 
 > OK, so I will send another patch to revert that part to Mauro.
 > 
 > > How could setting the buffer ptr to 0 increase performance?
 > > Usually it will save a single wrap of the buffer.
 > 
 > Yes, if the data starts at 0 that's one copy_to_user() vs. two when
 > reading the buffer. The start of the buffer is page aligned, and proper
 > alignment is IMHO required for fast copy operations.

Yes, but this only slows down the "corner" bytes (the non-WORD or
non-page aligned parts) a little bit. 

If it really makes such a big difference on the platform you are using
it might be worth looking into handling the data differently.
Sections could be handled so that no wrapping occurs (go to 0 if the
current section does not fit), or maybe even use one page 
(if it is >=4K) for each.
TS streams are already word aligned but it would be harder to page 
align them. If you make buffer sizes multiples of 188 you would at
least get rid of any wrapping.
This of course makes it harder to use a common ringbuffer code.

Do you really see big performance issues resulting from wrapping/mis-alignment?


Ralph

_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux