WORK SCHEDULING ON PROCESSING UNITS

The scheduler optimizes work distribution in computing systems by using lock-free buffers and proximity-based selection to manage units of work with varying priorities, addressing inefficiencies in existing scheduling techniques and enhancing system performance.

DE102021127273B4Active Publication Date: 2025-07-17HEWLETT PACKARD ENTERPRISE DEV LP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
DE102021127273
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-04-30
Filing Date
2021-10-21
Publication Date
2025-07-17
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

Existing scheduling techniques in computing systems face challenges in efficiently managing units of work with varying priorities and execution times, leading to increased complexity and resource consumption, particularly as the number of processing resources grows, which can result in higher scheduling overhead and potential starvation of high-priority tasks.

Method used

A scheduler employs lock-free buffers and proximity-based selection criteria to distribute work units across thread groups, utilizing thread domains and stealing mechanisms to optimize resource utilization and reduce contention, while maintaining priority and locality considerations.

Benefits of technology

This approach reduces scheduling overhead and ensures high-priority tasks are executed efficiently, minimizing resource waste and improving system performance by balancing work distribution across processing units based on proximity and availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Non-transitory machine-readable storage medium that contains instructions that, when executed, cause a system to: receive a first unit of work to be scheduled in the system having a plurality of collections of processing units for executing units of work, each respective collection of processing units of the plurality of collections of processing units being associated with a corresponding scheduling queue; determine a work type of the first work unit based on metadata associated with the first work unit; access scheduler mask information comprising information identifying different types of work that different collections of processing units of the plurality of collections of processing units may perform; for the first work unit, according to a first criterion and according to the scheduler mask information, select candidate collections from the plurality of collections of processing units for the work type of the first work unit determined based on the metadata; and enqueue the first work unit into a scheduling queue associated with a selected collection of processing units selected from the candidate collections according to a selection criterion.
Need to check novelty before this filing date? Find Prior Art

Description

background

[0001] A computing system comprises processing resources that can be used to execute work units. The processing resources may include multiple processors and / or cores of multi-core processors. A scheduler can be used to schedule the work units for execution on the processing resources. Brief description of the drawings

[0002] Some embodiments of the present disclosure are described with reference to the following figures. Fig. 1 is a block diagram of a computer system with a scheduler, thread groups, and scheduling queues according to some examples. Fig. 2 is a block diagram of a computer system according to some examples. Fig. 3 is a flowchart of a scheduling process according to some examples. Fig. 4 is a block diagram of a storage medium storing machine-readable instructions according to some examples. Fig. 5 is a block diagram of a computer system according to some examples. Fig. 6 is a flowchart of a method according to some examples.

[0003] In the drawings, identical reference numbers designate similar, but not necessarily identical, elements. The illustrations are not necessarily to scale, and the size of some parts may be exaggerated to clarify the example shown. Furthermore, the drawings contain examples and / or embodiments consistent with the description; however, the description is not limited to the examples and / or embodiments shown in the drawings. Detailed description

[0004] In this disclosure, the use of the term "a," "an," or "the" includes the plural forms unless the context clearly indicates otherwise. Also, the term "comprises," "including," "comprises," "has," or "have," when used in this disclosure, specifies the presence of the specified elements but does not preclude the presence or addition of other elements.

[0005] A computing system includes processing resources that can be used to execute units of work. The processing resources may include multiple processors and / or cores of multi-core processors. A scheduler may be used to schedule the units of work for execution on the processing resources.

[0006] A "unit of work" can refer to any task to be performed in a computer system. Note that a task can be part of a larger collection of tasks (e.g., a transaction, an operation, etc.).

[0007] Some work items are associated with higher priorities than others. Furthermore, some work items may take longer to execute than others. In some cases, a lower-priority work item that requires a relatively long time to execute may prevent a higher-priority work item that requires a relatively short time from executing if no unused processing resources are available.

[0008] To ensure that higher-priority work units that take less time to execute are not starved, schedulers can employ various scheduling techniques to reduce contention between different types of work units. In some cases, the scheduling techniques can be quite complex, and the resource consumption of schedulers that employ such scheduling techniques can increase with the amount of processing resources on which work units are to be scheduled. In other words, the complexity of scheduling can increase with the amount of processing resources, which can lead to higher scheduling overhead.

