From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: alan@lxorguk.ukuu.org.uk, linux-ide@vger.kernel.org
Subject: Re: [PATCHSET] prep for PMP support, take 3
Date: Wed, 01 Nov 2006 13:25:17 +0900 [thread overview]
Message-ID: <454821AD.5060909@gmail.com> (raw)
In-Reply-To: <454804CB.9030805@pobox.com>
Jeff Garzik wrote:
> Weak ACK for the patchset:
>
> SET FEATURES - XFER MODE also needs to use the defer capability.
We need to reconfigure the controller and revalidate devices after XFER
MODE, so simple command exclusion isn't enough for XFER MODE. I think
we need EH level synchronization. e.g. Something like the following.
* Controller has two ports portA and portB. It needs host-wide
exclusion for XFER_MODE and the associated controller reprogramming.
1. User (or whatever) issues XFER MODE for portA.
2. portA EH is invoked for XFER MODE. (local exclusion automatically
achieved)
3. portA EH asks portB EH to participate in host-wide exclusion.
4. portB EH is invoked and waits for port A EH to complete.
5. portA EH now has host-wide exclusion. Do XFER MODE, reprogram
controller and revalidate.
6. portA EH tells portB EH that it's free to go and portA resumes.
7. portB resumes.
> And we also have such a need for simplex devices. It would be useful
> to have all of this stuff collected into an "ATA command scheduling /
> sequencing" area, rather than just a new hook confined to a single
> area. I think the problem space is more complex than that.
For simplex controllers, I dunno. The current code depends on SCSI
midlayer for command queue management and, as each ATA port is
represented as separate SCSI host, it's difficult to implement
cross-host exclusion properly. Also, are simplex controllers big deal?
Aren't they mostly historical?
So, although per-host scheduling by asking SCSI midlayer to retry on
certain conditions is a bit crude, I think it covers most common use
cases (NCQ, PMP and whatever port level exclusion).
As you pointed out previously, it would be better if we can do it via
return value of ->qc_prep or ->qc_issue, but we can't because a prepped
qc cannot be given back to SCSI queue for retrial, which makes the
separation between ->qc_prep and ->qc_issue meaningless at the moment.
So, we end up with, ->qc_defer (before qc prep) and ->qc_prep/issue
(after qc prep).
Thanks.
--
tejun
prev parent reply other threads:[~2006-11-01 4:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-15 23:17 [PATCHSET] prep for PMP support, take 3 Tejun Heo
2006-10-15 23:17 ` [PATCH 4/5] [PATCH] libata-pmp-prep: implement ops->qc_defer() Tejun Heo
2006-10-15 23:17 ` [PATCH 5/5] [PATCH] libata-pmp-prep: implement qc_defer helpers Tejun Heo
2006-10-15 23:17 ` [PATCH 3/5] [PATCH] libata-pmp-prep: add @is_cmd to ata_tf_to_fis() Tejun Heo
2006-10-15 23:17 ` [PATCH 1/5] [PATCH] libata-pmp-prep: add @new_class to ata_dev_revalidate() Tejun Heo
2006-10-15 23:17 ` [PATCH 2/5] [PATCH] libata-pmp-prep: make a number of functions global to libata Tejun Heo
2006-10-15 23:41 ` [PATCHSET] prep for PMP support, take 3 Tejun Heo
2006-11-01 2:22 ` Jeff Garzik
2006-11-01 4:25 ` Tejun Heo [this message]
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=454821AD.5060909@gmail.com \
--to=htejun@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jgarzik@pobox.com \
--cc=linux-ide@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).