Re: [PATCH v7 1/4] spinlock: A new lockref structure for locklessupdate of refcount

From: Linus Torvalds
Date: Tue Sep 03 2013 - 11:34:13 EST


On Tue, Sep 3, 2013 at 8:14 AM, Waiman Long <waiman.long@xxxxxx> wrote:
>
> Other than the global tty_ldisc_lock, there is no other major
> bottleneck. I am not that worry about the tty_ldisc_lock bottleneck
> as real world applications probably won't have that many calls to
> set the tty driver.

I suspect the tty_ldisc_lock() could be made to go away if we care.
Making the ldisc be rcu-free'd, coupled with just optimistically
updating the count using "atomic_inc_not_zero()" and re-checking the
ldisc pointer afterwards should probably do it. But I agree that it
probably isn't worth it for any actual real load.

Linus
--
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/