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 - : 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