Messages in this thread | | | Date | Wed, 5 Jun 2013 00:44:12 -0700 | From | Tejun Heo <> | Subject | Re: [PATCH] Generic percpu refcounting |
| |
On Wed, Jun 05, 2013 at 05:05:09PM +0930, Rusty Russell wrote: > I think this should be rcu_read_lock(), which is currently equivalent > but theoretically different.
I suggested using preempt_disable/enable() along with sched RCU. I thought that was better for some reason but I was probably misremembering something. rcu_read_lock/unlock() w/ synchronize_rcu() should be fine too. I don't care either way.
> Does your percpu_ref_kill() *really* need to be nonblocking? (I'd have > to read your other patches which use this to be sure). Otherwise, just > use synchronize_rcu(), and get rid of the release function...
synchronize_rcu() can always become problematic and should always be avoided for generic things which may be used in various ways. They develop into very long latencies pretty quickly when chained back to back.
Thanks.
-- tejun
| |