mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: axboe@kernel.dk, akinobu.mita@gmail.com, tom.leiming@gmail.com
Cc: kent.overstreet@gmail.com, cl@linux-foundation.org,
	linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCHSET percpu/for-4.4] percpu_ref: make mode switching operations synchronize themselves
Date: Wed, 10 Aug 2016 15:06:26 -0400	[thread overview]
Message-ID: <20160810190626.GO25053@mtj.duckdns.org> (raw)
In-Reply-To: <1443563240-29306-1-git-send-email-tj@kernel.org>

On Tue, Sep 29, 2015 at 05:47:15PM -0400, Tejun Heo wrote:
> Hello,
> 
> Mostly for historical reasons, percpu_ref atomic/percpu mode switching
> operations require the users to synchronize different operations
> although there are valid usage scenarios where different types of
> operations racing against each other makes sense.  This unusual
> requirement led to a subtle race condition in blk-mq which was spotted
> by Akinobu Mita[1].
> 
> Akinobu proposed a blk-mq specific fix where it adds an enclosing
> mutex around the percpu_ref operations; however, this is a percpu_ref
> deficiency and fixing it at the source is the better long term
> approach.  Unfortunately, this ended up being a somewhat invasive set
> of changes and the right thing to do likely is applying Akinobu's fix
> for 4.3 / -stable, applying this patchset for 4.4 window and reverting
> Akinobu's patch after the 4.4 merge window.
> 
> Akinobu, can you please verify that this patchset makes the race
> condition go away?

Okay, this patchset got forgotten while waiting response from Akinobu.
I'm applying the patchset to percpu/for-4.9 as the changes are general
improvements to percpu_refcnt.

Thanks.

-- 
tejun

      parent reply	other threads:[~2016-08-10 19:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 21:47 Tejun Heo
2015-09-29 21:47 ` [PATCH 1/5] percpu_ref: remove unnecessary RCU grace period for staggered atomic switching confirmation Tejun Heo
2015-09-29 21:47 ` [PATCH 2/5] percpu_ref: reorganize __percpu_ref_switch_to_atomic() and relocate percpu_ref_switch_to_atomic() Tejun Heo
2015-09-29 21:47 ` [PATCH 3/5] percpu_ref: unify staggered atomic switching wait behavior Tejun Heo
2015-09-29 21:47 ` [PATCH 4/5] percpu_ref: restructure operation mode switching Tejun Heo
2015-09-29 21:47 ` [PATCH 5/5] percpu_ref: allow operation mode switching operations to be called concurrently Tejun Heo
2016-08-10 19:06 ` Tejun Heo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160810190626.GO25053@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=akinobu.mita@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=cl@linux-foundation.org \
    --cc=kent.overstreet@gmail.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tom.leiming@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®