Re: [PATCH 2/2] percpu-rw-semaphores: use rcu_read_lock_sched

2012-10-25 Thread Mikulas Patocka
On Thu, 25 Oct 2012, Paul E. McKenney wrote: > On Thu, Oct 25, 2012 at 10:54:11AM -0400, Mikulas Patocka wrote: > > > > > > On Wed, 24 Oct 2012, Paul E. McKenney wrote: > > > > > On Mon, Oct 22, 2012 at 07:39:16PM -0400, Mikulas Patocka wrote: > > > > Use rcu_read_lock_sched / rcu_read_unlock

Re: [PATCH 2/2] percpu-rw-semaphores: use rcu_read_lock_sched

2012-10-25 Thread Paul E. McKenney
On Thu, Oct 25, 2012 at 10:54:11AM -0400, Mikulas Patocka wrote: > > > On Wed, 24 Oct 2012, Paul E. McKenney wrote: > > > On Mon, Oct 22, 2012 at 07:39:16PM -0400, Mikulas Patocka wrote: > > > Use rcu_read_lock_sched / rcu_read_unlock_sched / synchronize_sched > > > instead of rcu_read_lock / rc

Re: [PATCH 2/2] percpu-rw-semaphores: use rcu_read_lock_sched

2012-10-25 Thread Mikulas Patocka
On Wed, 24 Oct 2012, Paul E. McKenney wrote: > On Mon, Oct 22, 2012 at 07:39:16PM -0400, Mikulas Patocka wrote: > > Use rcu_read_lock_sched / rcu_read_unlock_sched / synchronize_sched > > instead of rcu_read_lock / rcu_read_unlock / synchronize_rcu. > > > > This is an optimization. The RCU-prot

Re: [PATCH 2/2] percpu-rw-semaphores: use rcu_read_lock_sched

2012-10-24 Thread Paul E. McKenney
On Wed, Oct 24, 2012 at 08:43:11PM +0200, Oleg Nesterov wrote: > On 10/24, Paul E. McKenney wrote: > > > > On Wed, Oct 24, 2012 at 07:18:55PM +0200, Oleg Nesterov wrote: > > > On 10/24, Paul E. McKenney wrote: > > > > > > > > static inline void percpu_up_read(struct percpu_rw_semaphore *p) > > > >

Re: [PATCH 2/2] percpu-rw-semaphores: use rcu_read_lock_sched

2012-10-24 Thread Oleg Nesterov
On 10/24, Paul E. McKenney wrote: > > On Wed, Oct 24, 2012 at 07:18:55PM +0200, Oleg Nesterov wrote: > > On 10/24, Paul E. McKenney wrote: > > > > > > static inline void percpu_up_read(struct percpu_rw_semaphore *p) > > > { > > > /* > > >* Decrement our count, but protected by RCU-sched so th

Re: [PATCH 2/2] percpu-rw-semaphores: use rcu_read_lock_sched

2012-10-24 Thread Paul E. McKenney
On Wed, Oct 24, 2012 at 07:18:55PM +0200, Oleg Nesterov wrote: > On 10/24, Paul E. McKenney wrote: > > > > static inline void percpu_up_read(struct percpu_rw_semaphore *p) > > { > > /* > > * Decrement our count, but protected by RCU-sched so that > > * the writer can force proper seri

Re: [PATCH 2/2] percpu-rw-semaphores: use rcu_read_lock_sched

2012-10-24 Thread Oleg Nesterov
On 10/24, Paul E. McKenney wrote: > > static inline void percpu_up_read(struct percpu_rw_semaphore *p) > { > /* >* Decrement our count, but protected by RCU-sched so that >* the writer can force proper serialization. >*/ > rcu_read_lock_sched(); > this_cpu_

Re: [PATCH 2/2] percpu-rw-semaphores: use rcu_read_lock_sched

2012-10-24 Thread Paul E. McKenney
On Mon, Oct 22, 2012 at 07:39:16PM -0400, Mikulas Patocka wrote: > Use rcu_read_lock_sched / rcu_read_unlock_sched / synchronize_sched > instead of rcu_read_lock / rcu_read_unlock / synchronize_rcu. > > This is an optimization. The RCU-protected region is very small, so > there will be no latency

[PATCH 2/2] percpu-rw-semaphores: use rcu_read_lock_sched

2012-10-22 Thread Mikulas Patocka
Use rcu_read_lock_sched / rcu_read_unlock_sched / synchronize_sched instead of rcu_read_lock / rcu_read_unlock / synchronize_rcu. This is an optimization. The RCU-protected region is very small, so there will be no latency problems if we disable preempt in this region. So we use rcu_read_lock_sch