Re: [PATCH 03/11] locking, rwsem: introduce basis for down_write_killable

From: Peter Zijlstra
Date: Thu Mar 31 2016 - 04:44:39 EST


On Thu, Mar 31, 2016 at 10:33:36AM +0200, Michal Hocko wrote:
> > __mutex_lock_common() has it before the call to schedule and after the
> > 'trylock'.
> >
> > The difference is that rwsem will now respond to the KILL and return
> > -EINTR even if the lock is available, whereas mutex will acquire it and
> > ignore the signal (for a little while longer).
> >
> > Neither is wrong per se, but I feel all the locking primitives should
> > behave in a consistent manner in this regard.
>
> Agreed! What about the following on top? I will repost the full patch
> if it looks OK.

Yep, that seems to have the right shape to it.

Thanks!