lkml.org 
[lkml]   [2012]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC][PATCH 00/32] Nohz cpusets v2 (adaptive tickless kernel)
From
On Tue, Mar 27, 2012 at 6:22 PM, Christoph Lameter <cl@linux.com> wrote:
> On Tue, 27 Mar 2012, Gilad Ben-Yossef wrote:
>
>> +static void vmstat_update(struct work_struct *w)
>> +{
>> +     int cpu, this_cpu = smp_processor_id();
>> +     int sleepy_cpu_counter = 0;
>> +     static spinlock_t lock;
>> +
>> +     if(spin_trylock(&lock)) {
>
> Trylock would cause cache bouncing between vmstat runs on various
> processors. The reason that vmstat_update exists is to avoid these cache
> bounces. Please no exclusive cacheline acquisiton by all cpus by default.
>

Right, I didn't think of that.

> The best method would be to assign a sacrifical lamb cpu and check if we
> are running on that cpu. That way taking a lock can be avoided.

Cool, I'll do it.

Thanks

Gilad


> --
> 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/



--
Gilad Ben-Yossef
Chief Coffee Drinker
gilad@benyossef.com
Israel Cell: +972-52-8260388
US Cell: +1-973-8260388
http://benyossef.com

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru
--
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: 2012-03-28 08:49    [W:0.117 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site