Claims
- 1. A scheduler for a network processor, the scheduler comprising:
one or more scheduling queues each adapted to define a sequence in which flows are to be serviced, at least one scheduling queue including at least a first subqueue and a second subqueue, the first subqueue having a first range and a first resolution, and the second subqueue having a second range that is greater than the first range and a second resolution that is less than the first resolution.
- 2. The scheduler of claim 1, wherein the first subqueue has a number of slots that is equal to a number of slots of the second subqueue.
- 3. The scheduler of claim 1, wherein the first subqueue has a number of slots that is different than a number of slots of the second subqueue.
- 4. The scheduler of claim 1, wherein the second range and the second resolution have a direct inverse relationship.
- 5. The scheduler of claim 1, wherein the second range and the second resolution have other than a direct inverse relationship.
- 6. The scheduler of claim 1, wherein the scheduling queue includes a third subqueue having a third range that is greater than the second range and a third resolution that is less than the second resolution.
- 7. A scheduler for a network processor, the scheduler comprising a scheduling queue in which flows are enqueued according to the formula CP+((WF×FS)/SF) wherein:
CP is a pointer for indicating a current position in the scheduling queue; WF is a weighting factor associated with a flow appointed for enqueuing; FS is a frame size associated with the flow appointed for enqueuing; and SF is a scaling factor; wherein the scheduling queue includes at least a first subqueue and a second subqueue, and the flow appointed for enqueuing is enqueued to the first subqueue if the value of the expression ((WF×FS)/SF) is less than a range of the first subqueue and the flow appointed for enqueuing is enqueued to the second subqueue if the value of the expression ((WF×FS)/SF) is greater than a range of the first subqueue.
- 8. The scheduler of claim 7, wherein the pointer CP is shared by the first and second subqueues, and least significant digits of the pointer are applied to the first subqueue and most significant digits of the pointer are applied to the second subqueue.
- 9. The scheduler of claim 7, wherein the first subqueue has a number of slots that is equal to a number of slots of the second subqueue.
- 10. The scheduler of claim 7, wherein the first subqueue has a number of slots that is different than a number of slots of the second subqueue.
- 11. The scheduler of claim 7, wherein the second subqueue has a range that is larger than the range of the first subqueue and the second subqueue has a resolution that is less than a resolution of the first subqueue.
- 12. A scheduler for a network processor, the scheduler comprising:
one or more scheduling queues each adapted to define a sequence in which flows are to be serviced, at least one scheduling queue including a plurality of subqueues, wherein each successive one of the subqueues has a selected range that is greater than a range of a preceding subqueue and a selected resolution that is less than a resolution of the preceding subqueue.
- 13. A method of managing queuing of flows in a network processor, comprising:
enqueuing a flow to a first subqueue if the expression ((WF×FS)/SF) has a value that is less than a range of the first subqueue; and enqueuing the flow to a second subqueue if the expression ((WF×FS)/SF) has a value that is greater than the range of the first subqueue, wherein: WF is a weighting factor associated with the flow; FS is a frame size associated with the flow; and SF is a scaling factor.
- 14. The method of claim 13, wherein the second subqueue has a range that is larger than the range of the first subqueue and the second subqueue has a resolution that is less than a resolution of the first subqueue.
- 15. A method of dequeuing a flow from a scheduling queue in a scheduler for a network processor, comprising:
searching a first subqueue of the scheduling queue to find a first winning flow in the first subqueue; determining a first queue distance corresponding to a distance between a current pointer and a slot in which the first winning flow is enqueued; searching a second subqueue of the scheduling queue to find a second winning flow in the second subqueue; determining a second queue distance corresponding to a distance between the current pointer and a slot in which the second winning flow is enqueued; comparing the first and second queue distances; and selecting for dequeuing one of the first and second winning flows based on a result of the comparing step.
- 16. The method of claim 15, further comprising normalizing the first and second queue distances before the comparing step.
- 17. The method of claim 16, wherein the normalizing includes multiplying the second queue distance by a factor.
- 18. The method of claim 17, wherein the factor is 16.
- 19. The method of claim 15, further comprising updating the current pointer.
- 20. The method of claim 15, wherein the first queue distance is determined with reference to least significant bits of the current pointer, and the second queue distance is determined with reference to most significant bits of the current pointer.
- 21. A scheduler for a network processor, the scheduler comprising:
at least a first scheduling queue that includes at least a first subqueue and a second subqueue; wherein the scheduler is adapted to select a flow for dequeuing from the first scheduling queue by searching the first and second subqueues for respective winning flows and selecting one of the winning flows for dequeuing.
- 22. A method of managing a scheduler having a scheduling queue adapted to define a sequence in which flows are to be serviced, the scheduling queue having at least a first subqueue and a second subqueue, the first subqueue having a first range and a first resolution and the second subqueue having a second range that is greater than the first range and a second resolution that is less than the first resolution, the method comprising:
determining a distance from a current pointer at which a flow is to be attached; determining if the distance is less than the first range of the first subqueue, and if so, attaching the flow to the first subqueue; and determining if the distance is greater than the first range of the first subqueue, and if so, attaching the flow to the second subqueue.
- 23. The method of claim 22 further comprising scaling the distance prior to attaching the flow to the second subqueue.
- 24. A computer program product for use with a scheduler having a scheduling queue adapted to define a sequence in which flows are to be serviced, the scheduling queue having at least a first subqueue and a second subqueue, the first subqueue having a first range and a first resolution and the second subqueue having a second range that is greater than the first range and a second resolution that is less than the first resolution, the computer program product comprising:
a medium readable by a computer, the computer readable medium having computer program code adapted to:
determine a distance from a current pointer at which a flow is to be attached; determine if the distance is less than the first range of the first subqueue, and if so, attach the flow to the first subqueue; and determine if the distance is greater than the first range of the first subqueue, and if so, attach the flow to the second subqueue.
- 25. A computer program product for dequeuing a flow from a scheduling queue in a scheduler for a network processor, the computer program product comprising:
a medium readable by a computer, the computer readable medium having computer program code adapted to:
search a first subqueue of the scheduling queue to find a first winning flow in the first subqueue; determine a first queue distance corresponding to a distance between a current pointer and a slot in which the first winning flow is enqueued; search a second subqueue of the scheduling queue to find a second winning flow in the second subqueue; determine a second queue distance corresponding to a distance between the current pointer and a slot in which the second winning flow is enqueued; compare the first and second queue distances; and select for dequeuing one of the first and second winning flows based on a result of the comparison of the first and second queue distances.
- 26. A computer program product for managing queuing of flows in a network processor, comprising:
a medium readable by a computer, the computer readable medium having computer program code adapted to:
enqueue a flow to a first subqueue if the expression ((WF×FS)/SF) has a value that is less than a range of the first subqueue; and enqueue the flow to a second subqueue if the expression ((WF×FS)/SF) has a value that is greater than the range of the first subqueue, wherein:
WF is a weighting factor associated with the flow; FS is a frame size associated with the flow; and SF is a scaling factor.
CROSS REFERENCE TO RELATED PATENT APPLICATIONS
[0001] The present application is related to the following U.S. Patent Applications, each of which is hereby incorporated by reference herein in its entirety:
[0002] U.S. Patent Application Serial No. ______, filed ______, titled “WEIGHTED FAIR QUEUE SERVING PLURAL OUTPUT PORTS” (IBM Docket No. ROC920010200US1);
[0003] U.S. Patent Application Serial No. ______, filed ______, titled “WEIGHTED FAIR QUEUE HAVING ADJUSTABLE SCALING FACTOR” (IBM Docket No. ROC920010201US1);
[0004] U.S. Patent Application Serial No. ______, filed ______, titled “EMPTY INDICATORS FOR WEIGHTED FAIR QUEUES” (IBM Docket No. ROC9200102021US1);
[0005] U.S. Patent Application Serial No. ______, filed ______, titled “QoS SCHEDULER AND METHOD FOR IMPLEMENTING PEAK SERVICE DISTANCE USING NEXT PEAK SERVICE TIME VIOLATED INDICATION” (IBM Docket No. ROC920010203US1);
[0006] U.S. Patent Application Serial No. ______, filed ______, titled “QoS SCHEDULER AND METHOD FOR IMPLEMENTING QUALITY OF SERVICE WITH AGING STAMPS” (IBM Docket No. ROC920010204US1);
[0007] U.S. Patent Application Serial No. ______, filed ______, titled “QoS SCHEDULER AND METHOD FOR IMPLEMENTING QUALITY OF SERVICE WITH CACHED STATUS ARRAY” (IBM Docket No. ROC920010205US1); and
[0008] U.S. Patent Application Serial No. ______, filed ______, titled “QoS SCHEDULER AND METHOD FOR IMPLEMENTING QUALITY OF SERVICE ANTICIPATING THE END OF A CHAIN OF FLOWS” (IBM Docket No. ROC920010206US1).