linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about CFQ queue preemption with REQ_PRIO
@ 2016-03-29  3:08 Daeho Jeong
  0 siblings, 0 replies; only message in thread
From: Daeho Jeong @ 2016-03-29  3:08 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-ext4

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,


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-29  3:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-29  3:08 Question about CFQ queue preemption with REQ_PRIO Daeho Jeong

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).