Techniques for reducing thread overhead for systems with multiple multi-threaded processors
First Claim
1. A method for processing requests from a processing thread for a shared resource shared among a plurality of processing threads, comprising:
- receiving, from a portion of a thread that is executed during a single wake interval on a particular processor, a bundle of requests comprising a plurality of commands for one or more shared resources, wherein the bundle of requests includes one or more lock requests and data corresponding to earlier request results;
processing the bundle of requests at the one or more shared resources to produce a bundle result;
sending the bundle result to the particular processor, wherein the thread undergoes no more than one wake interval to sleep interval cycle while the plurality of commands are processed at the one or more shared resources;
wherein the one or more lock requests, requests one or more locks for a particular portion of a particular resource of the one or more shared resources;
directing the lock request to a lock controller;
receiving from the lock controller a particular lock for the particular portion of the particular resource;
after receiving the particular lock, then processing a command that follows the lock request in the bundle of requests;
wherein the lock request is held in a lock controller request queue until the lock is granted; and
sending the request to a next shared resource after the processing the command.
2 Assignments
0 Petitions
Accused Products
Abstract
Techniques for processing requests from a processing thread for a shared resource shared among threads on one or more processors include receiving a bundle of requests from a portion of a thread that is executed during a single wake interval on a particular processor. The bundle includes multiple commands for one or more shared resources. The bundle is processed at the shared resource(s) to produce a bundle result. The bundle result is sent to the particular processor. The thread undergoes no more than one wake interval to sleep interval cycle while the bundle commands are processed at the shared resource(s). These techniques allow a lock for shared resource(s) to be obtained, used and released all while the particular thread is sleeping, so that locks are held for shorter times than in conventional approaches. Using these techniques, line rate packet processing is more readily achieved in routers with multiple multi-threaded processors.
102 Citations
18 Claims
-
1. A method for processing requests from a processing thread for a shared resource shared among a plurality of processing threads, comprising:
-
receiving, from a portion of a thread that is executed during a single wake interval on a particular processor, a bundle of requests comprising a plurality of commands for one or more shared resources, wherein the bundle of requests includes one or more lock requests and data corresponding to earlier request results; processing the bundle of requests at the one or more shared resources to produce a bundle result; sending the bundle result to the particular processor, wherein the thread undergoes no more than one wake interval to sleep interval cycle while the plurality of commands are processed at the one or more shared resources; wherein the one or more lock requests, requests one or more locks for a particular portion of a particular resource of the one or more shared resources; directing the lock request to a lock controller; receiving from the lock controller a particular lock for the particular portion of the particular resource; after receiving the particular lock, then processing a command that follows the lock request in the bundle of requests; wherein the lock request is held in a lock controller request queue until the lock is granted; and sending the request to a next shared resource after the processing the command. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. An apparatus for processing requests from a processing thread for a shared resource shared among a plurality of processing threads, comprising:
-
means for receiving, from a portion of a thread that is executed during a single wake interval on a particular processor, a bundle of requests comprising a plurality of commands for a first shared resource of a plurality of shared resources wherein the bundle of requests includes one or more lock requests and data corresponding to earlier request results; means for processing the bundle of requests at the first resource of the plurality of shared resources to produce a bundle result, the processing means including a processor; wherein the thread undergoes no more than one wake interval to sleep interval cycle while the plurality of commands are processed at the first resource of the plurality of shared resources; wherein the one or more lock requests, requests one or more locks for a particular portion of the first resource; directing the lock request to a lock controller; receiving from the lock controller a particular lock for the particular portion of the first resource; after receiving the particular lock, then processing a command that follows the lock request in the bundle of requests; wherein the lock request is held in a lock controller request queue until the lock is granted; and sending the request to a second shared resource after the processing the command, wherein the second shared resource is a next resource in a ring of resources comprising the plurality of shared resources.
-
-
9. An apparatus for processing requests from a processing thread for a shared resource shared among a plurality of processing threads, comprising:
-
one or more multi-threaded processors that each allow alternate execution of a plurality of processing threads; one or more shared resources shared among a plurality of processing threads; and a shared resource distribution block disposed between the one or more multi-threaded processors and the one or more shared resources, wherein the shared resource distribution block is configured to; receive, from a portion of a particular thread that is executed during a single wake interval on a particular processor, a bundle of requests comprising a plurality of commands for one or more shared resources; distribute the bundle of requests to the one or more shared resources to produce a bundle result; trigger the bundle result to be sent to the particular processor while the particular thread undergoes no more than one wake interval to sleep interval cycle; schedule a next eligible thread to reawaken from a thread queue comprising a plurality of sleeping threads, wherein a next eligible thread is determined to be eligible to reawaken if all requests in a corresponding previously sent request bundle are associated with a result or a candidate thread is new in the thread queue, and wherein commands associated with the previously send request bundle have been processed; arbitrate reawakening eligible threads where more than one thread in the thread queue is eligible to be reawakened; wherein the next eligible thread corresponds to a next eligible shared resource of the one or more shared resources. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16, 17, 18)
-
Specification