Re: [PATCHSET] prep for PMP support, take 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux