From: Daeho Jeong <daeho.jeong@samsung.com>
To: axboe@fb.com
Cc: linux-block@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Question about CFQ queue preemption with REQ_PRIO
Date: Tue, 29 Mar 2016 03:08:42 +0000 (GMT) [thread overview]
Message-ID: <742004835.98611459220921290.JavaMail.weblogic@epmlwas04d> (raw)
Hi,
First of all, I am a big fan of the CFQ I/O scheduler. Thank you for your contribution. :-)
I have a question about the below CFQ queue preemption condition in cfq_should_preempt().
/*
* So both queues are sync. Let the new request get disk time if
* it's a metadata request and the current queue is doing regular IO.
*/
if ((rq->cmd_flags & REQ_PRIO) && !cfqq->prio_pending)
return true;
Normally, REQ_PRIO flag is used for READ requests for reading metadata, so then, the CFQ
queue containing "rq" must be a SYNC queue and cfqq is also a SYNC queue because we
already passed through the below condition. Therefore, the comment "So both queues are sync"
is TRUE.
if (rq_is_sync(rq) && !cfq_cfqq_sync(cfqq))
return true;
But, I am wordering about the case of that an asynchronous WRITE request with REQ_PRIO
is inserted into the request queue. Actually, ext4 metadata are submitted as asynchronous
WRITE requests with REQ_PRIO by kworker. In this case, asynchronous WRITE requests can
preempt synchronous READ requests. Anyways, I think ext4 metadata write should have
priority for better filesystem call responsiveness, but the comment in the source code,
"So both queues are sync", makes me a little confused.
Could you explain about the meaning of the comment in the source code?
Best Regards,
reply other threads:[~2016-03-29 3:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=742004835.98611459220921290.JavaMail.weblogic@epmlwas04d \
--to=daeho.jeong@samsung.com \
--cc=axboe@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-ext4@vger.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;
as well as URLs for NNTP newsgroup(s).