Re: [RFC PATCH v2 2/2] locking/percpu-rwsem: Mark rwsem as non-spinnable in percpu_rwsem_release()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/15, Peter Zijlstra wrote:
>
> So what's wrong with adding:
>
> 	if (!read)
> 		sem->rw_sem.owner = current;

Agreed, I have already suggested this change twice. Except we obviously
need to check CONFIG_RWSEM_SPIN_ON_OWNER (->owner doesn't exists otherwise)
or even CONFIG_DEBUG_RWSEMS to make the purpose more clear.

> Afaict the whole .owner=NULL thing in release already stops the spinners

Not really, the new writer will spin in this case, afaics.

But this is another problem and probably we do not care. The new writer is
almost impossible in this particular case, another freeze_super() should
notice frozen != SB_UNFROZEN and return EBUSY.

> and the above 'fixes' the debug splat.

Yes.

Waiman, can't we trivially fix the problem first? Then we can add the helpers
and think about other improvements.

Oleg.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux