lkml.org 
[lkml]   [2011]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mm, vmstat: Use cond_resched only when !CONFIG_PREEMPT
From
On Tue, May 31, 2011 at 8:23 AM, KOSAKI Motohiro
<kosaki.motohiro@jp.fujitsu.com> wrote:
>> diff --git a/mm/vmstat.c b/mm/vmstat.c
>> index 20c18b7..72cf857 100644
>> --- a/mm/vmstat.c
>> +++ b/mm/vmstat.c
>> @@ -461,7 +461,11 @@ void refresh_cpu_vm_stats(int cpu)
>>                               p->expire = 3;
>>  #endif
>>                       }
>> +
>> +#ifndef CONFIG_PREEMPT
>>               cond_resched();
>> +#endif
>> +
>
> In general, we should avoid #ifdef CONFIG_PREEMPT for maintainancebility as far as possible.
> Is there any observable benefit? Can you please demonstrate it?
>
On my system I'm not sure whether it shows demonstratable benefit or
not. Although, I try. It will be helpful if you give me a hint about
how to measure its benefit.

Thanks,
Rakib
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-05-31 05:21    [W:0.264 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site