[0009] In accordance with some implementations of the present disclosure, a scheduler may schedule units of work onto processing units of a computer system. A "processing unit" may refer to a resource capable of executing machine-readable instructions to perform a unit of work. The processing unit may include a hardware processing resource or a logical processing resource.

[0010] In some examples, a scheduling technique employed by the scheduler has a cost (in terms of resource usage associated with scheduling work) that does not significantly scale (increase) with the number of processing units in a computer system. The scheduling technique may also consider the locality of processing units when executing work. The scheduling technique may also attempt to reduce the use of the number of locks when scheduling work units.

[0011] Fig. 1 is a block diagram of a computing system 100 according to some examples. Computing system 100 may include any type of system capable of executing units of work. For example, computing system 100 may include one or a combination of the following: a storage controller (or multiple storage controllers) that manages access to the data stored in storage devices, a server computer (or multiple server computers), a cloud computer (or multiple cloud computers), and so on.

[0012] In some examples, processing units in computing system 100 are embodied as hardware threads. Hardware threads may also be referred to as CPU (central processing unit) threads. A "hardware thread" may refer to a processing resource (physical or logical) capable of executing a unit of work.

[0013] As in Fig. 1, the hardware threads 102 are divided into thread groups. Each thread group may include a number of hardware threads, where a "number" may refer to a single hardware thread or multiple hardware threads.

[0014] With further reference to Fig. 2 illustrates an exemplary hardware arrangement of computer system 100. Computing system 100 includes multiple compute nodes 202, each compute node 202 including multiple processors 204. In other examples, computing system 100 may include only one compute node and / or a compute node 202 may include only one processor 204.

[0015] In some examples, each processor 204 may be a multi-core processor having multiple physical cores 206. A "physical core" of a processor includes an arrangement of processing circuitry capable of executing machine-readable instructions. The multiple physical cores 206 of a processor 204 are capable of executing machine-readable instructions concurrently.

[0016] In some examples, there is one hardware thread 102 per physical core 206. In other examples, there may be multiple hardware threads 102 per physical core 206. Multiple hardware threads 102 per physical core 206 may be present if simultaneous multithreading (SMT) is supported. For example, processors from Intel Corporation may support hyperthreading, which is a form of SMT. SMT is also supported by processors from other manufacturers.

[0017] When SMT is supported, an operating system (OS) of computer system 100 can divide each physical core 206 into multiple parts (to implement logical cores) capable of executing units of work. The logical cores are capable of independently executing machine-readable instructions to perform corresponding units of work. Note that the logical cores may or may not execute the machine-readable instructions concurrently.

[0018] In other examples, the techniques or mechanisms according to some implementations of the present disclosure are also applicable to processors that do not support SMT.

[0019] Each thread group 104 is associated with a corresponding queue 106. In the example of Fig. 1, there is one scheduling queue 106 per thread group 104. In other examples, there may be more than one scheduling queue 106 for each thread group 104. In other examples, a scheduling queue 106 may be shared by multiple thread groups 104.

[0020] A "scheduling queue" refers to any data structure that can contain information about work units. Information related to work units may include, for example, pointers or other references to the work units (or, more specifically, to machine-readable instructions that the work units are to execute). In other examples, a scheduling queue may store information including the machine-readable instructions. In some examples, a scheduling queue may take the form of a scheduling heap or a scheduling priority queue, in which work units are ordered according to the priorities associated with the work units (the relative priorities of the work units may be specified by metadata associated with the work units).

[0021] Fig. 1 further shows a scheduler 108 in the computing system 100. The scheduler 108 receives work units to be scheduled for execution by a hardware thread 102 selected according to a scheduling technique according to some implementations of the present disclosure. As shown in Fig. 1, the scheduler 108 receives a unit of work 110 to be scheduled for execution in the computing system 100. As used herein, the scheduler 108 receiving a unit of work may refer to the scheduler 108 receiving information related to the unit of work.

[0022] Scheduler 108 may be implemented with machine-readable instructions or a combination of machine-readable instructions and hardware processing circuitry. Although depicted as a single unit, it should be noted that there may be multiple instances of scheduler 108 executing in computer system 100, where the multiple instances of scheduler 108 may execute in parallel and interact with each other for the purpose of scheduling units of work.

