Power saving by deferred message processing
Delayed message processing with priority-based queuing reduces power consumption by minimizing unnecessary wake-ups of processing units, optimizing message handling in systems with units in sleep mode.
Patent Information
- Application Number
- JP2024516369
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-09-24
- Filing Date
- 2022-07-19
- Publication Date
- 2024-09-26
AI Technical Summary
Processing units in active mode send messages to units in sleep mode, causing unnecessary power consumption due to the need to wake up and maintain them in active mode for hysteresis intervals, especially when non-emergency messages are processed.
Implement delayed message processing by maintaining records to derive message priorities, queuing non-urgent messages, and waking units only when necessary based on priority levels.
Significantly reduces power consumption by minimizing unnecessary wake-ups of processing units, optimizing message handling, and maintaining efficient system operation.
Smart Images

Figure 2024535014000001
Abstract
Description
[Technical field]
[0001] (CROSS REFERENCE TO RELATED APPLICATIONS) This application claims the benefit of U.S. Patent Application No. 17 / 485,186, filed September 24, 2021, the contents of which are incorporated herein by reference. [Background technology]
[0002] To reduce the amount of power consumed by the system, the processing units of the system that are not in operation are kept in either a clock-gated state or a holding state. In the former, the clocks of the processing units that are not in operation are turned off, but the voltage is kept the same as in the operation state. In the latter, the clocks of the processing units that are not in operation are turned off and the voltage is reduced to a level just sufficient to preserve the data in the flip-flops and memory cells of the units. However, processing units that are in operation (active mode) often send messages throughout the system, including broadcast messages and other messages that specifically address computing units in sleep mode that require the latter to return to active mode. Waking up processing units in sleep mode to process the messages and generate appropriate responses increases power consumption. This is especially true if the processing units remain in this state for a period of time (i.e., a hysteresis interval) each time they awaken before returning to sleep mode. To maintain low power consumption, techniques are needed to efficiently manage the distribution of messages among the processing units of the system.
[0003] A more detailed understanding may be had from the following description, given by way of example in conjunction with the accompanying drawings, in which: [Brief description of the drawings]
[0004] [Figure 1A] FIG. 1 is a block diagram of an example device capable of implementing one or more features of the present disclosure. [Figure 1B] FIG. 1 is a block diagram of an example system for providing cache access management, capable of implementing one or more features of the present disclosure. [Diagram 2] 1 is a block diagram of an example system for reducing power consumption capable of implementing one or more features of the present disclosure. [Diagram 3] 1 is a block diagram of another example system for reducing power consumption capable of implementing one or more features of the present disclosure. [Figure 4] 1 is a flow diagram of an example method for reducing power consumption in a system that can implement one or more features of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0005] The present disclosure describes a system and method for power conservation by delayed processing of messages. Techniques are disclosed for limiting interruption of a sleep mode of a processing unit by messages whose processing may be delayed. This can be achieved by maintaining records that track system information from which a priority of the message can be derived by a message arbitrator. Messages determined to have the highest priority level are processed immediately by the processing unit to which they are sent, even if that unit must be placed in active mode. Messages determined to have an intermediate priority level are processed when a time associated with the intermediate priority level has elapsed, at which time the processing unit to which the message is sent is placed in active mode, if in sleep mode. Messages determined to have the lowest priority level are queued and processed later, for example, when the unit to which they are sent is scheduled to perform a task (placed in active mode for unrelated reasons). Aspects disclosed herein address both probes (i.e., messages between cache controllers) and any other messages between processing units (e.g., configuration messages or messages originating from a multi-threaded application).
[0006] Aspects disclosed herein describe a method for reducing power consumption of a system. The method disclosed herein includes queuing a message from a source engine of the system in a queue of a destination engine, the destination engine being in a sleep mode, determining a priority level associated with the message, and placing the destination engine in an active mode in response to the priority level being a maximum level. The method disclosed herein includes placing the destination engine in an active mode upon expiration of a time period associated with the intermediate level in response to the priority level being at an intermediate level. Furthermore, the method disclosed herein includes, when the destination engine is placed in the active mode, the destination engine processes the message and other messages in the queue in an order determined by their associated priority levels.
[0007] Aspects disclosed herein also describe a system for reducing power consumption. The system disclosed herein includes at least one processor and a memory storing instructions. When executed by the at least one processor, the instructions cause the system disclosed herein to queue a message from a source engine of the system in a queue of a destination engine of the system, the destination engine being in a sleep mode, determine a priority level associated with the message, and place the destination engine in an active mode in response to the priority level being a maximum level. The instructions also cause the system disclosed herein to place the destination engine in an active mode upon expiration of a time period associated with the intermediate level in response to the priority level being an intermediate level. The instructions further cause the system disclosed herein to process the message and other messages in the queue by the destination engine in an order determined by their associated priority levels when the destination engine is placed in an active mode.
[0008] Further aspects disclosed herein describe a non-transitory computer-readable storage medium including instructions executable by at least one processor to perform a method for reducing power consumption of a system. The method includes queuing a message from a source engine of the system in a queue of a destination engine of the system, the destination engine being in a sleep mode, determining a priority level associated with the message, and placing the destination engine in an active mode in response to the priority level being at a maximum level. Disclosed herein is an aspect in which the message is a probe initiated by a cache controller of the source engine, and determining the priority level associated with the message is based on a system record, the system record storing information associated with a status of a cache line stored in a cache of the engine of the system, and the determined priority level is determined to be at a maximum level in response to the cache of the destination engine holding a most recent version of the cache line.
[0009] 1A is a block diagram of an example device 100A capable of implementing one or more features of the present disclosure. The device 100A can be a computer, a gaming device, a handheld device, a set-top box, a television, a mobile phone, a tablet computer, or any other computing device. The device 100A includes a processor 102, a memory 104, a storage device 106, one or more input devices 108, and one or more output devices 110. The device 100A can also include one or more input drivers 112 and one or more output drivers 114. Any of the input drivers 112 can be embodied as hardware, a combination of hardware and software, or software. The input drivers 112 can be used, for example, to control the operation of the input devices 108 or to receive data from the input devices 108. Similarly, any of the output drivers 114 can be embodied as hardware, a combination of hardware and software, or software. The output drivers 114 can be used, for example, to control the operation of the output devices 110 or to provide data to the output devices 110. Device 100A may include display device 118, which may be a physical display device or a simulated device that uses a remote display protocol to present output. Device 100A may include additional components not shown in FIG. 1A.
[0010] In various alternatives, the processor 102 includes a central processing unit (CPU), a graphics processing unit (GPU), other dedicated accelerator units, and / or combinations thereof, which may be located on the same die or on one or more (CPU, GPU, or accelerator) processor cores. The memory 104 may be located on the same die as the processor 102 or may be located separately from the processor 102. The memory 104 may include volatile or non-volatile memory (e.g., random access memory (RAM), dynamic RAM, cache). As is commonly known, a cache stores data determined by a cache manager to be likely to be accessed frequently or in the near future by instructions executing on the processor 102. The cache 120 represents one or more caches that may be structured hierarchically, with higher caches in the cache hierarchy servicing caches that have been overlooked by and receive cache entries evicted from lower caches in the cache hierarchy.
[0011] The storage devices 106 include fixed or removable storage devices (e.g., hard disk drives, solid state drives, optical disks, flash drives). The input devices 108 can be, for example, a keyboard, a keypad, a touch screen, a touch pad, a detector, a microphone, an accelerometer, a gyroscope, a biometric scanner, or a network interface (e.g., a wireless local area network card for reception of IEEE 802 signals). The output devices 110 can be, for example, a display, a speaker, a printer, a haptic feedback device, one or more optics, an antenna, or a network interface (e.g., a wireless local area network card for transmission of IEEE 802 signals).
[0012] Each of the input driver 112 and the output driver 114 may include one or more hardware, software, and / or firmware components that may be configured to interface with the input device 108 and the output device 110. The input driver 112 communicates with the processor 102 and the input device 108, and typically controls the transfer of input data from the input device 108 to the processor 102. The output driver 114 communicates with the processor 102 and the output device 110, and typically controls the transfer of output data from the processor 102 to the output device 110. The device 100A may include an accelerated processing device (APD) 116, either within (as shown) or external to the output driver 114. The APD 116 may be configured to accept computational commands from the processor 102, process data according to those commands, and provide processed data. The APD 116 may also be configured to accept graphics rendering commands from the processor 102, process those commands, and provide output data that is rendered on the display device 118. APD 116 may include one or more parallel processing units configured to perform calculations according to a single-instruction-multiple-data (SIMD) paradigm. In various alternatives, the functions described as being performed by APD 116 are additionally or alternatively performed by other computing devices having similar capabilities, e.g., not driven by a host processor (e.g., processor 102). In one aspect, any processing system that performs processing tasks according to the SIMD paradigm may be configured to perform the functions described herein. Alternatively, computing systems that do not perform processing tasks according to the SIMD paradigm may perform the functions described herein.
[0013] FIG. 1B is a block diagram of an example system providing cache access management that can implement one or more features of the present disclosure. System 100B includes processor 130 and memory 122. System 100B can be incorporated into any of a variety of electronic devices, such as a server, a personal computer, a tablet, a set-top box, or a gaming system. Processor 130 is generally configured to execute instructions of an application (e.g., a computer program) to perform tasks defined by the application. Memory 122 facilitates the execution of the application's instructions by storing the instructions and the data on which the instructions act. Memory 122 can be, for example, random access memory (RAM), non-volatile memory such as a flash memory or a hard disk drive (HDD), or a combination thereof. System 100B also includes device 124, which can be a physical input / output (I / O) device, such as a network interface card (NIC) or a host bus adapter (HBA).
[0014] The processor 130 may include multiple processor cores, for example, four processor cores 140, 150, 160, 170. The processor cores 140, 150, 160, 170 are processing units that can independently and simultaneously execute instructions of one or more applications. In an aspect, each of the processor cores 140, 150, 160, 170 may include an instruction pipeline that fetches instructions, decodes the fetched instructions into corresponding operations, and executes the corresponding operations using resources of the system 100B. Each of the processor cores 140, 150, 160, 170 may have a low-level cache dedicated to the processor core. For example, each of the processor cores 140, 150, 160, 170 may have a level 1 (L1) cache 142, 152, 162, 172 and a level 2 (L2) cache 144, 154, 164, 174, respectively. Each processor core 140, 150, 160, 170 may also have a translation lookaside buffer (TLB) 146, 156, 166, 176, respectively. The processor 130 may further include two shared caches L3: one shared cache 180 shared by one pair of core processors 140, 160, and another shared cache 185 shared by a second pair of core processors 150, 170.
[0015] The processor 130 may also include a memory controller 132 and an input / output memory management unit (IOMMU) 136. The IOMMU 136 may be used to connect the devices 124 (e.g., the devices of FIG. 1A ) to the memory controller 132. In an aspect, the IOMMU 136 communicates with the devices 124 using a serial bus standard (e.g., Peripheral Component Interconnect Express (PCIe)). The memory controller 132 provides an interface for the devices 124 to communicate with one or more of the memory 122 or caches L1, L2, L3 (not shown). The IOMMU 136 receives memory access requests (e.g., direct memory access requests, such as cache injection memory access requests) from the devices 124 and controls the provision of those requests to either the memory 122 or the cache via the memory controller 132. Processor 130 includes a physical tag map (PTM) 134 that maps physical steering tags received from IOMMU 136 to physical resources targeted by associated memory access requests, such as cache injection memory access requests, for example, in memory controller 132. In addition, memory controller 132 can receive responses to memory access requests from either memory 122 or a cache, and controls the provision of the responses to device 124.
[0016] A cache injection memory access request can utilize a steering tag to target a processor resource, such as a lower level cache dedicated to a processor core or a shared cache. For example, the steering tag can target L1 cache 152 or L2 cache 154 accessible by processor core 150, or L3 cache 185 accessible by processor cores 150 and 170. Thus, to facilitate efficient execution of memory access requests, IOMMU 136 accesses a virtual tag map to translate a virtual steering tag received in a memory access request to a physical steering tag mapped to a physical resource. In response to receiving a memory access request from device 124, IOMMU 136 identifies a virtual steering tag and translates the virtual steering tag using virtual tag map (VTM) 138. VTM 138 can be stored in system memory 122 and a portion can be cached in IOMMU 136. Alternatively, VTM 138 can be cached in IOMMU 136. IOMMU 136 provides the memory access request and the physical steering tag to memory controller 132. Memory controller 132 translates the physical steering tag to the physical resource targeted by the memory access request, such as a lower level cache targeted by the cache injection memory access request. In one example, the memory access request may target a low level cache dedicated to a processor core. In such an example, an address associated with the request may be translated by a TLB and then the cache injection memory access may be performed.
[0017] In some embodiments, device 124 uses memory controller 132 to access information within either memory 122 or a cache through a direct memory access (DMA) request by initiating a memory access request including a virtual steering tag and a virtual address sent to IOMMU 136. IOMMU 136 can perform steering tag remapping between virtual and physical steering tags, and address translation between virtual and physical addresses in either memory 122 or a cache. The steering tag remapping and address translation processes can be independent functions of the IOMMU and can run simultaneously. For example, device 124 can generate a cache injection memory access request, including a write request to store data in a cache associated with a processor running a virtual machine that requires the data provided by device 124. Each memory access request may include a virtual steering tag that is mapped to a cache (e.g., L3 cache 180 or 185, L1 cache 142, 152, 162, 172, L2 cache 144, 154, 164, 174) via an associated physical steering tag, and a memory address that indicates a location in the cache targeted by the cache injection memory access request. In response to a write request, the cache stores the data of the write request at a location corresponding to the memory address of the write request.
[0018] FIG. 2 is a block diagram of an example system 200 for reducing power consumption that may implement one or more features of the present disclosure. The system 200 demonstrates techniques for reducing power consumption with respect to messages associated with system cache management. The system 200 includes engines 210.1-210.N, each of which represents a processing unit including, for example, one or more CPUs, GPUs, DSPs, encoders / decoders, or any other customized computing units. The engines 210.1-210.N or a subset thereof may be local to one another (e.g., residing on the same chip or circuit) or may be remote to one another. Each engine (e.g., 210.1) may include a cache 220.1 (representing one or more caches herein) and a respective cache controller 230.1. A communication layer 260 communicatively couples the engines 210.1-210.N or components thereof (e.g., 230.1-230.N). Communications layer 260 may be part of a network utilizing any communications protocol (e.g., a network on chip such as AMD's Fabric Interconnect). In one aspect, communications layer 260 may embody queues 240.1-240.N associated with each engine 210.1-210.N and message arbitrator 250. In another aspect, queues 240.1-240.N and message arbitrator 250 may be external to communications layer 260 and embodied in other system components. In both aspects, queues 240.1-240.N and message arbitrator 250 operate in a domain that is always operational (i.e., always powered on while the system is operational).
[0019] In one aspect, message arbitrator 250 and queues 240.1-240.N can be used to process all types of messages. In another aspect, separate arbitrators and queues can be used, each handling a different type of message (e.g., probes, configuration messages, or messages originating from a multi-threaded application). Message arbitrator 250 can maintain a system record 255 based on which message priority can be derived, as described in more detail below. Message arbitrator 250 can be made configurable (via register programming) to allow flexibility in adjusting how priority is determined based on the requirements of the system or of a particular processing unit.
[0020] Queues 240.1-240.N may be used to queue probes generated by an engine's cache controllers 230.1-230.N, as disclosed herein. Similarly, these queues 240.1-240.N, or other dedicated queues, may be used to queue probes generated by an engine's TLB controller (not shown in FIG. 2). For example, message arbitrator 250 may maintain data in system records 255 that tracks virtual to physical address translation mappings stored in the TLB of each engine 210.1-N. Thus, the TLB controllers of engines 210.1-210.N may send probe messages to invalidate TLB entries that have become stale (e.g., because the mapping has been changed or removed), similar to how cache controllers 230.1-230.N operate for their respective caches 220.1-220.N. Thus, the techniques described herein with respect to cache controllers 230.1-230.N and their respective caches 220.1-220.N are extendable to TLB controllers and their respective TLBs.
[0021] In one aspect, queues 240.1-240.N may be used to queue messages, such as probes, generated by engine cache controllers 230.1-230.N. Typically, several caches in system 200 may store copies of the same cache line (i.e., a block of data previously fetched from memory, e.g., 104 or 122). Conventionally, for example, if engine-1 210.1 wants to write to or read from a line in its cache 220.1, its cache controller 230.1 must verify that the line, if present in any of the other caches 220.2-220.N, has not already been modified by its respective engine 210.2-210.N. Engine-1's cache controller 230.1 may not know which of the other caches 220.2-220.N hold the line, and so must send inquiry messages (or probes) to all other cache controllers 230.2-230.N. Thus, in a system 200 having multiple engines, the cache controller 230.1 of engine-1 must send a broadcast message to all other cache controllers in the system. Sending a broadcast message is an operation that consumes a significant amount of power. Since it is highly likely that the caches of many engines do not hold the line, having these engines participate in the broadcast message results in wasted power consumption and execution time.
[0022] As discussed above, instead of broadcasting a message, the cache controller may send messages (or probes) only to engines that hold the line. This may be accomplished by maintaining a system record 255 (e.g., maintained by message arbitrator 250) that tracks lines stored in caches 230.1-230.N of system 200. For example, system record 255 may store the following information for each line: the cache that holds the line, and when the line was last modified by the respective cache (or the identity of the cache that most recently modified the line):
[0023] Thus, referring to the above example, instead of broadcasting to all engines 210.2-210.N in system 200, cache controller 230.1 of engine-1 can consult with message arbitrator 250 to find out which engines hold the line, and then send a message to only those engines. For example, cache controller 230.1 of engine-1 can send a message to the engine that most recently modified the line to obtain the contents of that most recent line. Additionally, cache controller 230.1 of engine-1 can send a message (an invalidation probe) to all engines that hold the line informing them that the line was modified by engine-1, so that they can invalidate their copies of the line. Message arbitrator 250 can then update system record 255 to indicate that cache 220.1 now holds the most recent version of the line. Thus, as discussed above, maintaining system record 255 allows for more efficient system operation and system power consumption, since the number of messages can be significantly reduced.
[0024] Generally, system power consumption can be kept low by putting inactive engines into sleep mode. Engines can be in either active mode (normal operation at a particular clock frequency) or sleep mode (non-operating, clock-gated or held state). As described above, when an engine in the system 200 probes another engine, it can awaken an engine that is in sleep mode. In such a case, the awakened engine remains in active mode for a period of time (during a hysteresis interval) after responding to the probe before returning to sleep mode. In many cases, a probe sent to an engine that is in sleep mode does not require immediate attention by the engine (non-urgent probe), and therefore such a probe can be processed at a later time (e.g., when the engine enters active mode). Thus, waking an engine to respond to a non-urgent probe (whose response can be addressed later when the engine is put into active mode), and the hysteresis interval following the processing of the non-urgent probe, contribute to additional power consumption that can be avoided, as described in more detail below.
[0025] As mentioned above, engines of system 200 that are not active are kept in sleep mode to conserve power. When a probe is sent to these engines, unless the probe requires an immediate response by the engine, the probe is queued in the engine's respective queue and can only be processed when the engine is put back into active mode. For example, if engine-1 210.1 needs to read a line from its cache 220.1 (or write a line to its cache 220.1), it must first find out which of caches 220.2-220.N in system 200 holds a version of the line and which cache has the most recent version. Thus, in one aspect, cache controller 230.1 of engine-1 can consult message arbitrator 250 to inquire which engines to probe and how.
[0026] Based on the information stored in system record 255, message arbitrator 250 may identify which caches in the system hold the line, and further identify which cache most recently updated the line. For example, message arbitrator 250 may identify four caches that hold the line (e.g., 210.1-210.4). If engine-1's cache 220.1 holds the most recent version of the line, engines 210.2-210.4 must receive a probe informing them that their version of the line is invalid, i.e., an invalidation probe. If another engine's version of the line is the most recent (e.g., engine-2 210.2), in addition to informing engines 210.2-210.4 that their version of the line is invalid, engine-1's cache controller 230.1 must probe engine-2 with a request to receive the most recent version of the line from engine-2's cache 220.2. Such a request, i.e., an update probe, must be immediately processed by engine-2 to allow engine-1 to read from (or write to) the newest version of the line. Engines 210.3-210.4 only need to receive invalidation probes, and if these engines are in sleep mode, there is no urgent need to awaken them at this stage. Instead, their respective invalidation probes may be queued in their respective queues 240.3-240.4 and processed when those engines enter active mode. Thus, in one aspect, messages that do not require an immediate response or processing by the receiving respective engine, as determined by message arbitrator 250, e.g., based on information stored in system record 255, may be queued in the respective engine's queue.
[0027] When an engine enters active mode, it processes all probes accumulated in its queue before addressing other tasks. In the above example, engine-2, which has the newest version of the line, must immediately respond to the update probe sent by engine-1. Thus, when awakened by engine-1, engine-2 processes the update probe along with other (non-urgent) probes accumulated in its queue 240.2. The other engines 210.3-210.4 process the non-urgent probes in their respective queues 240.3-240.4 (which in the above example include the invalidation probe sent by engine-1) if they later enter active mode (e.g., if they are scheduled by the operating system's scheduler to perform a task) or if their respective queues 240.3-240.4 become full. Thus, the larger the queues 240.1-240.N of system 200 are, the more messages will be processed by the awakened engines associated with the queues when they fill up, and therefore the less power consumed per queued message (because the number of times an engine is awakened per message is reduced).
[0028] Queuing probes that do not require immediate attention in the queues 240.1-240.N of each engine 210.1-210.N can result in significant savings in system power consumption. Not only would the engine be awakened to respond to the probe and its processing be delayed until the engine becomes active during the normal course of system operation, but each time an engine is awakened to process a probe, the engine remains in active mode for a hysteresis interval before returning to sleep mode. In aspects disclosed herein, message arbitrator 250 can also help save power with respect to other types of messages (not related to cache control), as described in more detail below.
[0029] FIG. 3 is a block diagram of another example system 300 for reducing power consumption 300 that may implement one or more features of the present disclosure. The system 300 demonstrates techniques for reducing power consumption with respect to any type of message transmitted by a processing unit of the system 300. The system 300 includes engines 310.1-310.N, each of which represents a processing unit including, for example, one or more CPUs, GPUs, DSPs, encoders / decoders, or any other customized computing units. The engines 310.1-310.N or a subset thereof may be local to each other (e.g., residing on the same chip or circuit) or may be remote to each other. Each engine, for example 310.1, may be operated by an operating system (e.g. 320.1). A communication layer 350 communicatively couples the engines 310.1-310.N or components thereof (e.g. 320.1-320.N). Communications layer 350 may be part of a network utilizing any communications protocol (e.g., a network on chip such as AMD's Fabric Interconnect). In one aspect, communications layer 350 may embody queues 330.1-330.N associated with each engine 310.1-310.N and message arbitrator 340. In another aspect, queues 330.1-330.N and message arbitrator 340 may be external to communications layer 350 and embodied in other system components. In both aspects, queues 330.1-330.N and message arbitrator 340 operate in a domain that is always operational (i.e., always on-demand).
[0030] In one aspect, queues 330.1-330.N can be used to queue messages generated by engine operating systems 320.1-320.N. These messages can originate from software modules executing on the various engines 310.1-310.N and / or can be configuration messages sent by engine operating systems 320.1-320.N. For example, messages can be issued by latency sensitive software modules for which an immediate response is required, or messages can be issued by the operating system (configuration messages) for which an immediate response may or may not be required. If a message does not require immediate attention by the destination engine, the message can be queued in that queue. As discussed above with respect to system 200, queuing non-urgent messages can prevent unnecessary awakening of the destination engine, thereby conserving power. In one aspect, messages can be queued in a destination engine's queue when the engine's operating system must send a message to the destination engine. The engine's operating system, in consultation with the message arbitrator 340, can then determine whether processing of the message can be delayed or whether the message requires the destination engine's immediate attention. In the former case, the destination engine can process the message (and all other messages in its queue) once it is scheduled by its operating system to perform the task. In the latter case, the destination engine is immediately awakened into active mode to process the queued message (and all other messages in its queue) that requires immediate attention.
[0031] In one aspect, the message arbitrator 340 can maintain a system record 345 that stores information from which a message priority can be derived. The system record 345 can record a priority level for each message type that can be indexed by the destination engine and the source engine. For example, a particular configuration message type (e.g., a request to move to secure mode) can have one level of priority associated with it when issued by engine-1 310.1 to engine-2 310.2, while it can have another level of priority associated with it when issued by engine-2 310.2 to engine-1 310.1. The priority level of a message type can be associated with a time value, where a zero time value can represent the highest priority (urgent messages) and a non-zero time value can represent an intermediate priority. A non-zero time value can be interpreted as a maximum time a message can spend in a queue before being processed. A non-zero time value above a predetermined time value can represent the lowest priority, meaning there is no time limit on a message held in the queue, in which case the message will be processed if the corresponding engine of the queue is placed in active mode.
[0032] Thus, in one aspect, engines 310.1-310.N of system 300 can register their preferences with message arbitrator 340, e.g., during an initialization phase, based on which system record 345 can be constructed. For example, engine-2 can register its preference (indexed in the system record) to receive a particular message type if sent by engine-1 at a particular priority level. When engine-1 sends that message type to engine-2, engine-1 can query message arbitrator 340 as to the priority level of that message type and send the message accordingly, as follows: First, engine-1 queues the message in engine-2's queue. Then, if the message priority level is the highest, engine-2 is awakened to process the message immediately. If the priority level is the lowest, the message will be processed when engine-2 is placed in active mode. Also, if the message priority level is medium, it is allowed to wait in the queue for a maximum amount of time (associated with the medium priority level), after which engine-2 is awakened (if not already in active mode beforehand) to process the message. Note that in such a scenario, the priority level is determined according to the preferences of the destination engine. However, in one aspect, the priority level of a message type may be determined according to the preferences of the source engine. In another aspect, the priority level of a message type may be a combination of the preferences of the source engine and the preferences of the destination engine. For example, engine-1 may modify (cast) the priority level (indexed in system record 345 according to the preferences of engine-2) with its own priority level and send the message to engine-2 according to the casted priority level.Such a cast may be useful, for example, when message priority should be modified due to specific real-time system events or application requirements associated with or known to engine-1 (the source engine).
[0033] Thus, messages that do not require immediate response or processing by the respective engines, as determined by the message arbitrator 340 based on the system records, may be queued in the respective engine's queue. When an engine goes into active mode, it processes all messages accumulated in its queue before attending to other tasks. As mentioned above, priority levels may be associated with time values: a zero time value (representing the maximum or highest priority level), a time value above a predetermined time value (representing the minimum or lowest priority level), and any time value in between (representing an intermediate priority level) that may determine the maximum time a message may be in the queue. Thus, messages in a queue associated with an intermediate priority level may be attached with a timer that measures the time each message spends in the queue. When the measured time reaches the maximum time for a message (as determined by the intermediate priority level of the message), the corresponding engine is awakened and may then proceed to process that message and other messages in that queue.
[0034] As discussed above, queuing messages that do not require immediate attention in the queues 330.1-330.N of each engine 310.1-310.N can result in significant savings in system power consumption. Each time an engine is awakened to respond to a message, after processing that message and any other messages in its queue, the engine remains in an operational mode for a hysteresis interval before returning to a sleep mode. Thus, the less frequently an engine is awakened to process messages in its queue, the greater the savings in power consumption i.
[0035] FIG. 4 is a flow diagram of an example method 400 for reducing power consumption of a system that may implement one or more features of the disclosure. In step 410, the source engine may queue a message in a queue of a destination engine that is in a sleep mode. Then, in step 420, a priority level associated with the queued message may be determined. If the priority level is a maximum (or highest) priority level 430, in step 450, the destination engine may be placed in an active mode. If the priority level is a medium priority level 460, in step 470, the destination engine may be placed in an active mode if the time associated with the medium priority level has elapsed. Otherwise, if the priority level is not the medium level 460 (i.e., if it is a minimum (or lowest) priority level), the queued message will be processed later when the destination engine is placed in an active mode to perform an unrelated task. If the destination engine is placed in an active mode, in step 480, the destination engine may process the queued message and other messages already in its queue in an order determined by their associated priority levels or in the order in which the messages were received in the queue. In one aspect, the order in which queued messages are processed can be made configurable. Note that in step 480, the destination engine may be placed in active mode because it has been awakened to process a message having the highest priority level (step 450), because it has been awakened due to the expiration of a timer associated with a message in the queue (step 470), or because it has been awakened by the scheduler to perform an unrelated task.
[0036] It should be understood that many variations are possible based on the disclosure herein, and although features and elements have been described above in particular combinations, each feature or element can be used alone without the other features and elements, or in various combinations with or without the other features and elements.
[0037] The various functional units illustrated in the figures and / or described herein (including, but not limited to, the processor 102, the input driver 112, the input device 108, the output driver 114, the output device 110, and the accelerated processing device 116) may be implemented as a general purpose computer, processor, or processor core, or as a program, software, or firmware stored in a non-transitory computer-readable storage medium or another medium executable by the general purpose computer, processor, or processor core. The provided methods may be implemented in a general purpose computer, processor, or processor core. Suitable processors include, by way of example, a general purpose processor, a special purpose processor, a conventional processor, a digital signal processor (DSP), multiple microprocessors, one or more microprocessors in association with a DSP core, a controller, a microcontroller, an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) circuit, any other type of integrated circuit (IC), and / or a state machine. Such a processor may be manufactured by configuring a manufacturing process using the results of processed hardware description language (HDL) instructions and other intermediate data, including netlists (instructions that may be stored on a computer-readable medium). The result of such processing may be a mask work that is used in subsequent semiconductor manufacturing processes to produce a processor that implements features of the present disclosure.
[0038] The methods or flow diagrams provided herein may be implemented in a computer program, software, or firmware embodied in a non-transitory computer-readable storage medium for execution by a general purpose computer or processor. Examples of non-transitory computer-readable storage media include read only memory (ROM), random access memory (RAM), registers, cache memory, semiconductor memory devices, magnetic media such as internal hard disks and removable disks, magneto-optical media, and optical media such as CD-ROM disks and digital versatile disks (DVDs).
Claims
1. 1. A method for reducing power consumption in a system, comprising: queuing a message from a source engine of the system to a queue of a destination engine, the destination engine being in a sleep mode; determining a priority level associated with the message; placing the destination engine in an active mode in response to the priority level being a maximum level. method.
2. in response to the priority level being at an intermediate level, placing the destination engine in an active mode upon expiration of a time period associated with the intermediate level.
2. The method of claim 1.
3. when the destination engine is in an active mode, the destination engine processes the message and other messages in the queue in an order determined by their associated priority levels.
2. The method of claim 1.
4. the priority level is determined based on at least one of a type of the message, an identity of the source engine, an identity of the destination engine, or a combination thereof; 2. The method of claim 1.
5. the message is a probe initiated by a cache controller of the source engine; 2. The method of claim 1.
6. determining a priority level associated with the message based on a system record, the system record storing information associated with a status of a cache line stored in a cache of an engine of the system; The method of claim 5.
7. the determined priority level is determined to be a maximum level in response to the cache of the destination engine holding a most recent version of the cache line; The method of claim 6.
8. the message is a configuration message initiated by the source engine's operating system; 2. The method of claim 1.
9. the message is initiated by a multi-threaded application executing on the source engine and the destination engine; 2. The method of claim 1.
10. 1. A system for reducing power consumption, comprising: At least one processor; A memory for storing instructions, The instructions, when executed by the at least one processor, queuing a message from a source engine of the system to a queue of a destination engine of the system, the destination engine being in a sleep mode; determining a priority level associated with the message; placing the destination engine in an active mode in response to the priority level being a maximum level; causing the system to system.
11. The instruction: in response to the priority level being at an intermediate level, causing the system to place the destination engine in an active mode upon expiration of a time period associated with the intermediate level. The system of claim 10.
12. The instruction: causing the system to cause the destination engine, when in active mode, to process the message and other messages in the queue in an order determined by their associated priority levels; The system of claim 10.
13. the priority level is determined based on at least one of a type of the message, an identity of the source engine, an identity of the destination engine, or a combination thereof; The system of claim 10.
14. the message is a probe initiated by a source cache controller of the source engine; The system of claim 10.
15. determining a priority level associated with the message based on a system record, the system record storing information associated with a status of a cache line stored in a cache of an engine of the system; 15. The system of claim 14.
16. the determined priority level is determined to be a maximum level in response to the cache of the destination engine holding a most recent version of the cache line; 16. The system of claim 15.
17. the message is a configuration message initiated by the source engine's operating system; The system of claim 10.
18. the message is initiated by a multi-threaded application executing on the source engine and the destination engine; The system of claim 10.
19. 1. A computer-readable storage medium comprising instructions executable by at least one processor to perform a method for reducing power consumption in a system, the method comprising: The method comprises: queuing a message from a source engine of the system to a queue of a destination engine of the system, the destination engine being in a sleep mode; determining a priority level associated with the message; placing the destination engine in an active mode in response to the priority level being a maximum level. A computer-readable storage medium.
20. the message is a probe initiated by a cache controller of the source engine; determining a priority level associated with the message based on a system record, the system record storing information associated with a status of a cache line stored in a cache of an engine of the system; the determined priority level is determined to be a maximum level in response to the cache of the destination engine holding a most recent version of the cache line; 20. The computer readable storage medium of claim 19.
Citation Information
Patent Citations
Automobile rear suspension structure
US20210008949A1
