From: "jianchao.wang" <jianchao.w.wang@oracle.com>
To: Bart Van Assche <bart.vanassche@wdc.com>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Tejun Heo <tj@kernel.org>, Ming Lei <ming.lei@redhat.com>,
Sebastian Ott <sebott@linux.ibm.com>,
Sagi Grimberg <sagi@grimberg.me>,
Israel Rukshin <israelr@mellanox.com>,
Max Gurtovoy <maxg@mellanox.com>
Subject: Re: [PATCH] blk-mq: Rework blk-mq timeout handling again
Date: Fri, 11 May 2018 20:06:29 +0800 [thread overview]
Message-ID: <73f77c62-25ca-0915-6f5b-452d60258f05@oracle.com> (raw)
In-Reply-To: <20180510175607.27937-1-bart.vanassche@wdc.com>
Hi bart
I add debug log in blk_mq_add_timer as following
void blk_mq_add_timer(struct request *req, enum mq_rq_state old,
enum mq_rq_state new)
{
struct request_queue *q = req->q;
if (!req->timeout)
req->timeout = q->rq_timeout;
if (!blk_mq_rq_set_deadline(req, jiffies + req->timeout, old, new))
WARN_ON_ONCE(true);
trace_printk("jiffies %lx to %x ldl %lx gen %u dl %x\n",
jiffies,
req->timeout,
blk_rq_deadline(req),
req->das.generation,
req->das.deadline);
return __blk_add_timer(req);
}
And get log below:
jbd2/sda2-8-320 [000] ...1 95.030824: blk_mq_add_timer: jiffies ffff37c0 to 1d4c ldl ffff550c40000000 gen 0 dl ffff550c
kworker/0:1H-136 [000] ...1 95.031822: blk_mq_add_timer: jiffies ffff37c0 to 1d4c ldl ffff550c40000000 gen 0 dl ffff550c
kworker/6:1H-244 [006] ...1 95.041695: blk_mq_add_timer: jiffies ffff37c3 to 1d4c ldl ffff550f40000000 gen 0 dl ffff550f
kworker/6:1H-244 [006] ...1 95.041954: blk_mq_add_timer: jiffies ffff37c3 to 1d4c ldl ffff550f40000000 gen 0 dl ffff550f
The blk_rq_deadline return ffff550c40000000 which looks really crazy.
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;
+};
And generation never change.
Thanks
Jianchao
next prev parent reply other threads:[~2018-05-11 12:06 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 [this message]
2018-05-11 12:35 ` Christoph Hellwig
2018-05-11 15:29 ` Bart Van Assche
2018-05-14 1:37 ` jianchao.wang
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=73f77c62-25ca-0915-6f5b-452d60258f05@oracle.com \
--to=jianchao.w.wang@oracle.com \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@wdc.com \
--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