But now for something completely different, how to shorten these long delays in kernel 2.6?



I have a number of situations where there is video input piped via some programs and then to a display.

Delays for a live event to become visible:
USBwebcam -> driver_module -> v4l-userapp(display1) -> pipe -> ffplay(display2)
0 1second 6 seconds

This stays the same long delay when setting buffer sizes to 0 and using fflush() in the applications.

I ended up in /proc/sys/vm/
the 2.6 kernels no longer have bdflush, but 2 threads are running it seems:
cat /proc/sys/vm/nr_pdflush_threads
2

I am not very confident of tweeking params here in /proc/sys/vm/

So the question is, before I ... this system, WHAT can I do to make the 6 seconds go away?
The 6 seconds delay is also there if I use an other video source, for example ethernet port (so not USB).

I suspect Linux caches the data somehow somewhere in the pipe, strange is that the delay
is always the same, even at low (2fps) frame rates and small display sizes.

So what shall I tweek, and wil lit even make a difference?
l /proc/sys/vm/
-rw-r--r-- 1 root root 0 2006-02-28 15:53 vfs_cache_pressure
-rw-r--r-- 1 root root 0 2006-02-28 15:53 swap_token_timeout
-rw-r--r-- 1 root root 0 2006-02-28 15:53 swappiness
-rw-r--r-- 1 root root 0 2006-02-28 15:53 page-cluster
-rw-r--r-- 1 root root 0 2006-02-28 15:53 overcommit_ratio
-rw-r--r-- 1 root root 0 2006-02-28 15:53 overcommit_memory
-r--r--r-- 1 root root 0 2006-02-28 15:53 nr_pdflush_threads
-rw-r--r-- 1 root root 0 2006-02-28 15:53 nr_hugepages
-rw-r--r-- 1 root root 0 2006-02-28 15:53 min_free_kbytes
-rw-r--r-- 1 root root 0 2006-02-28 15:53 max_map_count
-rw-r--r-- 1 root root 0 2006-02-28 15:53 lowmem_reserve_ratio
-rw-r--r-- 1 root root 0 2006-02-28 15:53 legacy_va_layout
-rw-r--r-- 1 root root 0 2006-02-28 15:53 laptop_mode
-rw-r--r-- 1 root root 0 2006-02-28 15:53 hugetlb_shm_group
-rw-r--r-- 1 root root 0 2006-02-28 15:53 dirty_writeback_centisecs
-rw-r--r-- 1 root root 0 2006-02-28 15:53 dirty_ratio
-rw-r--r-- 1 root root 0 2006-02-28 15:53 dirty_expire_centisecs
-rw-r--r-- 1 root root 0 2006-02-28 15:53 dirty_background_ratio
-rw-r--r-- 1 root root 0 2006-02-28 15:53 block_dump


.



Relevant Pages

  • Timed and blinking messages
    ... display a self-closing message in the form when a certain condition is met, ... Warning messages in the status bar is not very alerting, ... Do While Timer < Delay ...
    (microsoft.public.excel.programming)
  • Re: [PATCH/RFC 2.6.20-rc4 1/1] fbdev,mm: hecuba/E-Ink fbdev driver
    ... associated with updating the display. ... unmaping and only then do the actual framebuffer update. ... userspace app like Xfbdev mmaps framebuffer ... add a small delay between first-touch and writeback to the display. ...
    (Linux-Kernel)
  • Re: [PATCH/RFC 2.6.20-rc4 1/1] fbdev,mm: hecuba/E-Ink fbdev driver
    ... associated with updating the display. ... unmaping and only then do the actual framebuffer update. ... userspace app like Xfbdev mmaps framebuffer ... add a small delay between first-touch and writeback to the display. ...
    (Linux-Kernel)
  • Re: Problem with LCD & PIC16C54C
    ... the LCD still does not display. ... CALL DELAY ... CALL SDELAY ... MOVWF PORTB ...
    (sci.electronics.design)
  • Re: msgbox button
    ... I am using it as a delay and at the same time allowing ... the PictureBox and Enable=True them when it is removed. ... you would use a Timer control to handle displaying the message for ...
    (microsoft.public.vb.general.discussion)