Re: [PATCH 1/9] percpu-refcount: introduce percpu_ref_is_dead()

2017-09-01 Thread Ming Lei
On Fri, Sep 01, 2017 at 06:59:15AM -0700, Tejun Heo wrote: > Hello, Ming. > > > +/** > > + * percpu_ref_is_dead - test whether a percpu refcount is killed > > + * @ref: percpu_ref to test > > + * > > + * Returns %true if @ref is dead > > + * > > + * This function is safe to call as long as @ref

Re: [PATCH 1/9] percpu-refcount: introduce percpu_ref_is_dead()

2017-09-01 Thread Bart Van Assche
On Fri, 2017-09-01 at 06:59 -0700, Tejun Heo wrote: > > +/** > > + * percpu_ref_is_dead - test whether a percpu refcount is killed > > + * @ref: percpu_ref to test > > + * > > + * Returns %true if @ref is dead > > + * > > + * This function is safe to call as long as @ref is between init and exit.

Re: [PATCH 1/9] percpu-refcount: introduce percpu_ref_is_dead()

2017-09-01 Thread Tejun Heo
Hello, Ming. > +/** > + * percpu_ref_is_dead - test whether a percpu refcount is killed > + * @ref: percpu_ref to test > + * > + * Returns %true if @ref is dead > + * > + * This function is safe to call as long as @ref is between init and exit. > + */ > +static inline bool

Re: [PATCH 1/9] percpu-refcount: introduce percpu_ref_is_dead()

2017-08-31 Thread Ming Lei
On Thu, Aug 31, 2017 at 11:07:30PM +, Bart Van Assche wrote: > On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote: > > Inside block layer, we need to support to allocate request with > > RQF_PREEMPT even though queue is frozen. > > Hello Ming, > > Can patch 8/9 be reworked such that it

Re: [PATCH 1/9] percpu-refcount: introduce percpu_ref_is_dead()

2017-08-31 Thread Bart Van Assche
On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote: > Inside block layer, we need to support to allocate request with > RQF_PREEMPT even though queue is frozen. Hello Ming, Can patch 8/9 be reworked such that it doesn't need the new percpu_ref_is_dead() helper function, e.g. by checking

[PATCH 1/9] percpu-refcount: introduce percpu_ref_is_dead()

2017-08-31 Thread Ming Lei
Inside block layer, we need to support to allocate request with RQF_PREEMPT even though queue is frozen. So introduce this helper for checking if queue is frozen. Cc: Tejun Heo Signed-off-by: Ming Lei --- include/linux/percpu-refcount.h | 17