The present invention will be further understood from the following detailed description with reference to the drawings in which:
a, 1b, and 1c illustrate a known queue;
a and 2b illustrate a known apparatus for managing the queue of
Referring to
Referring to
In operation, once the STOP_REPORT threshold 30 is reached 46 the queue 10 enters STOP_REPORT state 44 and does not report empty queue slots to network 16. Once STOP_REPORT state 44 is entered, the count down timer 40 is loaded and starts counting down. Once the count down timer 40 reaches zero 48, the queue 10 exits the STOP_REPORT state 44 even if RESUME_REPORT threshold 32 has not been achieved. Once the queue 10 exits the STOP_REPORT state 44, it reports all empty queue slots to network 16. If deadlock had occurred, the STOP_REPORT count down timer 40 allows the queue 10 to exit the deadlock state by exiting the STOP_REPORT state 44.
Choosing a duration of STOP_REPORT count down timer is system dependent, but the following should be considered. If the duration is too short, then the queue 10 does not have a chance to reach the Resume_REPORT threshold 32, consequently starvation may occur. If the duration is too long, then performance of the system may degrade. A suggested timer length is equal to time required to transmit the number of packets between the STOP_REPORT threshold 30 and the RESUME_REPORT threshold 32, assuming that these are maximum length packets. Preferably the timer duration is programmable. A maximum timer value is in the same order as time required to clear the entire queue.
Referring to
In operation, the queue 50 enters the STOP_REPORT state 44 when the P0_STOP_REPORT threshold 62 for the lowest priority is reached. In this case, a P0_STOP_REPORT 62 is the lowest priority threshold. The queue exits the STOP_REPORT state 44, if: Buffer fill drops to P0_Resume_Report threshold 64 OR the count-down timer 65 expires. Note regarding relationship between WP and thermometer threshold:
Since there is only one STOP threshold 62 and one RESUME threshold 64, there is only need for one timer. The P0 timer 65 protects the entire queue from deadlock.
Choosing a value of RESUME_REPORT. The thermometer circuit frees the buffers back to two possible sources: network or preceding FIFO
Freeing buffers to network:
Freeing buffers to preceding Queue
Referring to
The queue 50 exits STOP_REPORT state 68 and clears count-down timer 65 when: timer expires 72 OR buffer_fill=RESUME_REPORT threshold 74. If the count-down timer 65 expires prior to reaching P0_RESUME_REPORT 64 then enter state 67 and do not reactivate thermometer again until you have reached P0_RESUME_REPORT 64.
The thermometer circuit is meant to avoid, but not prevent starvation. If the count-down timer 65 expires and the queue 50 has not reached P0_RESUME_REPORT threshold 64, then the down-stream link must be congested. We do not want to re-arm the thermometer state machine under congestion conditions because we want to continue sending the high priority traffic. Re-arming the state-machine slows that traffic down due to the timer. Sending the high priority traffic should clear up outstanding operations at the endpoints. Clearing these outstanding operations allows low-priority traffic to flow again.
Referring to
The queue 50 exits 78 STOP_REPORT state 68 and clears count-down timer when: timer expires 76 OR buffer_fill=P0_RESUME_REPORT 78. This means that if the count-down timer 65 expires prior to reaching P0_RESUME_REPORT the thermometer re-activates again (including Count-down timer) when a packet insertion into the queue causes the fill level to increase.
If we do not re-arm the thermometer circuit then we risk starving P0 (and maybe P1) when there is congestion in the down-stream devices that prevent forward progress.
Referring to
In operation, multiple thresholds allow P1 and P2 traffic to progress while starving P0 traffic. Multiple thresholds also ensure P0 and P1 traffic progresses in the absence of P2 traffic. This is achieved by setting the P0_STOP_REPORT threshold at a higher queue fill that the P1_STOP_REPORT. By letting P0 traffic through after the P0_RESUME_REPORT has been reached and until the P1_RESUME_REPORT has been reached and both timers reset.
Having a P1_STOP_REPORT may seem redundant because to reach that threshold, one needs to have crossed the P0_STOP_REPORT threshold. However, one may wish to have multiple stop states corresponding to traffic priority. Having a P1_RESUME_REPORT protects P1 from starvation by P2, but may allow P1 and P2 to starve P0.
Referring to
Numerous modifications, variations and adaptations may be made to the particular embodiments described above without departing from the scope patent disclosure, which is defined in the claims.
A claim of priority is made to U.S. Provisional Patent Application Ser. No. 60/824,880, entitled Method and Apparatus for Managing Queues, filed Sep. 7, 2006.
Number | Date | Country | |
---|---|---|---|
60824880 | Sep 2006 | US |