Re: [patch] CFS scheduler, -v19

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

 



On 07/17/2007 03:45 AM, Ingo Molnar wrote:
> * Ian Kent <[email protected]> wrote:
> 
>> Yes it does and I have two reported bugs so far.
>>
>> In several places I have code similar to:
>>
>> wait.tv_sec = time(NULL) + 1;
>> wait.tv_nsec = 0;
>>
>> signaled = 0;
>> while (!signaled) {
>>         status = pthread_cond_timedwait(&cond, &mutex, &wait);
>>        if (status) {
>>              if (status == ETIMEDOUT)
>>                   break;
>>              fatal(status);
>>       }
>> }
> 
> ah! It passes in a low-res time source into a high-res time interface 
> (pthread_cond_timedwait()). Could you change the time(NULL) + 1 to 
> time(NULL) + 2, or change it to:
> 
> 	gettimeofday(&wait, NULL);
> 	wait.tv_sec++;
> 
> does this solve the spinning?
> 
> i'm wondering how widespread this is. If automount is the only app doing 
> this then _maybe_ we could get away with it by changing automount?

Odds are there's at least one other app doing that somewhere.

Would reverting the CFS changes to time.c fix this problem?
That optimization just got merged in 2.6.22 mainline...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux