linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] AHCI Command Completion Coalescing(CCC) proposal
@ 2006-06-08  7:30 zhao, forrest
  2006-06-08 15:01 ` Jeff Garzik
  0 siblings, 1 reply; 24+ messages in thread
From: zhao, forrest @ 2006-06-08  7:30 UTC (permalink / raw)
  To: jgarzik, htejun; +Cc: linux-ide

Hello, all

0 Why this RFC?
Although AHCI spec 1.1 provides a detailed explanation about how to play
with CCC-related registers to enable CCC, several CCC-policy-related
parameters need to be defined(or the consensus need to be achieved)
before we start to write the code.

1 What is CCC used for?
As described in AHCI spec 1.1, "CCC is a feature designed to reduce the
interrupt and command completion overhead in a heavily loaded system.
The feature enables the number of interrupts taken per completion to be
reduced significantly, while ensuring a minimum quality of service for
command completions. When a software specified number of commands have
completed or a software specified timeout has expired, an interrupt is
generated by hardware to allow software to process completed commands."

2 When is CCC activated?
As stated above, CCC is useful only if the system is heavily loaded. So
CCC should be activated when the system is heavily loaded. Then the
question is how to determine whether the system is heavily-loaded or
not? In other words, how many interrupts generated per second can be
defined as "heavily-loaded system"? Does it make sense to define "1000
IRQs per second" as a heavily-loaded system?

3 What should the software specified number of commands be?
>From my understanding, the measurement of "IRQ numbers per second"
should be based on per-port instead of all ports of a SATA controller.
For NCQ, the usable command slots for each port is 31(the 32nd command
slot is reserved for internal command), so the software specified number
of commands should be 31*n (n is the number of ports, which is selected
to join CCC).
For non-NCQ, the usable command slots for each port is 32, so the
software specified number of commands should be 32*n.

4 What should the software specified timeout be?
I don't have the strong reasoning of a specific timeout value. 500ms? or
1000ms? We should trade-off between the delay and overhead.

5 When is CCC de-activated?
When the port becomes lightly-loaded, we should de-activate CCC of this
port. Otherwise the unnecessary delay would be introduced. However we
should not de-activate CCC of a port immediately when IRQ's per second
drops down the threshold in order to avoid jitter. My suggestion is that
if consecutive 3 timeout occurs, then we de-activate CCC of a port with
least "IRQ's per second".

Your comments are welcome.

Thanks,
Forrest

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2006-06-15 11:47 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-08  7:30 [RFC] AHCI Command Completion Coalescing(CCC) proposal zhao, forrest
2006-06-08 15:01 ` Jeff Garzik
2006-06-09  2:27   ` zhao, forrest
2006-06-09  3:11     ` Another project for you... :) Jeff Garzik
2006-06-09  3:13       ` zhao, forrest
2006-06-09 22:29         ` Greg Freemyer
2006-06-09 23:44           ` Alan Cox
2006-06-09  3:43       ` [RFC] ATA host-protected area (HPA) device mapper? Jeff Garzik
2006-06-09  4:51         ` Matthew Frost
2006-06-14  8:01       ` Another project for you... :) zhao, forrest
2006-06-14 15:19         ` Randy.Dunlap
2006-06-15  7:59           ` zhao, forrest
2006-06-15 11:47             ` Jeff Garzik
2006-06-09  3:30     ` [RFC] AHCI Command Completion Coalescing(CCC) proposal Jeff Garzik
2006-06-09  3:39       ` zhao, forrest
2006-06-09  3:43       ` Tejun Heo
2006-06-09  3:47         ` Tejun Heo
2006-06-09  3:51           ` zhao, forrest
2006-06-09  4:12             ` Jeff Garzik
2006-06-09  5:24             ` Tejun Heo
2006-06-09 11:49               ` Jens Axboe
2006-06-09  3:53           ` Jeff Garzik
2006-06-09  3:52         ` Jeff Garzik
2006-06-09 11:49         ` Jens Axboe

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