linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: shaohua.li@intel.com, linux-kernel@vger.kernel.org,
	linux-ide@vger.kernel.org, jaxboe@fusionio.com,
	hch@infradead.org, jgarzik@pobox.com, djwong@us.ibm.com,
	sshtylyov@mvista.com,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-scsi@vger.kernel.org, ricwheeler@gmail.com
Subject: Re: [patch v3 2/3] block: hold queue if flush is running for non-queueable flush drive
Date: Mon, 9 May 2011 09:03:16 -0400	[thread overview]
Message-ID: <20110509130316.GB5975@redhat.com> (raw)
In-Reply-To: <20110505083853.GC30950@htj.dyndns.org>

On Thu, May 05, 2011 at 10:38:53AM +0200, Tejun Heo wrote:

[..]
> Similarly, I'd like to suggest something like the following.
> 
> 		/*
> 		 * Hold dispatching of regular requests if non-queueable
> 		 * flush is in progress; otherwise, the low level driver
> 		 * would keep dispatching IO requests just to requeue them
> 		 * until the flush finishes, which not only adds
> 		 * dispatching / requeueing overhead but may also
> 		 * significantly affect throughput when multiple flushes
> 		 * are issued back-to-back.  Please consider the following
> 		 * scenario.
> 		 *
> 		 * - flush1 is dispatched with write1 in the elevator.
> 		 *
> 		 * - Driver dispatches write1 and requeues it.
> 		 *
> 		 * - flush2 is issued and appended to dispatch queue after
> 		 *   the requeued write1.  As write1 has been requeued
> 		 *   flush2 can't be put in front of it.
> 		 *
> 		 * - When flush1 finishes, the driver has to process write1
> 		 *   before flush2 even though there's no fundamental
> 		 *   reason flush2 can't be processed first and, when two
> 		 *   flushes are issued back-to-back without intervening
> 		 *   writes, the second one essentially becomes noop.
> 		 *
> 		 * This phenomena becomes quite visible under heavy
> 		 * concurrent fsync workload and holding the queue while
> 		 * flush is in progress leads to significant throughput
> 		 * gain.
> 		 */

Tejun,

I am assuming that these back-to-back flushes are independent of each
other otherwise write request will anyway get between two flushes.

If that's the case, then should we solve the problem by improving flush
merge logic a bit better. (Say idle a bit before issuing a flush only
if request queue is not empty).

That way multiple back to back flushes can be merged without taking a hit on
throughput and we can avoid this special casing whether driver can queue the
flush or not.

Thanks
Vivek

  parent reply	other threads:[~2011-05-09 13:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110505015932.306763905@sli10-conroe.sh.intel.com>
     [not found] ` <20110505020417.817084678@sli10-conroe.sh.intel.com>
2011-05-05  8:38   ` [patch v3 2/3] block: hold queue if flush is running for non-queueable flush drive Tejun Heo
2011-05-06  4:32     ` Shaohua Li
2011-05-06  6:53       ` Tejun Heo
2011-05-06 17:28         ` Jens Axboe
2011-05-09 13:03     ` Vivek Goyal [this message]
2011-05-09 13:50       ` Shaohua Li
2011-05-09 13:58         ` Vivek Goyal
2011-05-09 14:37           ` Tejun Heo

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=20110509130316.GB5975@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=djwong@us.ibm.com \
    --cc=hch@infradead.org \
    --cc=jaxboe@fusionio.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ricwheeler@gmail.com \
    --cc=shaohua.li@intel.com \
    --cc=sshtylyov@mvista.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;
as well as URLs for NNTP newsgroup(s).