Re: A question on RCU vs. preempt-RCU

2013-06-19 Thread Steven Rostedt
On Tue, Jun 18, 2013 at 02:51:13PM +0930, Rusty Russell wrote: > Tejun Heo writes: > > Buth yeah, interesting trick. We'll be doing IPIs, flushing TLB and > > taking faults until it hits zero. It'll all depend on the frequency > > of preemption but given that branches don't tend to be too expens

Re: A question on RCU vs. preempt-RCU

2013-06-18 Thread Rusty Russell
Tejun Heo writes: > Buth yeah, interesting trick. We'll be doing IPIs, flushing TLB and > taking faults until it hits zero. It'll all depend on the frequency > of preemption but given that branches don't tend to be too expensive > on modern processors, maybe it'd be a bit too hairy for possibly

Re: A question on RCU vs. preempt-RCU

2013-06-17 Thread Tejun Heo
Hello, Rusty. On Sun, Jun 16, 2013 at 04:16:15PM +0930, Rusty Russell wrote: > > For most use cases, the trade-off should be fine. With any kind of > > cross-cpu traffic, which there usually will be, it should be an easy > > win for the percpu-refcount even when CONFIG_PREEMPT; however, I've > >

Re: A question on RCU vs. preempt-RCU

2013-06-16 Thread Rusty Russell
Tejun Heo writes: > I've been running some performance tests with different preemption > levels and, with CONFIG_PREEMPT, the percpu ref could be slower by > around 10% or at the worst contrived case maybe even close to 20% when > compared to simple atomic_t on a single CPU (when hit by multiple C

Re: A question on RCU vs. preempt-RCU

2013-06-16 Thread Tejun Heo
Hello, Paul. On Sun, Jun 16, 2013 at 07:13:35AM -0700, Paul E. McKenney wrote: > CONFIG_TREE_PREEMPT_RCU does have an increment, decrement (sort of), > and check in its rcu_read_lock() and rcu_read_unlock(), which will > add overhead that might well be noticeable compared to CONFIG_TREE_RCU's > ze

Re: A question on RCU vs. preempt-RCU

2013-06-16 Thread Paul E. McKenney
On Sat, Jun 15, 2013 at 07:36:11PM -0700, Tejun Heo wrote: > Hello, guys. > > Kent recently implemented a generic percpu reference counter. It's > scheduled to be merged in the coming merge window and some part of > cgroup refcnting is already converted to it. > > > https://git.kernel.org/cgit

A question on RCU vs. preempt-RCU

2013-06-15 Thread Tejun Heo
Hello, guys. Kent recently implemented a generic percpu reference counter. It's scheduled to be merged in the coming merge window and some part of cgroup refcnting is already converted to it. https://git.kernel.org/cgit/linux/kernel/git/tj/percpu.git/tree/include/linux/percpu-refcount.h?h=for-