[0023] In some examples, a buffer 112 is provided before each scheduling queue 106. The scheduler 108 may insert a unit of work into a buffer 112 instead of placing it directly into the corresponding queue 106. In other examples, the buffers 112 may be omitted.

[0024] A buffer 112 may be a lock-free buffer in which information about units of work scheduled by the scheduler 108 for execution by a corresponding thread group 104 is temporarily stored. A lock-free buffer refers to a buffer into which a unit of work may be inserted without first acquiring a lock on the buffer or a portion of the buffer. Inserting a unit of work into a buffer or scheduling queue may refer to inserting information about the unit of work into the buffer.

[0025] For example, buffer 112 may include a first-in, first-out (FIFO) buffer. Units of work may be added to corresponding entries of the FIFO buffer such that the first unit of work added to the FIFO buffer is the first unit of work removed from the FIFO buffer. In some examples, an idle hardware thread 102 in a corresponding thread group 104 may retrieve a unit of work from buffer 112. A hardware thread 102 is idle if the hardware thread 102 is not currently executing any machine-readable instructions. The idle hardware thread 102 may execute the unit of work retrieved from buffer 112 or a unit of work in scheduling queue 106, depending on the relative priorities of the units of work.

[0026] Each work unit in buffer 112 and scheduling queue 106 may be associated with metadata indicating the relative priority of the work unit. The metadata may include a priority indicator that can be set to various values (e.g., categorical values such as "low," "medium," and "high" or numeric values) to indicate the respective different priorities of the work unit.

[0027] In other examples, the metadata for each unit of work in buffer 112 and scheduling queue 106 may indicate the type of work. For example, a unit of work may include foreground or background work, with background work being performed in the background when processing resources are available that do not perform foreground work. In further examples, the metadata for each unit of work in buffer 112 and scheduling queue 106 may indicate other types of work, such as work related to processing data packets according to network or other protocols, work related to read / write operations requested by hosts, work related to synchronizing data with secondary storage (e.g., disk-based storage), work related to collecting garbage to free up disk space, and so on. Some types of work may be considered more important (e.g.,they have a higher priority) than other work types.

[0028] By using the lock-free buffers 112, the scheduler 108 can avoid taking locks over the thread groups 104 during "normal" queuing, i.e., queuing in which the scheduler 108 adds a work unit to a corresponding scheduling queue 106 based on the scheduling applied by the scheduler 108. Hardware threads 102 can transfer work units from the lock-free buffers 112 to their associated scheduling queues 106 before dequeuing the work units.

[0029] In some examples, multiple thread domains 114 are defined, where each thread domain 114 comprises a corresponding collection of thread groups 104. A thread domain 114 comprises a collection of thread groups 104 that include hardware threads 102 that share a number of physical resources, where the number of physical resources may include any one or a combination of the following: a cache (e.g., a Level 3 or L3 cache), a socket, or a compute node.

[0030] As in Fig. 2, a compute node 202 may include multiple sockets 208, where each socket 208 may generally refer to a physical grouping of a number of processors 204 (one processor or multiple processors). In the Fig. 2, each socket 208 accommodates one processor 204. In other examples, each socket 208 may accommodate multiple processors 204. In some examples, a socket may refer to a connector assembly that can establish a physical and electrical connection with one or more processors. In other examples, a "socket" may refer more generally to another grouping of processors.

[0031] In some examples, the compute nodes 202 of the computing system 100 are part of a non-uniform memory access (NUMA) array. In a NUMA array, the access time of a processor 204 (or a core 206 of a processor 204) to data in a memory depends on the position of the memory relative to the processor (core). For example, a processor (core) may access local memory connected to the processor (core) via a memory bus faster than memory located farther away, such as on a different socket or on a different compute node 202.

[0032] In other examples, a non-NUMA array is used.

[0033] As in Fig. 2, each processor 204 may include multiple caches 210. In other examples, caches 210 may be external to a processor 204. Caches 210 may be L3 caches. An L3 cache may be part of a hierarchical arrangement of caches. The hierarchical arrangement of caches may include Level 1 (L1) and Level 2 (L2) caches that are more or equally localized than the L3 caches with respect to the corresponding processor cores 206. For example, an L1 cache and an L2 cache may be part of a physical core 206 or external to the physical core 206. In further examples, the hierarchical arrangement of caches may include Level 4 (L4) caches that are less or equally localized with respect to the corresponding processor cores 206 than the L3 caches.

