| Date | Wed, 17 Apr 2019 10:17:39 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH v4 07/16] locking/rwsem: Implement lock handoff to prevent lock starvation |
| |
On Sat, Apr 13, 2019 at 01:22:50PM -0400, Waiman Long wrote: > +/* > + * This is safe to be called without holding the wait_lock.
Because.... @waiter is *our* waiter and it's not going anywhere. So when it's first, it stays first until we do something about it.
> + */ > +static inline bool > +rwsem_waiter_is_first(struct rw_semaphore *sem, struct rwsem_waiter *waiter) > +{ > + return list_first_entry(&sem->wait_list, struct rwsem_waiter, list) > + == waiter; > +}
|