Re: rwlock_t unfairness and tasklist_lock

From: Thomas Gleixner
Date: Fri Jan 11 2013 - 09:34:33 EST


On Tue, 8 Jan 2013, Michel Lespinasse wrote:
> - Does anyone know of any current work towards removing the
> tasklist_lock use of rwlock_t ? Thomas Gleixner mentioned 3 years ago
> that he'd give it a shot (https://lwn.net/Articles/364601/), did he
> encounter some unforeseen difficulty that we should learn from ?

I converted quite a bunch of the read side instances to rcu
protection, but got distracted. There was no fundamental difficulty,
just lack of time.

> - Would there be any fundamental objection to implementing a fair
> rwlock_t and dealing with the reentrancy issues in tasklist_lock ? My
> proposal there would be along the lines of:
>
> 1- implement a fair rwlock_t - the ticket based idea from David
> Howells seems quite appropriate to me

Nah. Lets get it killed. Most of the stuff can be converted to RCU and
the remaining bits and pieces are the write lock sides which then can
be converted to a big standard spinlock. There might be a few more
complex ones, but Oleg said back then that those should be solved by
locking the process instead of locking the whole tasklist.

Thanks,

tglx


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/