[0034] A first subset of the physical cores 206 of a processor 204 may share a first cache 210, a second subset of the physical cores 206 of the processor 204 may share a second cache 210, and so on.

[0035] In some examples, a thread domain 114 may include thread groups 104 with hardware threads 102 that share the same cache 210 (e.g., the L3 cache). In further examples, a thread domain 114 may include thread groups 104 with hardware threads 102 that share the same socket 208 (i.e., the hardware threads 102 are part of processor(s) 204 in the same socket 208). In other examples, a thread domain 114 may include thread groups 104 with hardware threads 102 that are part of the same compute node 202.

[0036] In some examples, scheduler 108 may track which hardware threads are idle. For example, scheduler 108 may maintain a thread domain bitmap 116 for each corresponding thread domain 114. For example, scheduler 108 may maintain a first thread domain bitmap 116 for a first thread domain 114, a second thread domain bitmap 116 for a second thread domain 114, and so on.

[0037] A thread domain bitmap 116 may contain a collection of bits corresponding to the respective hardware threads 102 of a thread domain 114. A bit in the thread domain bitmap 116, when set to a first value (e.g., a logical "1" or "0"), may indicate that the respective hardware thread 102 is idle. A bit in the thread domain bitmap 116, when set to a different second value (e.g., a logical "0" or "1"), may indicate that the respective hardware thread 102 is not idle (i.e., busy executing machine-readable instructions).

[0038] More generally, the scheduler 108 may maintain a data structure for each respective thread domain 114, the data structure including indicators indicating whether or not the corresponding hardware threads 102 in the respective thread domain 114 are idle or busy.

[0039] In some examples, when hardware thread 102 transitions from the "busy" state to the "idle" state, it may send an idle indication to scheduler 108, which may update a corresponding bit in the respective thread domain bitmap 116 (or other data structure). When a hardware thread 102 transitions from idle to busy, hardware thread 102 may send a busy message to scheduler 108, which may update a corresponding bit in the respective thread domain bitmap 116 (or other data structure).

[0040] Although Fig. 2 shows examples with thread domains 114, other examples do not use thread domains 114.

[0041] Fig. 3 is a flowchart of a scheduling process 300 performed by the scheduler 108, according to some examples, in response to receiving a work unit (e.g., 110 in Fig. 1) which is to be planned for execution can be carried out.

[0042] Scheduler 108 determines (at 302) whether the received work unit is new work or resumed work. A resumed work unit refers to existing work that previously existed but was paused for some reason, and a request was received to resume the paused, existing work. A new work unit may refer to work that was not previously executed. Note that a new work unit may either be part of existing work or may be work that is not part of existing work.

[0043] "Existing work" refers to work that was previously performed by a hardware thread 102 in a particular thread group 104. The particular thread group 104 that performed the existing work may be referred to as the "parent" thread group.

[0044] If the received work unit is resumed work, the scheduler 108 determines (at 304) whether the parent thread group is permitted to execute the type of work unit received. Metadata may be associated with the received work unit, and the metadata may indicate the work type of the received work unit (e.g., any of the work types mentioned above). In some examples, a subset of the thread groups 104 may be reserved to execute higher priority work, so that lower priority work cannot be executed by that subset of thread groups. As in Fig. 1, the scheduler 108 may, for example, maintain scheduler mask information 118 that identifies which thread groups 104 can perform which work types. For example, the scheduler mask information 118 may associate identifiers of respective thread groups 104 with corresponding work types or with an indicator indicating that a thread group 104 can perform any work type. The scheduler mask information 118 may be continuously updated, so that the scheduler mask information 118 may change over time. Thus, a thread group 104 that was previously permitted to perform a particular work type may no longer be permitted to perform that particular work type if the scheduler mask information 118 is changed.

[0045] If the scheduler 108 determines (at 304) that the parent thread group is permitted to execute the work type of the received work unit, then the scheduler 108 selects (at 306) candidate thread groups that are candidates for executing the received work unit. In some examples, there may be two candidate thread groups selected by the scheduler 108 for any given work unit. In other examples, the scheduler 108 may select more than two candidate thread groups.

