On Tuesday 24 May 2005 19:15, Dr. Werner Fink wrote: > On Tue, May 24, 2005 at 04:31:31PM +0100, Darren Salt wrote: > > I demand that Matthias Schwarzott may or may not have written... > > > > > in the last days I come accross a strange phenomen: One vdr thread eats > > > up to 45% cpu on my Pentium3 700Mhz system when I did nothing with my > > > vdr except live viewing on a ff card without transfer mode. Some > > > digging resulted in this: > > > - The thread is the section handler thread. > > > - The cpu-load depends on the transponder currently watching on. > > > > [snip] > > > > > Attached is a Patch to simply add one sleep(1) inte the loop before the > > > poll. This results in reducing the cpu-load from 45% to 1.3%. And it > > > does not seem to lose any sections. > > > > If you replace that sleep(1) with sched_yield(), do you see the same > > effect wrt CPU load? > > Wouldn't be pthread_yield() the better solution? > I tested sched_yield and pthread_yield and both did not change anything. The cpu load is the same as with an unchanged vdr. Matthias