Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-06-05 Thread Oleg Nesterov
On 06/05, Al Viro wrote: > > On Fri, Jun 05, 2015 at 11:08:57PM +0200, Oleg Nesterov wrote: > > On 06/05, Al Viro wrote: > > > > > > FWIW, I hadn't really looked into stop_machine uses, but fs/locks.c one > > > is really not all that great - there we have a large trashcan of a list > > > (every fil

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-06-05 Thread Al Viro
On Fri, Jun 05, 2015 at 11:08:57PM +0200, Oleg Nesterov wrote: > On 06/05, Al Viro wrote: > > > > FWIW, I hadn't really looked into stop_machine uses, but fs/locks.c one > > is really not all that great - there we have a large trashcan of a list > > (every file_lock on the system) and the only use

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-06-05 Thread Oleg Nesterov
On 06/05, Al Viro wrote: > > FWIW, I hadn't really looked into stop_machine uses, but fs/locks.c one > is really not all that great - there we have a large trashcan of a list > (every file_lock on the system) and the only use of that list is /proc/locks > output generation. Sure, additions take th

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-06-04 Thread Al Viro
On Tue, May 26, 2015 at 02:57:53PM -0700, Linus Torvalds wrote: > Because that is another example of a complete failure of a locking > primitive that was just too specialized to be worth it. FWIW, I hadn't really looked into stop_machine uses, but fs/locks.c one is really not all that great - t

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-05-27 Thread Nicholas Mc Guire
On Tue, 26 May 2015, Linus Torvalds wrote: > On Tue, May 26, 2015 at 11:42 AM, Davidlohr Bueso wrote: > > > > Instead of dropping percpu-rwsem, I was thinking we could instead look > > for opportunities to convert new users, for instance shinkers, where the > > write lock is also taken just for r

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-05-26 Thread Peter Zijlstra
On Tue, May 26, 2015 at 11:42:11AM -0700, Davidlohr Bueso wrote: > Instead of dropping percpu-rwsem, I was thinking we could instead look > for opportunities to convert new users, for instance shinkers, where the > write lock is also taken just for register and unregister purposes, > similar to up

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-05-26 Thread Linus Torvalds
On Tue, May 26, 2015 at 11:42 AM, Davidlohr Bueso wrote: > > Instead of dropping percpu-rwsem, I was thinking we could instead look > for opportunities to convert new users, for instance shinkers, where the > write lock is also taken just for register and unregister purposes, > similar to uprobes.

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-05-26 Thread Davidlohr Bueso
While at it, I'll go ahead and add this triviality. From: Davidlohr Bueso Date: Tue, 26 May 2015 12:51:15 -0700 Subject: [PATCH] doc,locking: Move percpu-rwsem doc into proper subdir Signed-off-by: Davidlohr Bueso --- Documentation/locking/percpu-rw-semaphore.txt | 27 +

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-05-26 Thread Oleg Nesterov
Sorry for noise, forgot to mention... On 05/26, Oleg Nesterov wrote: > > And it can have more users. I can be wrong and I am obviously biased... but it seems to me that even rcu_sync alone can have more users in future. This interface looks natural and simple. Oleg. -- To unsubscribe from this

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-05-26 Thread Oleg Nesterov
On 05/26, Oleg Nesterov wrote: > > On 05/26, Linus Torvalds wrote: > > > > > > We literally have one single percpu-rwsem IN THE WHOLE KERNEL TREE. > > > > One. > > Well. IIRC Tejun is going to turn signal_struct->group_rwsem into > percpu-rwsem. > > And it can have more users. Say, __sb_start_write

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-05-26 Thread Oleg Nesterov
On 05/26, Linus Torvalds wrote: > > On Tue, May 26, 2015 at 4:43 AM, Peter Zijlstra wrote: > > > > This is a derived work of the cpu hotplug lock rework I did in 2013 which > > never > > really went anywhere because Linus didn't like it. > > > > This applies those same optimizations to the percpu

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-05-26 Thread Davidlohr Bueso
On Tue, 2015-05-26 at 11:12 -0700, Linus Torvalds wrote: > On Tue, May 26, 2015 at 4:43 AM, Peter Zijlstra wrote: > > > > This is a derived work of the cpu hotplug lock rework I did in 2013 which > > never > > really went anywhere because Linus didn't like it. > > > > This applies those same opti

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-05-26 Thread Peter Zijlstra
On Tue, May 26, 2015 at 11:12:04AM -0700, Linus Torvalds wrote: > Is there some new use that I don't know about? TJ wants to use it in cgroups. lkml.kernel.org/r/1431549318-16756-3-git-send-email...@kernel.org -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bod

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-05-26 Thread Tejun Heo
Hello, Linus. On Tue, May 26, 2015 at 11:12:04AM -0700, Linus Torvalds wrote: ... > Is there some new use that I don't know about? Have people really > looked at that uprobes code deeply? OF COURSE global locks will have > problems, I'm not at all convinced that "let's make that global lock > real

Re: [RFC][PATCH 0/5] Optimize percpu-rwsem

2015-05-26 Thread Linus Torvalds
On Tue, May 26, 2015 at 4:43 AM, Peter Zijlstra wrote: > > This is a derived work of the cpu hotplug lock rework I did in 2013 which > never > really went anywhere because Linus didn't like it. > > This applies those same optimizations to the percpu-rwsem. Seeing how we did > all the work it seem

[RFC][PATCH 0/5] Optimize percpu-rwsem

2015-05-26 Thread Peter Zijlstra
Hi all, This is a derived work of the cpu hotplug lock rework I did in 2013 which never really went anywhere because Linus didn't like it. This applies those same optimizations to the percpu-rwsem. Seeing how we did all the work it seemed a waste to not use it at all. -- To unsubscribe from th