[0046] The reason for selecting multiple candidate thread groups that can execute a received unit of work is to prevent poor scheduling decisions previously made by scheduler 108 from being reused in subsequent scheduling iterations. For example, the parent thread group may not be the optimal thread group for executing the resumed work. By selecting multiple candidate thread groups from which to choose to execute the received unit of work, there is a certain probability that a more optimal thread group can be selected to execute the resumed work.

[0047] The candidate thread groups selected (at 306) include the parent thread group and another thread group randomly selected from a biased distribution of thread groups. The biased distribution of thread groups includes those thread groups (e.g., in a thread domain 114) that are in closer proximity to the parent thread group. For example, if the biased distribution of thread groups includes N (N ≥ 2), then the N thread groups that are part of the biased distribution are the N thread groups that are in closest proximity to the parent thread group according to a proximity criterion.

[0048] In some examples, the proximity criterion may specify proximity with respect to shared resources, such as a shared L3 cache, a shared socket, or a shared compute node, in descending order of those shared resources. For example, thread groups that contain hardware threads that share an L3 cache are considered closer to each other than thread groups that do not share an L3 cache. Thread groups that contain hardware threads on the same socket are considered closer to each other than thread groups with hardware threads on different sockets. Thread groups that contain hardware threads on the same compute node are considered closer to each other than thread groups with hardware threads on different compute nodes.

[0049] In more specific examples, the biased distribution of thread groups may include N thread groups, where each thread group selected to belong to the biased distribution has a 50 percent chance of having the same L3 cache as the parent thread group, a 25 percent chance of being on the same socket but not having the same L3 cache as the parent thread group, a 15 percent chance of being on the same compute node but not having the same socket, and so on.

[0050] If scheduler 108 determines (at 304) that the parent thread group is not permitted to execute the type of work unit received, then scheduler 108 randomly selects (at 308) two candidate thread groups from the biased distribution of thread groups. In other words, the candidate thread groups selected (at 308) do not include the parent thread group.

[0051] If the scheduler 108 determines (at 302) that the received work unit is new work, the scheduler 108 determines (at 310) whether the received work unit is part of existing work or not part of existing work.

[0052] If the scheduler 108 determines (at 310) that the received work unit is part of existing work, then the scheduler determines (at 304) whether the parent thread group is allowed to execute the type of work unit received and selectively performs the selection tasks 306 and 308 as described above.

[0053] If the received work unit is not part of an existing work, the scheduler 108 randomly selects (at 312) candidate thread groups, e.g., thread groups from the same thread space 114.

[0054] In each of tasks 306, 308, and 312, scheduler 108 uses a selection criterion (at 314) to select from the candidate thread groups. The selection criterion may be based on a criterion aimed at reducing the delay associated with executing the received unit of work. For example, scheduler 108 may determine whether any of the candidate thread groups has an idle hardware thread. If so, scheduler 108 selects (at 316) the thread group from the candidate thread groups that has the idle hardware thread. Scheduler 108 then enqueues (at 318) the received unit of work into scheduling queue 106 (or buffer 112) associated with the selected thread group.

[0055] If none of the candidate thread groups has an idle hardware thread, the scheduler 108 selects (at 320) the thread group from the candidate thread groups that is expected to have a shorter queue delay. The determination of which thread group is likely to be associated with a shorter queue delay for the received work unit may be based on information maintained by the scheduler 108 regarding the types of work currently scheduled for execution in each of the candidate thread groups, the priority of the work units, the expected time for execution, and so on.

[0056] In some cases, scheduler 108 may not have sufficient information to make the best decision about where to place a received work unit at the time of enqueueing (the time at which a thread group is selected and the received work unit is inserted into the respective queue 106 or buffer 112). For example, the current execution of a work unit may take much longer than expected based on historical information about other work units.

[0057] In response to triggers, idle hardware threads 102 of thread groups 104 may steal work units from other thread groups 104 in the same thread domain 114. For example, an idle hardware thread in a first thread group may steal a work unit from the buffer 112 of a second thread group 104. Stealing a work unit may refer to the idle hardware thread in the first thread group retrieving information about the work unit from the buffer 112 of the second thread group and executing the work unit in the second thread group.

