LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Yuehai Xu <yuehaixu@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>, yhxu@wayne.edu
Subject: How does CFQ handle the fairness of process write
Date: Sat, 22 Jan 2011 19:49:37 -0500	[thread overview]
Message-ID: <AANLkTimCMnjBM5naA1Wzb_FiW7bsVcb1DRyffTizDp_Z@mail.gmail.com> (raw)

Hi all,

Suppose there are two processes writing lots of data to disk, these
data are written to cache at first, and then, kernel threads might
flush them to disk later. However, from the point of block device, the
kernel thread is just another process that issues write requests. So,
how does CFQ handle the fairness between the two processes? It is
impossible for CFQ to keep the fairness of the two queues for each
process since many write requests are dispatched by kernel thread,
which has another queue in CFQ. And both the requests from two
processes are mixed together in this kernel thread queue.

Is this description correct? In that case, how does CFQ keep the
fairness for two processes since CFQ seems unable to know the exact
process the request belongs to.

I appreciate your help.

Thanks,
Yuehai

             reply	other threads:[~2011-01-23  0:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-23  0:49 Yuehai Xu [this message]
2011-01-24  8:32 ` Nauman Rafique

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=AANLkTimCMnjBM5naA1Wzb_FiW7bsVcb1DRyffTizDp_Z@mail.gmail.com \
    --to=yuehaixu@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yhxu@wayne.edu \
    --subject='Re: How does CFQ handle the fairness of process write' \
    /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

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