public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Avi Kivity <avi@argo.co.il>
Cc: Alejandro Bonilla Beeche <abonilla@linuxwireless.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	hdaps devel <hdaps-devel@lists.sourceforge.net>
Subject: Re: HDAPS, Need to park the head for real
Date: Wed, 17 Aug 2005 09:56:13 +0200	[thread overview]
Message-ID: <20050817075611.GE6019@suse.de> (raw)
In-Reply-To: <4302EB80.7060705@argo.co.il>

On Wed, Aug 17 2005, Avi Kivity wrote:
> Jens Axboe wrote:
> 
> >Ok, I'll give you some hints to get you started... What you really want
> >to do, is:
> >
> >- Insert a park request at the front of the queue
> >- On completion callback on that request, freeze the block queue and
> > schedule it for unfreeze after a given time
> >
> > 
> >
> how will this interact with command queuing? there is a danger from both 
> commands previously queued but not yet completed, and commands that are 
> queued after the park request. or is the park request a barrier?

It doesn't interact with queueing, it doesn't matter what else is in the
queue. The park itself is not a barrier, since it should be placed as
next-to-execute at the front of the queue. Non-fs requests are never
reordered once inserted (since sorting on them doesn't make sense, the
io scheduler doesn't know what they are). Since the queue will not be
processed after the park has completed (it is frozen). So if the queue
currently looks like this:

[R0] <-> R1 <-> R2 <-> W1 <-> R3 <-> W2

(R is read, W is write, R0 is currently being processed), when you issue
the park the queue will look like:

[R0] <-> PARK <-> R1 <-> R2 <-> W1 <-> R3 <-> W2

Read completes, PARK will now be executed. While this happens, two more
writes are inserted somewhere in the queue. If successful, queue is
frozen in this state:

[] <-> R1 <-> W4 <-> R2 <-> W1 <-> W3 <-> R3 <-> W2

When the queue is thawed, R1 will be sent next.

-- 
Jens Axboe


  reply	other threads:[~2005-08-17  7:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-16 15:25 HDAPS, Need to park the head for real Alejandro Bonilla Beeche
2005-08-16 15:34 ` Lee Revell
2005-08-16 15:41   ` Alejandro Bonilla Beeche
2005-08-16 20:07 ` Jens Axboe
2005-08-16 23:15   ` Alejandro Bonilla Beeche
2005-08-16 23:29     ` [Hdaps-devel] " Yani Ioannou
2005-08-17  5:53     ` Jens Axboe
2005-08-17  6:23       ` [Hdaps-devel] " Jon Escombe
2005-08-17  7:47   ` Avi Kivity
2005-08-17  7:56     ` Jens Axboe [this message]
2005-08-18 20:49   ` Pavel Machek
2005-08-18 21:15     ` Adam Goode
2005-08-18 21:30       ` [Hdaps-devel] " Dave Hansen
2005-08-18 21:38       ` Pavel Machek
2005-08-19  6:36         ` Jens Axboe
2005-08-19 10:05           ` [Hdaps-devel] " Jon Escombe
2005-08-19 10:23             ` Jens Axboe
2005-08-19 12:41               ` Alejandro Bonilla
2005-08-24 21:44   ` Jon Escombe
2005-08-25 10:57     ` Alan Cox
2005-08-25 18:14       ` Jon Escombe
2005-08-26  6:49         ` Jens Axboe

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=20050817075611.GE6019@suse.de \
    --to=axboe@suse.de \
    --cc=abonilla@linuxwireless.org \
    --cc=avi@argo.co.il \
    --cc=hdaps-devel@lists.sourceforge.net \
    --cc=linux-kernel@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