Re: [PATCH] percpu-refcount: support synchronous switch to atomic mode.

2017-03-22 Thread Shaohua Li
On Wed, Mar 22, 2017 at 11:00:29AM -0400, Tejun Heo wrote: > On Wed, Mar 22, 2017 at 12:50:12PM +1100, NeilBrown wrote: > > > > percpu_ref_switch_to_atomic_sync() schedules the switch > > to atomic mode, then waits for it to complete. > > > > Also export percpu_ref_switch_to_* so they can be used

Re: [PATCH] percpu-refcount: support synchronous switch to atomic mode.

2017-03-22 Thread Tejun Heo
On Wed, Mar 22, 2017 at 12:50:12PM +1100, NeilBrown wrote: > > percpu_ref_switch_to_atomic_sync() schedules the switch > to atomic mode, then waits for it to complete. > > Also export percpu_ref_switch_to_* so they can be used from modules. > > This will be used in md/raid to count the number of

[PATCH] percpu-refcount: support synchronous switch to atomic mode.

2017-03-21 Thread NeilBrown
percpu_ref_switch_to_atomic_sync() schedules the switch to atomic mode, then waits for it to complete. Also export percpu_ref_switch_to_* so they can be used from modules. This will be used in md/raid to count the number of pending write requests to an array. We occasionally need to check if the