Re: [PATCH] percpu-refcount: relax limit on percpu_ref_reinit()

From: Bart Van Assche
Date: Sun Sep 09 2018 - 14:47:18 EST


On Sun, 2018-09-09 at 20:58 +-0800, Ming Lei wrote:
+AD4 Now percpu+AF8-ref+AF8-reinit() can only be done on one percpu refcounter
+AD4 when it drops zero. And the limit shouldn't be so strict, and it
+AD4 is quite straightforward that percpu+AF8-ref+AF8-reinit() can be done when
+AD4 this counter is at atomic mode.
+AD4
+AD4 This patch relaxes the limit, so we may avoid extra change+AFs-1+AF0 for NVMe
+AD4 timeout's requirement.
+AD4
+AD4 +AFs-1+AF0 https://marc.info/?l+AD0-linux-kernel+ACY-m+AD0-153612052611020+ACY-w+AD0-2

Is the NVMe driver the only block driver that hangs if it is attempted to
freeze its request queue when a request times out? If so, can this hang be
fixed by modifying the NVMe driver instead of by modifying the percpu
refcount implementation?

Thanks,

Bart.