Re: [PATCH] percpu-refcount: relax limit on percpu_ref_reinit()
From: Ming Lei
Date: Sun Sep 09 2018 - 22:28:02 EST
On Sun, Sep 09, 2018 at 11:46:20AM -0700, Bart Van Assche wrote:
> On Sun, 2018-09-09 at 20:58 +0800, Ming Lei wrote:
> > Now percpu_ref_reinit() can only be done on one percpu refcounter
> > when it drops zero. And the limit shouldn't be so strict, and it
> > is quite straightforward that percpu_ref_reinit() can be done when
> > this counter is at atomic mode.
> > This patch relaxes the limit, so we may avoid extra change for NVMe
> > timeout's requirement.
> >  https://marc.info/?l=linux-kernel&m=153612052611020&w=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?
IMO, this patch is quite simple and it should be much simpler than
solving this issue in block layer or NVMe, could we focus on the
technical correctness of this patch first?
However if anyone has better/simpler solution for this issue on any
change, I am open to them too.