Messages in this thread | | | Date | Tue, 2 Oct 2018 11:08:48 +0200 | From | Ingo Molnar <> | Subject | Re: [PATCH 5/5] locking/lockdep: Call lock_release after releasing the lock |
| |
* Waiman Long <longman@redhat.com> wrote:
> Subject: locking/lockdep: Call lock_release after releasing the lock
s/lock_release /lock_release()
> Currently, lock_acquire() is called before acquiring the lock and > lock_release() is called before the releasing the lock. As a result, > the execution time of lock_release() is added to the lock hold time > reducing locking throughput, especially for spinlocks and rwlocks which > tend to have a much shorter lock hold time. > > As lock_release() is not going to update any shared data that needs > protection from the lock, we don't actually need to call it before > releasing the lock. So the lock_release() calls are now postponed to > after releasing the lock for spinlocks and rwlocks.
Nice optimization!
Thanks,
Ingo
| |