Re: [PATCH v4 06/16] locking/rwsem: Code cleanup after files merging

2019-04-16 Thread Waiman Long
On 04/16/2019 12:17 PM, Peter Zijlstra wrote: > On Tue, Apr 16, 2019 at 06:01:13PM +0200, Peter Zijlstra wrote: >> @@ -794,34 +770,38 @@ static inline int __down_read_trylock(st >> */ >> static inline void __down_write(struct rw_semaphore *sem) >> { >> -if

Re: [PATCH v4 06/16] locking/rwsem: Code cleanup after files merging

2019-04-16 Thread Peter Zijlstra
On Tue, Apr 16, 2019 at 06:01:13PM +0200, Peter Zijlstra wrote: > @@ -794,34 +770,38 @@ static inline int __down_read_trylock(st > */ > static inline void __down_write(struct rw_semaphore *sem) > { > - if (unlikely(atomic_long_cmpxchg_acquire(>count, 0, > -

Re: [PATCH v4 06/16] locking/rwsem: Code cleanup after files merging

2019-04-16 Thread Peter Zijlstra
More cleanups.. --- --- a/kernel/locking/rwsem.c +++ b/kernel/locking/rwsem.c @@ -303,7 +303,7 @@ static void __rwsem_mark_wake(struct rw_ list_del(>list); /* * Ensure calling get_task_struct() before setting the reader -* waiter

[PATCH v4 06/16] locking/rwsem: Code cleanup after files merging

2019-04-13 Thread Waiman Long
After merging all the relevant rwsem code into one single file, there are a number of optimizations and cleanups that can be done: 1) Remove all the EXPORT_SYMBOL() calls for functions that are not accessed elsewhere. 2) Remove all the __visible tags as none of the functions will be