From: "jianchao.wang" <jianchao.w.wang@oracle.com>
To: Bart Van Assche <Bart.VanAssche@wdc.com>, "hch@lst.de" <hch@lst.de>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"israelr@mellanox.com" <israelr@mellanox.com>,
"sagi@grimberg.me" <sagi@grimberg.me>,
"sebott@linux.ibm.com" <sebott@linux.ibm.com>,
"axboe@kernel.dk" <axboe@kernel.dk>,
"ming.lei@redhat.com" <ming.lei@redhat.com>,
"maxg@mellanox.com" <maxg@mellanox.com>,
"tj@kernel.org" <tj@kernel.org>
Subject: Re: [PATCH] blk-mq: Rework blk-mq timeout handling again
Date: Mon, 14 May 2018 09:37:30 +0800 [thread overview]
Message-ID: <beab60f7-5fee-f1d8-12c3-c43d005d6427@oracle.com> (raw)
In-Reply-To: <13279046837412fd5cfe845a27e469a23125caf3.camel@wdc.com>
Hi bart
On 05/11/2018 11:29 PM, Bart Van Assche wrote:
> On Fri, 2018-05-11 at 14:35 +0200, Christoph Hellwig wrote:
>>> It should be due to union blk_deadline_and_state.
>>> +union blk_deadline_and_state {
>>> + struct {
>>> + uint32_t generation:30;
>>> + uint32_t state:2;
>>> + uint32_t deadline;
>>> + };
>>> + unsigned long legacy_deadline;
>>> + uint64_t das;
>>> +};
>>
>> Yikes. Or we just move it into a separate field. This patch already
>> shrinks struct request a lot, so I'd rather do that to keep it simple.
>
> Hello Christoph,
>
> Are you perhaps referring to the legacy_deadline field? Have you noticed that
> Jianchao used a legacy block layer function in blk-mq code and that that is
> why a wrong value for the deadline appeared in the trace output?
>
I use blk_rq_deadline because __blk_add_timer uses it.
-
/*
* If the timer isn't already pending or this timeout is earlier
* than an existing one, modify the timer. Round up to next nearest
* second.
*/
expiry = blk_rq_timeout(round_jiffies_up(blk_rq_deadline(req)));
-
if (!timer_pending(&q->timeout) ||
time_before(expiry, q->timeout.expires)) {
unsigned long diff = q->timeout.expires - expiry;
This is also the reason why there is no issue about timeout when test.
blk_rq_timeout will return reasonable value.
In addition, on a 64bit system, how do you set up the timer with a 32bit deadline ?
Thanks
Jianchao
next prev parent reply other threads:[~2018-05-14 1:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-10 17:56 [PATCH] blk-mq: Rework blk-mq timeout handling again Bart Van Assche
2018-05-11 12:06 ` jianchao.wang
2018-05-11 12:35 ` Christoph Hellwig
2018-05-11 15:29 ` Bart Van Assche
2018-05-14 1:37 ` jianchao.wang [this message]
2018-05-14 4:03 ` Bart Van Assche
2018-05-14 5:15 ` jianchao.wang
2018-05-14 18:44 ` Bart Van Assche
2018-05-11 15:26 ` Bart Van Assche
2018-05-14 1:48 ` jianchao.wang
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=beab60f7-5fee-f1d8-12c3-c43d005d6427@oracle.com \
--to=jianchao.w.wang@oracle.com \
--cc=Bart.VanAssche@wdc.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=israelr@mellanox.com \
--cc=linux-block@vger.kernel.org \
--cc=maxg@mellanox.com \
--cc=ming.lei@redhat.com \
--cc=sagi@grimberg.me \
--cc=sebott@linux.ibm.com \
--cc=tj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox