On 06/15/2016 01:38 PM, Peter Zijlstra wrote:
On Tue, Jun 14, 2016 at 06:48:06PM -0400, Waiman Long wrote:
static bool rwsem_optimistic_spin(struct rw_semaphore *sem)
{
- bool taken = false;
+ bool taken = false, can_spin;
I would place the variables without assignment first.
On Tue, Jun 14, 2016 at 06:48:06PM -0400, Waiman Long wrote:
> static bool rwsem_optimistic_spin(struct rw_semaphore *sem)
> {
> - bool taken = false;
> + bool taken = false, can_spin;
I would place the variables without assignment first.
> + int loopcnt;
>
> preempt_disable
When the rwsem is owned by reader, writers stop optimistic spinning
simply because there is no easy way to figure out if all the readers
are actively running or not. However, there are scenarios where
the readers are unlikely to sleep and optimistic spinning can help
performance.
This patch provid
3 matches
Mail list logo