From: Jens Axboe <jens.axboe@oracle.com>
To: Abhijeet Joglekar <ajoglekar@nuovasystems.com>
Cc: Matthew Wilcox <matthew@wil.cx>, linux-scsi@vger.kernel.org
Subject: Re: [RFC] [PATCH] Potential bug fix for blk_tag_queue
Date: Tue, 26 Aug 2008 10:58:52 +0200 [thread overview]
Message-ID: <20080826085852.GV20055@kernel.dk> (raw)
In-Reply-To: <34BDD2A93E5FD84594BB230DD6C18EA205B3437D@nuova-ex1.hq.nuovaimpresa.com>
(please don't top post!)
On Tue, Aug 26 2008, Abhijeet Joglekar wrote:
> Ok, removing that works too.
>
> Shouldn't the BUG_ON be checking upto bqt->real_max_depth instead of
> bqt->depth?
>
> BUG_ON(find_first_bit(bqt->tag_map, bqt->real_max_depth) <
> bqt->real_max_depth);
>
>
> In cases where the tag map gets resized to a value less than the
> originally allocated tag map, blk_queue_resize_tags seems to be setting
> bqt->max_depth to the new_depth.
>
> There could still be outstanding tags max_depth <= t <= real_max_depth
> which might not get freed, which the BUG_ON will not capture if it
> checks against max_depth.
max_depth is fine, it's the safer choice. For the real_max_depth to
potentially catch any extra offenders, you would have to do a resize to
a larger depth, get bunch of IO issued, then resize down and shut down
the queue. Using real_max_depth should work as well, but then you have
to audit the ending of tags > max/real_max_depth. It looks ok, though.
--
Jens Axboe
prev parent reply other threads:[~2008-08-26 8:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-26 1:03 [RFC] [PATCH] Potential bug fix for blk_tag_queue Abhijeet Joglekar
2008-08-26 1:03 ` [RFC][PATCH] blk-tag: Use atomic_t type for bqt->busy Abhijeet Joglekar
2008-08-26 2:46 ` [RFC] [PATCH] Potential bug fix for blk_tag_queue Matthew Wilcox
2008-08-26 7:00 ` Jens Axboe
2008-08-26 7:49 ` Abhijeet Joglekar
2008-08-26 8:58 ` 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=20080826085852.GV20055@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=ajoglekar@nuovasystems.com \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/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.