[PATCH] limit streamdev client's ringbuffer timeouts to more sane values

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

 



Stone wrote:
> On 4/5/07, *Artur Skawina* <art_k@xxxxx <mailto:art_k@xxxxx>> wrote:
>     With the high-res timers in kernel 2.6.21+ usleep(1) is no longer
>     treated as
>     usleep(10000) and the streamdev client is almost unusable; it uses
>     most of the cpu
>     and causes hundreds of thousands context switches per second.
>     This gets rid of the almost-busy-loop.

> How about his approach?
> 
> --- streamdev/client/filter.c.orig      2007-04-05 20:45:04.000000000 -0700
> +++ streamdev/client/filter.c   2007-04-05 20:45: 44.000000000 -0700
> @@ -135,7 +135,7 @@
>                         }
>                         m_RingBuffer->Del(TS_SIZE);
>                 } else
> -                       usleep(1);
> +                       cCondWait::SleepMs(1);
>         }
>  }

sure, just changing it to 'usleep(10000)' works too. Is there a reason to avoid
the ringbuffer infrastructure?

artur


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux