Dynamic multi-circular queues in storage controller interface
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- QUALCOMM INC
- Filing Date
- 2024-11-27
- Publication Date
- 2026-06-04
Smart Images

Figure CN2024134738_04062026_PF_FP_ABST
Abstract
Description
DYNAMIC MULTI-CIRCULAR QUEUES IN STORAGE CONTROLLER INTERFACEDESCRIPTION OF THE RELATED ART
[0001] Universal Flash Storage (UFS) is a class of data storage device having advantages that include high performance and low power. Such advantages make UFS attractive for use in portable computing devices, such as mobile phones. Successive UFS versions have added various features, one of which is the multi-circular queue (MCQ) feature.
[0002] A host (processor system) may access a UFS device through a UFS host controller interface (HCI) , which involves host controller (HC) hardware and software that together present an interface to UFS device driver software in the host. Prior to the advent of the MCQ feature, a host would access a UFS device through a UFS transfer request descriptor list maintained in host memory by the HCI and a submission queue in the HCI’s memory-mapped input / output (MMIO) space. The use of this single transfer request descriptor list may become a bottleneck in multi-core systems in which each of multiple processor cores may attempt to simultaneously access the UFS device by submitting data transfer requests to the transfer list.
[0003] The MCQ feature addresses the aforementioned potential bottleneck by providing multiple queues instead of a single transfer request descriptor list. The use of multiple queues allows more than one processor core in a multi-core system to take control of a queue concurrently. Submission queues (SQs) are used for submitted commands, while separate completion queues (CQs) are used for completed commands. Each processor core is uniquely associated with one SQ. Each SQ is uniquely associated with a CQ, which may be serviced by the same processor core as the SQ or a different processor core. When a UFS device has completed a requested data transfer, the HC updates the CQ associated with the SQ from which the data transfer request was serviced. The HC also generates an interrupt associated with the CQ to alert the processor core to the presence of the data transfer response information in the CQ. The association between that interrupt and that processor core remains fixed during operation. Accordingly, which CPU is to service the interrupt remains fixed during operation.
[0004] While the MCQ feature may provide benefits in multi-core systems, additional flexibility that may enhance UFS performance under certain circumstances may be desirable. SUMMARY OF THE DISCLOSURE
[0005] Systems, methods, and other examples of dynamically associating processors and data storage system queues in a multi-processor computing device are disclosed.
[0006] An exemplary method for dynamically associating processors and data storage system queues may include detecting, by one of a plurality of processors, a condition impairing completion queue accessing performance of the processor. The method may further include updating, by a host controller system associated with the data storage system, a queue-to-processor mapping, including replacing an association between a completion queue and the one of the plurality of processors with an association between the completion queue and another processor of the plurality of processors when the condition is detected.
[0007] An exemplary system in a computing device may include a host controller system for a storage device, and a plurality of submission queues and a plurality of completion queues configured in a memory of the computing device. The host controller system may be configured to access the plurality of submission queues and the plurality of completion queues in association with storage device data transfers. The host controller system may further be configured to receive an indication of a condition impairing completion queue accessing performance of one of a plurality of processors of the computing device. The host controller system may still further be configured to update a queue-to-processor mapping, which may include replacing an association between a completion queue and the one of the plurality of processors with an association between the completion queue and another processor of the plurality of processors when the indication of the condition is received.
[0008] An exemplary system-on-chip (SoC) may include a plurality of processors and a host controller system. The host controller system may be configured to control data transfers between the plurality of processors and a data storage device and to access a plurality of submission queues and a plurality of completion queues in association with the data transfers. The host controller system may further be configured to receive an indication of a condition impairing completion queue accessing performance of one of the plurality of processors. The host controller system may still further be configured to update a queue-to-processor mapping, which may include replacing an association between a completion queue and the one of the plurality of processors with an association between the completion queue and another processor of the plurality of processors when the indication of the condition is received.BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In the Figures, like reference numerals refer to like parts throughout the various views unless otherwise indicated. For reference numerals with letter character designations such as “101A” or “101B” , the letter character designations may differentiate two like parts or elements present in the same Figure. Letter character designations for reference numerals may be omitted when it is intended that a reference numeral encompass all parts having the same reference numeral in all Figures.
[0010] FIG. 1 is a block diagram of a system for dynamically associating or mapping processors and data storage system queues in a multi-processor computing device, in accordance with exemplary embodiments.
[0011] FIG. 2 illustrates multi-circular queue (MCQ) components of a host controller interface (HCI) , in accordance with exemplary embodiments.
[0012] FIG. 3 illustrates an example of a queue-to-processor mapping, in accordance with exemplary embodiments.
[0013] FIG. 4 illustrates the queue-to-processor mapping of FIG. 3 after being dynamically changed, in accordance with exemplary embodiments.
[0014] FIG. 5 is a functional block diagram illustrating an example of dynamically (i.e., during storage device operation) changing a queue-to-processor mapping, in accordance with exemplary embodiments.
[0015] FIG. 6 illustrates another example of a queue-to-processor mapping, in accordance with exemplary embodiments.
[0016] FIG. 7 illustrates the queue-to-processor mapping of FIG. 6 after being dynamically changed, in accordance with exemplary embodiments.
[0017] FIG. 8 is a flow diagram illustrating a method for dynamically associating or mapping processors and data storage system queues (e.g., UFS host queues) in a multi-processor computing device in accordance with exemplary embodiments.
[0018] FIG. 9 is a block diagram of a multi-processor portable computing device having a feature for dynamically associating or mapping processors and data storage system queues, in accordance with exemplary embodiments.DETAILED DESCRIPTION
[0019] The word “exemplary” is used herein to mean “serving as an example, instance, or illustration. ” The word “illustrative” may be used herein synonymously with “exemplary. ” Any aspect described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects.
[0020] In a conventional multi-processor computing system (not shown) in which a Universal Flash Storage (UFS) host controller interface (HCI) is configured in multi-circular queue (MCQ) mode, conditions may occur that give rise to overhead and inefficiency. The solutions described herein may address such overhead, inefficiency, or other undesirable effects of such conditions occurring.
[0021] In a conventional UFS MCQ system (i.e., absent the solutions described herein) each processor that may initiate UFS read or write transactions has (or is mapped to) its own submission queue (SQ) , and each such processor is also mapped to a specific completion queue (CQ) that is controlled by either that same processor or a different processor. These mappings or associations between processors and queues generally remain fixed throughout a period of operation. The term “processor” may be used broadly herein and may include a central processing unit (CPU) , a core thereof, etc. The terms “processor, ” “CPU” and “core” may be used synonymously herein. Also, the term “host” (or host processor, etc. ) may be used to refer to a processor that initiates the UFS transactions, i.e., accesses the UFS device through the HCI. The processor (through software executing thereon) may pass UFS read and write commands to a host controller via the processor’s SQ. The HCI may monitor the SQ for such UFS commands, and when UFS commands are present in the SQ the HCI may send them to the UFS device for processing. Once the UFS device has completed its processing (e.g., reading or writing data) , the UFS device may place response information in the CQ associated with that SQ. The HCI may also place a Completion Queue Entry (CQE) in that CQ and update a CQ interrupt status register, which raises an interrupt to the processor mapped to that CQ.
[0022] If a response is specific to a SQ of a processor other than the processor mapped to the CQ holding the response information, the processor mapped to the CQ may trigger an inter-processor interrupt (IPI) to read the response from the SQ. The time expended servicing an IPI may be considered undesirable overhead that may impact system performance. Also, if the processor mapped to the SQ is in a low-power mode, the processor mapped to the CQ holding the response information may trigger a wake-up interrupt and subsequent IPIs to read the response information, which may also be considered undesirable overhead that may impact system performance. It is contemplated that still other conditions that could impair a processor’s efficiency or performance in accessing response information in a CQ may occur, such as, for example, a thermal condition.
[0023] As shown in FIG. 1, in an illustrative or exemplary embodiment a computing system 100 may include a UFS device 102 coupled to a system-on-chip (SoC) 104. Further components that may be included in the computing system 100 are not shown for purposes of clarity. The SoC 104 may include multiple cores or processors 106, such as a first processor 106A through an Nth processor 106N. There may be any number of processors 106, with further processors 106 that are not shown for purposes of clarity indicated by the ellipsis ( “…” ) symbol. Accordingly, the SoC 104 may be referred to as a multi-processor host with respect to the UFS device 102.
[0024] The SoC 104 may include a UFS host controller (HC) 108 coupled to the UFS device 102. The SoC 104 may also include memory 110, such as dynamic random access memory (DRAM) . Although in the illustrated example the memory 110 is internal to (i.e., included in) the SoC 104, in other examples (not shown) such DRAM or other memory may be external. Each processor 106 may be configured through software elements, which are conceptually shown in FIG. 1 for purposes of clarity as stored in or residing in the memory 110. Nevertheless, as understood by one of ordinary skill in the art such software elements may be retrieved and executed by the processors 106 in accordance with conventional computing principles, such as in the form of instructions, modules, etc. Such software elements may include, for example, application software 112 and operating system (O / S) software 114. An example of relevant O / Ssoftware 114 may be a Linux kernel that supports UFS, including the MCQ feature or mode. Through the MCQ feature (e.g., of the O / Ssoftware 114) , MCQs 116 may be configured in the memory 110. The O / Ssoftware 114 or related software may include a UFS HC driver 118. The term host controller interface or HCI may be used to refer to the interface through which the UFS HC driver 118 accesses the HC 108.
[0025] The HC 108 may include doorbell (DB) registers 120 and a queue-to-processor mapping 122, which are further described below. An interrupt controller 124 may operate to send interrupts to the processors 106 based on the doorbell registers 120, as further described below.
[0026] In FIG. 1, paths through which control may be provided or information may be communicated among elements are conceptually indicated in broken line. For example, the path 126 may indicate the execution of the application software 112 under control of the processor 106A. The processor 106A, executing the application software 112, may initiate UFS transactions, such as write transactions and read transactions, with the UFS device 102, as indicated by the path 128 to the UFS HC driver 118. In the lexicon of UFS, the processor 106A may be referred to as an initiator of a transaction, while the UFS device 102 may be referred to as a target of the transaction. The terms “initiator” and “target” derive from the lexicon of the Small Computer System Interface (SCSI) protocol, on which the UFS communication architecture (e.g., command set) is based. The path 128 may indicate the execution of the HC driver 118 by the processor 106A. Still another path 130 may indicate the HC driver 118 accessing the MCQs 116, while a path 132 may indicate the HC 108 accessing the MCQs 116. Yet another path 134 may indicate the HC driver 118 accessing the doorbell registers 120.
[0027] As shown in FIG. 2, MCQ components 200 of above-referenced UFS HCI may include SQs 202, such as a first SQ 202A ( “SQ0” ) , a second SQ 202B ( “SQ1” ) , etc., through an Nth SQ 202N ( “SQN” ) . The MCQ components 200 may also include CQs 204, such as a first CQ 204A ( “CQ0” ) , a second CQ 204B ( “CQ1” ) , etc., through an Nth CQ 204N ( “CQN” ) . There may be any number of SQs 202 and CQs 204, such as, for example, 32 SQs 202 and 32 CQs 204, though fewer than all may be enabled in some examples of data storage operations. The above-described MCQs 116 (FIG. 1) may include the SQs 202 and CQs 204, for example. The SQs 202 and CQs 204 may be in a host memory 206, which may be an example of the above-described memory 110 (FIG. 1) .
[0028] The MCQ components 200 may further include SQ doorbell registers 208, such as first SQ doorbell register 208A, a second SQ doorbell register 208B, etc., through an Nth SQ doorbell register 208N, and CQ doorbell registers 210, such as first CQ doorbell register 210A, a second CQ doorbell register 210B, etc., through an Nth CQ doorbell register 210N. There may be any number of SQ and CQ doorbell registers, such as, for example, 32 SQ doorbell registers 208 and 32 CQ doorbell registers 210, though fewer than all may be enabled in some examples of data storage operations. Each of the SQ doorbell registers 208 may be associated with, or refer to, one of the SQs 202, and each of the CQ doorbell registers 210 may be associated with, or refer to, one of the CQs 204. The SQ doorbell registers 208 and CQ doorbell registers 210 may be examples of the above-described doorbell registers 120 (FIG. 1) . The SQ doorbell registers 208 and CQ doorbell registers 210 may be in a memory-mapped input / output (MMIO) space 212 of the HC 108 (FIG. 1) .
[0029] Each of the SQs 202 and CQs 204 may have a circular queue structure. That is, each of the SQs 202 and CQs 204 may have a number of entries, where an associated head pointer may be used to refer to the next available or unused entry, and an associated tail pointer may be used to refer to the last in-use entry. An SQ 202 or CQ 202 is “empty” when the associated head pointer is equal to the associated tail pointer. Each of the SQ doorbell registers 208 may include such a head pointer and tail pointer for the associated one of the SQs 202 and may also include other information (not shown in FIG. 2 for purposes of clarity) relating to interrupts, status, etc. Likewise, each of the CQ doorbell registers 208 may include a head pointer and tail pointer for the associated one of the CQs 204 and may also include other information (not shown in FIG. 2 for purposes of clarity) relating to interrupts, status, etc.
[0030] Referring again to FIG. 1, to service a UFS transaction initiated by one of the processors 106, such as, for example, the first processor 106A, the HC driver 118 may prepare a data structure (not shown) known as a UFS Transport Protocol (UTP) Transfer Request Descriptor (UTRD) that contains the relevant read or write commands and related data transfer request information, place the UTRD in one of the SQs 202 (FIG. 2) , increment the tail pointer of the associated SQ doorbell register 208, and alert the HC 108 that the UTRD is in that SQ 202 and ready for processing. The HC driver 118 may alert the HC 108 by placing a Completion Queue Entry (CQE) in the CQ doorbell register 210 (FIG. 2) . In addition to providing such alerts, the SQ doorbell registers 208 and CQ doorbell registers 210 (FIG. 2) may be used to pass the head and tail pointers of the corresponding SQ 202 and CQ 204 between the HC 108 and the HC driver 118.
[0031] In response to the alert, the HC 108 may retrieve the UTRD from the pointed-to entry in an SQ 202 (FIG. 2) and submit the commands from the UTRD to the UFS device 102. The commands may be submitted to the UFS device 102 in a form known as a UFS Protocol Information Unit (UPIU) . When the UFS device 102 has completed processing the UTRD, the UFS device 102 may provide a response to the HC 108. The response may also be in the form of a UPIU. The HC 108 may place the information from the response UPIU in the CQ 204 (FIG. 2) that is mapped to the SQ 202 from which the corresponding request UTRD was obtained and increment the head pointer of the associated CQ doorbell register 210 (FIG. 2) . Note that a single CQ 204 can be shared by (i.e., mapped to) multiple SQs 202, as further described below. The HC 108 may then alert the HC driver 118 that there is a ready-for-processing response in that CQ 204. In response, the HC driver 118 may retrieve the response from the CQ 204 and provide the response information to the processor 106 that initiated the UFS transaction, which may in this example be the first processor 106A.
[0032] With reference again to FIG. 2, it should be understood that the SQs 202 and CQs 204 are core-agnostic (or processor-agnostic) . That is, any of the SQs 202 may be mapped to any one of the processors 106 (FIG. 1) , and any of the CQs 204 may be mapped to any of the processors 106. In a straightforward example of a queue-to-processor mapping, the first processor 106A (FIG. 1) may be mapped to the first SQ 202A and to the first CQ 204A; the second processor 106B (FIG. 1) may be mapped to the second SQ 202B and to the second CQ 204B, etc. Nevertheless, other queue-to-processor mappings may be advantageous. In a conventional system (i.e., absent the solutions described herein) the queue-to-processor mapping may be configured during computing system start-up (e.g., booting) and remains fixed or static thereafter.
[0033] In accordance with the solutions described herein, the computing system 100 (FIG. 1) may include a feature by which the mapping between any of the CQs 204 and any of the processors 106 may be dynamically changed based on detection of one or more conditions of a type that may impair the efficiency of accessing response information in a CQ 204. Each CQ doorbell register 210 may include, in addition to the head pointer and tail pointer, an indication of to which one of the processors 106 (FIG. 1) the corresponding CQ 204 is mapped. For example, as shown in FIG. 2 the first CQ doorbell register 210A may include not only the “CQ0 head” pointer and “CQ0 tail” pointer but also a “CQ0CPU” indication. Likewise, the second CQ doorbell register 210B may include not only the “CQ1 head” pointer and “CQ1 tail” pointer but also a “CQ1CPU” indication, etc. The indication in a doorbell register 210 of to which processor 106 the corresponding CQ 204 is mapped may be an example of the CQ-related portion of the above-referenced queue-to-processor mapping 122 (FIG. 1) .
[0034] As shown in FIG. 3, in an exemplary queue-to-processor mapping 300 an association 302 maps the first processor 106A ( “Core_0” ) to the first SQ 202A ( “SQ0” ) , and another association 304 maps the first processor 106A to the first CQ 204A ( “CQ0” ) . Also note that an association 306 maps the first SQ 202A to the first CQ 204A. Further, associations 308 and 310 map the second processor 106B ( “Core_1” ) to the second SQ 202B ( “SQ1” ) and third SQ 202C ( “SQ2” ) , respectively. An association 312 maps the third processor 106C ( “Core_2” ) to the fourth CQ 204D ( “CQ3” ) . Note that an association 314 maps the fourth CQ 204D to both the second SQ 202B and the third SQ 202C. The association or mapping 314 indicates that the third processor 106C is configured to access UFS transaction response information that has been placed in the fourth CQ 204D responsive to UFS transactions initiated by the second processor 106B. As the second processor 106B initiated the transaction, sending the response information from the fourth CQ 204D, which is controlled by the third processor 106C, to the second processor 106B may require inter-core (i.e., intra-processor) event messaging.
[0035] Further in the exemplary queue-to-processor mapping 300, associations 316, 318 and 320 map the fourth processor 106D ( “Core_3” ) to each of the fifth SQ 202E ( “SQ4” ) , the sixth SQ 202F ( “SQ5” ) , and the seventh SQ 202G ( “SQ6” ) , respectively. Meanwhile, an association 322 maps the fourth processor 106D to the sixth CQ 204F ( “CQ5” ) . The association 324 indicates that the fourth processor 106D is configured to access UFS transaction response information that has been placed in the sixth CQ 204F responsive to UFS transactions initiated by that same (fourth) processor 106D. In this example, providing such response information therefore may require intra-core event messaging.
[0036] As shown in FIG. 4, an exemplary queue-to-processor mapping 400 may represent a dynamic change or adjustment from the above-described mapping 300 (FIG. 3) . Note that the associations in the mappings 300 and 400 are the same or unchanged, with the exception that the association 304 (FIG. 3) has been replaced with the association 402 (FIG. 4) . The association or mapping 402 indicates the third processor 106C is now configured to access UFS transaction response information that has been placed in the first CQ 204A responsive to UFS transactions initiated by the first processor 106A.
[0037] As described below, a change in queue-to-processor mapping, such as, for example, from the mapping 300 (FIG. 3) to the mapping 400 (FIG. 4) , may be performed in response to detection of one or more conditions of a type that may impair the efficiency of accessing response information from a CQ. Referring briefly again to FIG. 1, a condition detector 136 may be included for this purpose. The condition detector 136 may include software, through which one or more of the processors 106 may be configured for the CQ. For example, as shown in FIG. 1 a path 138 indicates that the first processor 106A may be configured to detect the condition through the execution of such software. In this example, the first processor 106A may be configured to monitor for and detect conditions that may include one or more of: the first processor 106A entering a low-power mode; the first processor 106A experiencing a processing load exceeding a threshold; or the first processor 106A experiencing a thermal stress exceeding a threshold. Another path 140 indicates that when the first processor 106A detects any such condition it may alert the HC 108.
[0038] In FIG. 5, a functional block diagram 500 illustrates an example of operation of a system in which: a first processor 502 ( “Core_0” ) is associated with or mapped to a first CQ 504 ( “CQ0” ) ; a second processor 506 ( “Core_1” ) is associated with or mapped to a first SQ 508 ( “SQ1” ) ; a third processor 510 ( “Core_2” ) is associated with or mapped to a second SQ 512 ( “SQ2” ) ; a fourth processor 514 ( “Core_3” ) is associated with or mapped to a third SQ 516 ( “SQ3” ) ; and a fifth processor 518 ( “Core_4” ) is associated with or mapped to a fourth SQ 520 ( “SQ4” ) . These queue-to-processor mappings 522 may be managed by the HC as described above with regard to FIGs. 1-2 (e.g., queue-to-processor mapping 122) . For example, associations or mappings between CQs and processors may be indicated in CQ doorbell registers along with head pointer, tail pointer and other information. In operation, any of the processors 506, 510, 514 or 518 may initiate UFS data transfer transactions by placing UFS commands (e.g., in the form of UTRDs) in their respective associated SQs 508, 512, 516 or 520. As indicated by the block 524, the HC may retrieve UFS commands from an SQ and send them (e.g., in the form of UPIUs) to the UFS device. As indicated by block 526, the HC may also update the SQ doorbell register corresponding to an SQ from which the HC retrieved a UPIU.
[0039] As indicated by block 528, the UFS device may perform a data transfer (i.e., read or write) in response to a command and send response information to the HC. As further indicated by the block 524, the HC may then update the first CQ 504 with the response information received from the UFS device. As indicated by block 530, the HC may also update the CQ doorbell register corresponding to the first CQ 504. The first processor 502 may process response information in the first CQ 504.
[0040] In the illustrated example, while the above-described UFS transactions are occurring, a condition that may impair the performance of the first processor 502 in accessing the first CQ 504 may occur. When the first processor 502 detects such a condition, the first processor 502 may alert the HC. In response to the alert, the HC may replace the association or mapping 532 between the CQ 504 ( “CQ0” ) and the first processor 502 ( “Core_0” ) with an association or mapping 534 between the CQ 504 and, for example, the fourth processor 514 ( “Core_3” ) . (The removal of the mapping 532 is indicated by strikethrough of the text “CQ0” and “Core_0, ” while the added or replacement mapping is indicated by bold of the text “CQ0” and “Core_3. ” ) Following this queue-to-processor mapping change, further response information will no longer be retrieved from the first CQ 504 by the first processor 502 (as indicated by the path 536) but instead will be retrieved from the first CQ 504 by the fourth processor 514 (as indicated by the path 538) . The HC may select from among any of the other processors 506, 510, 514 and 518 to replace the CQ-accessing performance-impaired first processor 502, and it should be understood that the selection of the fourth processor 514 is intended only as an example.
[0041] The HC may select a processor to replace a performance-impaired processor in any manner. For example, the HC may compare processing loads among the available processors and select the processor experiencing the lowest processing load. It may also be advantageous for the HC to select a processor that is not in a low-power mode.
[0042] “Interrupt affinity” is a term that refers to which processor in a multi-processor system services which of multiple interrupts. In accordance with the solutions herein, the interrupt affinity may be dynamically switched or changed. An interrupt request (IRQ) affinity register 540 may be provided in the computing system’s (e.g., SoC’s) interrupt controller 542. For example, the IRQ affinity register 540 may be provided in the Interrupt Translation Service (ITS) portion 544 of the interrupt controller 542. When the HC changes the queue-to-processor mapping 522 to replace an association or mapping between a CQ and a processor with an association or mapping between the CQ and a different processor, the HC may also update the IRQ affinity register 540 accordingly, as indicated by block 546.
[0043] Cache structure may also be a factor in the HC’s selection of a processor to replace a performance-impaired processor. In FIG. 6, an exemplary queue-to-processor mapping 600 is shown. A first processor 602A ( “Core_0” ) is associated with a first SQ 604A (“SQ0” ) and a first CQ 606A ( “CQ0” ) . A second processor 602B ( “Core_1” ) is associated with a second SQ 604B ( “SQ1” ) and a second CQ 606B ( “CQ1” ) . A third processor 602C ( “Core_2” ) is associated with a third SQ 604C ( “SQ2” ) and a third CQ 606C ( “CQ2” ) . A fourth processor 602D ( “Core_3” ) is associated with a fourth SQ 604D ( “SQ3” ) and a fourth CQ 606D ( “CQ3” ) . A fifth processor 602E ( “Core_4” ) is associated with a fifth SQ 604E ( “SQ4” ) and a fifth CQ 606E ( “CQ4” ) . A sixth processor 602F ( “Core_5” ) is associated with a sixth SQ 604F ( “SQ5” ) and a sixth CQ 606F ( “CQ5” ) . A seventh processor 602G ( “Core_6” ) is associated with a seventh SQ 604G ( “SQ6” ) and a seventh CQ 606G ( “CQ6” ) . An eighth processor 602H ( “Core_7” ) is associated with an eighth SQ 604H ( “SQ7” ) and an eighth CQ 606H ( “CQ7” ) .
[0044] As indicated in FIG. 6 by different cross-hatchings, the first processor 602A, second processor 602B, and third processor 602C share a last-level cache (LLC) in this example, while the fourth processor 602D, fifth processor 602E, and sixth processor 602F share another LLC, and the seventh processor 602G and eighth processor 602H share yet another LLC. In response to detecting one of the above-described conditions or other condition that may impair processor CQ accessing performance, the HC may base the selection of a replacement processor on, among other factors, which processors share an LLC. For example, it may be preferable to select a replacement processor that shares an LLC with the performance-impaired processor over those that do not share an LLC with the performance-impaired processor. It may be noted that different processor configurations may have different LLC configurations. For example, one SoC may have as an LLC a third-level or “L3” cache that is shared among two or more clusters, each having two or more processors, while another SoC may have as an LLC a second-level or “L2” cache that is shared among two or more processors of the same cluster.
[0045] Continuing this example on FIG. 7, CQ access performance impairment of, for example, the fourth processor 602D ( “Core_3” ) may be detected. In response to such detection, the HC may change the queue-to-processor mapping to de-associate the fourth processor 602D ( “Core_3” ) from the fourth CQ 606D, and to instead associate the sixth processor 602F ( “Core_5” ) with the fourth CQ 606D. Note that, conceptually, the fourth CQ 606D is “moved” from being associated with the fourth SQ 604D (absence of the CQ 606D from this conceptual place of association being indicated in broken-line outline) to being associated with the sixth SQ 604F. Following this change in the queue-to-processor mapping, the sixth processor 602F ( “Core_5” ) will read response information from the fourth CQ 606D that reflect the UFS device’s responses to commands placed in the fourth SQ 604D by the fourth processor 602D ( “Core_3” ) , and the fourth processor 602D will no longer read response information from the fourth CQ 606D. The response information is still ultimately returned to the fourth processor 602D ( “Core_3” ) , even though the sixth processor 602F ( “Core_5” ) is now (i.e., following the queue-to-processor mapping change) responsible for reading the response information from the fourth CQ 606D. A queue-to-processor mapping change involving processors within the same LLC may avoid needing to service an IPI and the attendant overhead.
[0046] In FIG. 8, a method 800 for dynamically associating processors and data storage system queues (e.g., UFS host queues) in a multi-processor computing device is illustrated in flow diagram form. As indicated by block 802, the method 800 may include detecting a condition impairing completion queue accessing performance of a first processor. This detecting may be performed or controlled by, for example, the first processor, which may be one of the multiple (i.e., two or more) processors. Detecting the condition may comprise one of more of the following: detecting that the first processor is entering or has entered a low-power mode; detecting that the first processor is experiencing a processing load exceeding a processing threshold; or detecting that the first processor is experiencing a thermal stress exceeding a thermal threshold.
[0047] As indicated by block 804, the method 800 may further include updating a queue-to-processor mapping. Updating the queue-to-processor mapping may include replacing an association between a CQ and the first processor with an association between the CQ and a second processor of the multiple processors when the condition is detected. This updating of the queue-to-processor mapping may be performed or controlled by, for example, a host controller system associated with the data storage system.
[0048] FIG. 9 illustrates an example of a portable computing device (PCD) 900, in which exemplary embodiments of systems, methods, and other examples of dynamic data storage system queues (e.g., MCQs) may be provided. The PCD 900 may be, for example, a laptop or palmtop computer, cellular telephone or smartphone, personal digital assistant, navigation device, smartbook, portable game console, satellite telephone, automotive device, Internet-of-Things (IoT) device, etc.
[0049] The PCD 900 may include an SoC 902. The SoC 902 may include a CPU 904, a GPU 906, a digital signal processor (DSP) 907, an analog signal processor 908, a modem / modem subsystem 954, or other processors. The CPU 904 may include one or more CPU cores, such as a first CPU core 904A, a second CPU core 904B, etc., through an Nth CPU core 904N. The cores 904A-904N may be examples of the cores, CPUs, processors, etc., described above with regard to FIGs. 1-8.
[0050] A display controller 910 and a touch-screen controller 912 may be coupled to the CPU 904. A touchscreen display 914 external to the SoC 902 may be coupled to the display controller 910 and the touch-screen controller 912. The PCD 900 may further include a video decoder 916 coupled to the CPU 904. A video amplifier 918 may be coupled to the video decoder 916 and the touchscreen display 914. A video port 920 may be coupled to the video amplifier 918. A universal serial bus (USB) controller 922 may also be coupled to CPU 904, and a USB port 924 may be coupled to the USB controller 922. A subscriber identity module (SIM) card 926 may also be coupled to the CPU 904.
[0051] The CPU 904 may be coupled to one or more memories, with which the CPU 904 or other processors may initiate memory transactions. The one or more memories may include both volatile and non-volatile memories. Examples of volatile memories include static random access memory (SRAM) 928 and dynamic random access memory (DRAM) 930. A DRAM controller 932 coupled to the CPU 904 may control the writing of data to, and reading of data from, the DRAM 930. An example of a non-volatile memory is a UFS device 931. A UFS HC 933 may be coupled to the UFS device 931 and the CPU 904. The UFS HC 933 may support a MCQ mode and be configured in the manner described to dynamically associate or map completion queues (CQs) with processors, such as the CPU cores 904A-904N. The CPU cores 904A, 904B, etc., may accordingly be configured in the manner described above with regard to this feature. The DRAM 930 may be an example of a host memory in which MCQs (i.e., CQs and SQs) may be provided.
[0052] A stereo audio CODEC 934 may be coupled to the analog signal processor 908. Further, an audio amplifier 936 may be coupled to the stereo audio CODEC 934. First and second stereo speakers 938 and 940, respectively, may be coupled to the audio amplifier 936. In addition, a microphone amplifier 942 may be coupled to the stereo audio CODEC 934, and a microphone 944 may be coupled to the microphone amplifier 942. A frequency modulation (FM) radio tuner 946 may be coupled to the stereo audio CODEC 934. An FM antenna 948 may be coupled to the FM radio tuner 946. Further, stereo headphones 950 may be coupled to the stereo audio CODEC 934. Other devices that may be coupled to the CPU 904 include one or more digital (e.g., CCD or CMOS) cameras 952.
[0053] The RF transceiver or modem subsystem 954 may be coupled to the analog signal processor 908 and the CPU 904. An RF switch 956 may be coupled to the modem subsystem 954 and an RF antenna 958. In addition, a keypad 960, a mono headset with a microphone 962, and a vibrator device 964 may be coupled to the analog signal processor 908.
[0054] The SoC 902 may have one or more internal or on-chip thermal sensors 970A and may be coupled to one or more external or off-chip thermal sensors 970B. An analog-to-digital converter controller 972 may convert voltage drops produced by the thermal sensors 970A and 970B to digital signals. A power supply 974 and a power management integrated circuit (PMIC) 976 may supply power to the SoC 902.
[0055] Implementation examples are described in the following numbered clauses.
[0056] 1. A method for dynamically associating processors and data storage system queues in a multi-processor computing device, comprising:
[0057] detecting, by one of a plurality of processors, a condition impairing completion queue accessing performance of the one of the plurality of processors; and
[0058] updating, by a host controller system associated with the data storage system, a queue-to-processor mapping, including replacing an association between a completion queue and the one of the plurality of processors with an association between the completion queue and another processor of the plurality of processors when the condition is detected.
[0059] 2. The method of clause 1, wherein the condition comprises the one of the plurality of processors entering a low-power mode.
[0060] 3. The method of clause 1 or 2, wherein the condition comprises the one of the plurality of processors experiencing a processing load exceeding a processing threshold.
[0061] 4. The method of any of clauses 1-3, wherein the condition comprises the one of the plurality of processors experiencing a thermal stress exceeding a thermal threshold.
[0062] 5. The method of any of clauses 1-4, wherein the data storage system comprises a Universal Flash Storage (UFS) device.
[0063] 6. The method of any of clauses 1-5, wherein updating the queue-to-processor mapping includes updating memory-mapped input / output (MMIO) registers of the host controller system.
[0064] 7. The method of any of clauses 1-6, wherein updating the queue-to-processor mapping includes updating an interrupt-processor affinity register of an interrupt controller.
[0065] 8. A system in a multi-processor computing device, comprising:
[0066] a plurality of submission queues and a plurality of completion queues configured in a memory of the computing device, the computing device having a data storage device; and
[0067] a host controller system configured to access the plurality of submission queues and the plurality of completion queues in association with storage device data transfers, the host controller system further configured to receive an indication of a condition impairing completion queue accessing performance of one of a plurality of processors of the computing device, the host controller system still further configured to update a queue-to-processor mapping, including replacing an association between a completion queue and the one of the plurality of processors with an association between the completion queue and another processor of the plurality of processors when the indication of the condition is received.
[0068] 9. The system of clause 8, wherein the condition comprises the one of the plurality of processors entering a low-power mode.
[0069] 10. The system of clause 8 or 9, wherein the condition comprises the one of the plurality of processors experiencing a processing load exceeding a processing threshold.
[0070] 11. The system of any of clauses 8-10, wherein the condition comprises the one of the plurality of processors experiencing a thermal stress exceeding a thermal threshold.
[0071] 12. The system of any of clauses 8-11, wherein the data storage device comprises a Universal Flash Storage (UFS) device.
[0072] 13. The system of any of clauses 8-12, wherein the host controller system is configured to update the queue-to-processor mapping in memory-mapped input / output (MMIO) registers.
[0073] 14. The system of any of clauses 8-13, wherein the host controller system is configured to update an interrupt-processor affinity register of an interrupt controller.
[0074] 15. A system-on-chip (SoC) , comprising:
[0075] a plurality of processors; and
[0076] a host controller system configured to control data transfers between the plurality of processors and a data storage device and to access a plurality of submission queues and a plurality of completion queues in association with the data transfers, the host controller system further configured to receive an indication of a condition impairing completion queue accessing performance of one of the plurality of processors, the host controller system still further configured to update a queue-to-processor mapping, including replacing an association between a completion queue and the one of the plurality of processors with an association between the completion queue and another processor of the plurality of processors when the indication of the condition is received.
[0077] 16. The SoC of clause 15, wherein the condition comprises the one of the plurality of processors entering a low-power mode.
[0078] 17. The SoC of clause 15 or 16, wherein the condition comprises the one of the plurality of processors experiencing a processing load exceeding a processing threshold.
[0079] 18. The SoC of any of clauses 15-17, wherein the condition comprises the one of the plurality of processors experiencing a thermal stress exceeding a thermal threshold.
[0080] 19. The SoC of any of clauses 15-18, wherein the data storage device comprises a Universal Flash Storage (UFS) device.
[0081] 20. The SoC of any of clauses 15-19, wherein the host controller system is configured to update an interrupt-processor affinity register of an interrupt controller.
[0082] Alternative embodiments will become apparent to one of ordinary skill in the art to which the invention pertains. Therefore, although selected aspects have been illustrated and described in detail, it will be understood that various substitutions and alterations may be made therein.
Claims
1.A method for dynamically associating processors and data storage system queues in a multi-processor computing device, comprising:detecting, by one of a plurality of processors, a condition impairing completion queue accessing performance of the one of the plurality of processors; andupdating, by a host controller system associated with the data storage system, a queue-to-processor mapping, including replacing an association between a completion queue and the one of the plurality of processors with an association between the completion queue and another processor of the plurality of processors when the condition is detected.2.The method of claim 1, wherein the condition comprises the one of the plurality of processors entering a low-power mode.3.The method of claim 1, wherein the condition comprises the one of the plurality of processors experiencing a processing load exceeding a processing threshold.4.The method of claim 1, wherein the condition comprises the one of the plurality of processors experiencing a thermal stress exceeding a thermal threshold.5.The method of claim 1, wherein the data storage system comprises a Universal Flash Storage (UFS) device.6.The method of claim 1, wherein updating the queue-to-processor mapping includes updating memory-mapped input / output (MMIO) registers of the host controller system.7.The method of claim 1, wherein updating the queue-to-processor mapping includes updating an interrupt-processor affinity register of an interrupt controller.8.A system in a multi-processor computing device, comprising:a plurality of submission queues and a plurality of completion queues configured in a memory of the computing device, the computing device having a data storage device; anda host controller system configured to access the plurality of submission queues and the plurality of completion queues in association with storage device data transfers, the host controller system further configured to receive an indication of a condition impairing completion queue accessing performance of one of a plurality of processors of the computing device, the host controller system still further configured to update a queue-to-processor mapping, including replacing an association between a completion queue and the one of the plurality of processors with an association between the completion queue and another processor of the plurality of processors when the indication of the condition is received.9.The system of claim 8, wherein the condition comprises the one of the plurality of processors entering a low-power mode.10.The system of claim 8, wherein the condition comprises the one of the plurality of processors experiencing a processing load exceeding a processing threshold.11.The system of claim 8, wherein the condition comprises the one of the plurality of processors experiencing a thermal stress exceeding a thermal threshold.12.The system of claim 8, wherein the data storage device comprises a Universal Flash Storage (UFS) device.13.The system of claim 8, wherein the host controller system is configured to update the queue-to-processor mapping in memory-mapped input / output (MMIO) registers.14.The system of claim 8, wherein the host controller system is configured to update an interrupt-processor affinity register of an interrupt controller.15.A system-on-chip (SoC) , comprising:a plurality of processors; anda host controller system configured to control data transfers between the plurality of processors and a data storage device and to access a plurality of submission queues and a plurality of completion queues in association with the data transfers, the host controller system further configured to receive an indication of a condition impairing completion queue accessing performance of one of the plurality of processors, the host controller system still further configured to update a queue-to-processor mapping, including replacing an association between a completion queue and the one of the plurality of processors with an association between the completion queue and another processor of the plurality of processors when the indication of the condition is received.16.The SoC of claim 15, wherein the condition comprises the one of the plurality of processors entering a low-power mode.17.The SoC of claim 15, wherein the condition comprises the one of the plurality of processors experiencing a processing load exceeding a processing threshold.18.The SoC of claim 15, wherein the condition comprises the one of the plurality of processors experiencing a thermal stress exceeding a thermal threshold.19.The SoC of claim 15, wherein the data storage device comprises a Universal Flash Storage (UFS) device.20.The SoC of claim 15, wherein the host controller system is configured to update an interrupt-processor affinity register of an interrupt controller.