[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181002090848.GD116695@gmail.com>
Date: Tue, 2 Oct 2018 11:08:48 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Waiman Long <longman@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Will Deacon <will.deacon@....com>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 5/5] locking/lockdep: Call lock_release after releasing
the lock
* Waiman Long <longman@...hat.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
Powered by blists - more mailing lists