[0058] Although reference is made to stealing work units from the buffers 112, in other examples, work units may be stolen from the scheduling queues 106.

[0059] The trigger that causes a hardware thread to attempt to steal a unit of work from another thread group may include a time-based trigger based on a timer. Each time the timer expires, idle hardware threads in different thread groups 104 may attempt to steal work from other thread groups. The stealing attempts may occur in an order based on the architectural topology, including L3 caches, sockets, and compute nodes. For example, an idle hardware thread may first attempt to steal a unit of work from another thread group 104 that shares the same L3 cache, and if unable to do so, attempt to steal a unit of work from another thread group 104 that shares the same socket, and if unable to do so, attempt to steal a unit of work from another thread group 104 that shares the same compute node.

[0060] Fig. 4 is a block diagram of a non-transitory machine-readable or computer-readable storage medium 400 that stores machine-readable instructions that, when executed, cause a system to perform various tasks. The machine-readable instructions include receive work instructions 402 for receiving a first unit of work to be scheduled in the system comprising a plurality of collections of processing units (e.g., a plurality of thread groups 104, as in Fig. 1) to execute work units. Each collection of processing units may comprise one or more processing units. Each collection of processing units is associated with a corresponding scheduling queue (e.g., 106 in Fig. 1) connected.

[0061] The machine-readable instructions include instructions 404 for selecting candidate collections for the first unit of work according to a first criterion from the plurality of collections of processing units (e.g., as described for selecting candidate thread groups in tasks 306, 308, and 312 in Fig. 3). The first criterion for selecting the candidate collections can be a random criterion (e.g., the random selection in task 312 in Fig. 3) or a criterion relating to a selection from a skewed distribution (e.g., the selection in Task 308) or a criterion relating to the selection of a parent thread group and a thread group from a skewed distribution (e.g., the selection in Task 306).

[0062] The biased distribution includes collections of processing units that have a proximity to a given collection of processing units based on a proximity criterion, where the proximity criterion indicates that a first collection of processing units is closer to the given collection of processing units than a second collection of processing units if the first collection of processing units shares a particular resource (e.g., a cache, a socket, or a compute node) with the given collection of processing units that is not shared by the second collection of processing units.

[0063] The machine-readable instructions include instructions 406 for enqueuing the first work unit into a scheduling queue associated with a selected collection of processing units that are scheduled to run according to a selection criterion (e.g., the selection criterion in task 314 in Fig. 3) was selected from the candidate collections.

[0064] Fig. 5 is a block diagram of a system 500 according to some examples. System 500 includes a hardware processor 502 (or multiple hardware processors). A hardware processor may include a microprocessor, a core of a multi-core microprocessor, a microcontroller, a programmable integrated circuit, a programmable gate array, or other hardware processing circuitry.

[0065] System 500 includes a storage medium 504 storing scheduling instructions executable on hardware processor 502 to perform various tasks. Scheduling instructions executable on a hardware processor may refer to instructions executable on a single hardware processor or on multiple hardware processors.

[0066] The scheduling instructions include work receive instructions 506 for receiving a first work unit to be scheduled in a computing environment that includes a plurality of collections of processing units for executing work units. Each collection of processing units is associated with a corresponding scheduling queue.

[0067] The scheduling instructions include instructions for determining existing work (508) to determine whether the first unit of work includes a piece of existing work that was previously scheduled for execution in a first collection of processing units in the computing environment. The piece of existing work may include a new unit of work that is a subtask of the existing work or a piece of work that is resumed from the existing work that was suspended.

[0068] The scheduling instructions include instructions for selecting candidate collections 510 to select candidate collections from the plurality of processing unit collections in response to determining that the first unit of work includes the task of the existing work, wherein the candidate collections include the first collection of processing units if the first collection of processing units is permitted to perform a work type of the first unit of work, and a second collection of processing units that is part of a distribution of processing unit collections that are in closer proximity to the first collection of processing units.

[0069] In some examples, the distribution of collections of processing units is based on identifying a subset of the plurality of collections of processing units that are in closer proximity to the first collection of processing units based on a proximity criterion.

[0070] The scheduling instructions select the second collection of processing units and a third collection of processing units as candidate collections if the first collection of processing units is not allowed to perform the work type of the first work unit.

