0 Replies Latest reply on May 12, 2010 8:31 PM by frankas

    calling usleep(0) destroys performance. Why ?


      I am noticing some very strange behaviour. I have one a kernel running in a tight busy loop waiting for events. When doing this GPU utilization is 85% - but if I try to be 'nice' and add a usleep() call in my loop, this drops to 60%. This happens even if I call usleep(0), which in theory does 'nothing'.

      What in the World is going on here ? Does the CAL runtime interfere with SIG_ALARM handling ?

      I also have reports that the same thing happens on 5970 cards (10.x) driver, even without a usleep() call, I can't get utilization much higher than 60%. I am thinking there may be a connection since the symptoms are quite similar.


      Code hosted here:


      A5Slice::tick() is the state machine that drives the kernel invocations. Adding usleep(0) to the loop of the calling function makes things go pear shaped. (A5Brook.cpp line 179)

      Any clues ? Anyone ?