Messages in this thread | | | Date | Fri, 5 Jun 2015 23:08:57 +0200 | From | Oleg Nesterov <> | Subject | Re: [RFC][PATCH 0/5] Optimize percpu-rwsem |
| |
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 this CPU's spinlock. And removals > take pretty much a random one - losing the timeslice and regaining it on > a different CPU is quite likely with the uses there. > > Why do we need a global lock there, anyway? Why not hold only one for > the chain currently being traversed? Sure, we'll need to get and drop > them in ->next() that way; so what?
And note that fs/seq_file.c:seq_hlist_next_percpu() has no other users.
And given that locks_delete_global_locks() takes the random lock anyway, perhaps the hashed lists/locking makes no sense, I dunno.
Oleg.
| |