lkml.org 
[lkml]   [2012]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: A quick view of the performance benchmark for semaphore-like and mutex
From
Date
On Tue, 2012-04-17 at 09:36 +0000, Chen, Dennis (SRDC SW) wrote:
> Just as a quick & rough test, with below changes based on mutex (almost the same as semaphore):
>
> --- /home/dennis/Linux/linux-3.3.2-sem/kernel/mutex.c 2012-04-17 14:59:49.823177615 +0800
> +++ ./mutex.c 2012-04-17 17:00:12.963059284 +0800
> @@ -140,6 +140,7 @@ __mutex_lock_common(struct mutex *lock,
> preempt_disable();
> mutex_acquire_nest(&lock->dep_map, subclass, 0, nest_lock, ip);
>
> +#if 0
> #ifdef CONFIG_MUTEX_SPIN_ON_OWNER
> /*
> * Optimistic spinning.
> @@ -195,6 +196,7 @@ __mutex_lock_common(struct mutex *lock,
> arch_mutex_cpu_relax();
> }
> #endif
> +#endif
> spin_lock_mutex(&lock->wait_lock, flags);
>
> debug_mutex_lock_common(lock, &waiter);


or you do:

echo NO_OWNER_SPIN > /debug/sched_features



\
 
 \ /
  Last update: 2012-04-17 12:13    [W:0.056 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site