[0071] Fig. 6 is a flowchart of a process 600 according to some examples. The process 600 may, for example, be executed by the scheduler 108 Fig. 1 should be carried out.

[0072] Process 600 includes receiving (at 602) a first unit of work to be scheduled in a system that includes a plurality of collections of processing units for executing work units. Each collection of processing units is associated with a corresponding scheduling queue.

[0073] The process 600 includes selecting (at 604) candidate collections from the plurality of collections of processing units for the first unit of work according to a first criterion, the first criterion depending on whether the first unit of work is part of an existing job.

[0074] In some examples, selecting the candidate collections according to the first criterion in response to determining that the first unit of work is not a task of existing work includes randomly selecting the candidate collections from the plurality of processing unit collections.

[0075] In some examples, selecting the candidate collections according to the first criterion in response to determining that the first unit of work is part of existing work performed by a given collection of processing units includes selecting the candidate collections using a distribution that includes collections of processing units that are close to the given collection of processing units based on a closeness criterion.

[0076] Process 600 includes enqueuing (at 606) the first unit of work in the system into a scheduling queue associated with a selected collection of processing units selected from the candidate collections according to a selection criterion. The selection criterion is based on reducing a delay associated with executing the first unit of work.

[0077] A storage medium (e.g., 400 in Fig. 4 or Fig. 504 in Fig.5) may include any one or a combination of the following: a semiconductor memory device such as dynamic or static random access memory (DRAM or SRAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other type of non-volatile memory device; a magnetic disk such as a hard disk, floppy disk, and removable disk; other magnetic medium including tape; an optical medium such as a compact disk (CD) or digital video disk (DVD); or other type of storage device. It should be noted that the instructions described above may be provided on a single computer- or machine-readable storage medium, or alternatively, on multiple computer- or machine-readable storage media distributed throughout a large system, possibly with multiple nodes.Such computer-readable or machine-readable storage medium or media are considered part of an article (or article of manufacture). An article or article of manufacture may refer to each manufactured component or multiple components. The storage medium or media may be located either in the machine on which the machine-readable instructions are executed or at a remote location from which machine-readable instructions can be downloaded over a network for execution.

[0078] In the foregoing description, numerous details are set forth to provide an understanding of the subject matter disclosed herein. However, implementations may be practiced without some of these details. Other implementations may include modifications and variations from the details described above. The appended claims are intended to cover such modifications and variations.

Claims

[1] Non-transitory machine-readable storage medium containing instructions that, when executed, cause a system to: receive a first unit of work to be scheduled in the system having a plurality of collections of processing units for executing units of work, each respective collection of processing units of the plurality of collections of processing units being associated with a corresponding scheduling queue; determine a work type of the first work unit based on metadata associated with the first work unit; access scheduler mask information comprising information identifying different work types of work that different collections of processing units of the plurality of collections of processing units may perform; for the first work unit, according to a first criterion and according to the scheduler mask information, select candidate collections from the plurality of collections of processing units for the work type of the first work unit determined based on the metadata; and enqueue the first work unit into a scheduling queue associated with a selected collection of processing units selected from the candidate collections according to a selection criterion. [2] The non-transitory machine-readable storage medium of claim 1, wherein each collection of processing units of the plurality of collections of processing units comprises a collection of hardware threads. [3] The non-transitory machine-readable storage medium of claim 1, wherein selecting the candidate collections according to the first criterion comprises: in response to determining that the first work unit is not a task of existing work, randomly selecting the candidate collections from the plurality of collections of processing units. [4] The non-transitory machine-readable storage medium of claim 1, wherein selecting the candidate collections according to the first criterion comprises: in response to determining that the first unit of work is part of an existing job previously performed by a given collection of processing units: Determining a biased distribution containing collections of processing units that are in a proximity of the given collection of processing units according to a proximity criterion and Selecting the candidate collections from the collections of processing units in the biased distribution. [5] The non-transitory machine-readable storage medium of claim 4, wherein selecting the candidate collections according to the first criterion comprises: in response to a determination that the given collection of processing units is available to perform the first unit of work, selecting the given collection of processing units as one of the candidate collections. [6] The non-transitory machine-readable storage medium of claim 5, wherein selecting the candidate collections according to the first criterion comprises: in response to determining that the given collection of processing units is unavailable to perform the first unit of work, selecting each of the candidate collections from the biased distribution. [7] The non-transitory machine-readable storage medium of claim 4, wherein the proximity criterion indicates that a first collection of processing units is closer to the given collection of processing units than a second collection of processing units if the first collection of processing units shares a particular resource with the given collection of processing units that is not shared by the second collection of processing units. [8] The non-transitory machine-readable storage medium of claim 7, wherein the particular resource comprises a cache memory, a socket, or a computing node. [9] The non-transitory machine-readable storage medium of claim 4, wherein determining that the first unit of work is part of the existing work comprises determining that the first unit of work is a new task of the existing work. [10] The non-transitory machine-readable storage medium of claim 4, wherein determining that the first unit of work is part of the existing work comprises determining that the first unit of work is resumed from the existing work. [11] The non-transitory machine-readable storage medium of claim 1, wherein the selection criterion specifies a selection of the selected collection of processing units from the candidate collections based on which of the candidate collections is idle or based on expected queuing delays of the candidate collections. [12] The non-transitory machine-readable storage medium of claim 11, wherein the candidate collections are part of a thread domain containing collections of processing units that share a resource, the thread domain being part of a plurality of thread domains. [13] The non-transitory machine-readable storage medium of claim 11, wherein a processing unit of each of the plurality of collections of processing units is to provide an indicator of whether the processing unit is idle. [14] System comprising: a processor; and a non-transitory machine-readable storage medium that stores scheduling instructions executable on the processor to: receive a first unit of work to be scheduled in a computing environment having a plurality of collections of processing units to execute units of work, each respective collection of processing units of the plurality of collections of processing units being associated with a corresponding scheduling queue; determine whether the first unit of work includes a piece of existing work that was previously scheduled to be executed in a first collection of processing units in the computing environment; and in response to the finding that the first work unit contains the task of the existing work: Select candidate collections from the plurality of collections of processing units, the candidate collections comprising the first collection of processing units when the first collection of processing units is permitted to perform a work type of the first work unit, and a second collection of processing units that is part of a distribution of collections of processing units that are in closer proximity to the first collection of processing units. [15] The system of claim 14, wherein selecting the candidate collections comprises selecting the second collection of processing units and a third collection of processing units if the first collection of processing units is not permitted to perform the work type of the first work unit. [16] The system of claim 14, wherein the scheduling instructions are executable on the processor to: determine the distribution of collections of processing units based on identifying a subset of the plurality of collections of processing units that are in closer proximity to the first collection of processing units based on a proximity criterion. [17] The system of claim 16, wherein the proximity criterion comprises a criterion relating to physical resources associated with the plurality of collections of processing units. [18] The system of claim 14, wherein an idle processing unit of a given collection of processing units is to retrieve and execute a unit of work from a scheduling queue of another collection of processing units. [19] Method comprising: Receiving, in a system comprising a hardware processor, a first unit of work to be scheduled in the system having a plurality of collections of processing units to execute units of work, each respective collection of processing units of the plurality of collections of processing units being associated with a corresponding scheduling queue; determining, by the system, whether the first unit of work includes a task of existing work that was previously scheduled for execution in a first collection of processing units in the system; in response to determining that the first work unit contains the task of existing work, selecting, by the system, candidate collections from the plurality of collections of processing units for the first work unit, the candidate collections comprising the first collection of processing units if the first collection of processing units is permitted to perform a work type of the first work unit, and a second collection of processing units that is part of a distribution of collections of processing units that are in closer proximity to the first collection of processing units; and Placing the first work unit in a scheduling queue in the system associated with a selected collection of processing units selected from the candidate collections according to a selection criterion, the selection criterion being based on reducing a delay associated with executing the first work unit, where selecting the candidate collections comprises: Determining, by the system, the distribution of collections of processing units based on identifying a subset of the plurality of collections of processing units that are in closer proximity to the first collection of processing units based on a proximity criterion.

Citation Information

Patent Citations

  • Graphics processor with non-blocking concurrent architecture

    DE112012002465T5

  • Efficient method for the scheduling of work loads in a multi-core computing environment

    US20130061233A1

  • Multi-level scheduling

    US20200379804A1