All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Shaohua Li <shli@kernel.org>, linux-kernel@vger.kernel.org
Cc: hch@infradead.org, kmo@daterainc.com
Subject: Re: [patch 2/2]blk-mq: Don't reserve a tag for flush request
Date: Tue, 31 Dec 2013 09:12:33 -0700	[thread overview]
Message-ID: <52C2ECF1.3020808@kernel.dk> (raw)
In-Reply-To: <20131231033850.GB31994@kernel.org>

On 12/30/2013 08:38 PM, Shaohua Li wrote:
> 
> Reserving a tag (request) for flush to avoid dead lock is a overkill. tag is
> valuable resource. We can track flush request number and disallow too many
> pending flush requests allocated. With this patch,
> blk_mq_alloc_request_pinned() could do a busy nop (but not a dead loop) if too
> pending requests are allocated and new flush request is allocating. But this
> should not be a problem, too many pending flush requests are very rare case.
> 
> I verified this can fix the deadlock caused by too many pending flush requests.

I think this looks pretty good, and it's a lot better than the hack that
is currently in place. The atomic inc/dec should be a noop on a per-hctx
basis, especially when it's only per-flush...

I'll get this queued up, with the ida fix too.

-- 
Jens Axboe


      reply	other threads:[~2013-12-31 16:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-31  3:38 [patch 2/2]blk-mq: Don't reserve a tag for flush request Shaohua Li
2013-12-31 16:12 ` Jens Axboe [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=52C2ECF1.3020808@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=kmo@daterainc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shli@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.