WO2021259321A1 - Storage scheduling method, device, and storage medium - Google Patents

Storage scheduling method, device, and storage medium Download PDF

Info

Publication number
WO2021259321A1
WO2021259321A1 PCT/CN2021/101809 CN2021101809W WO2021259321A1 WO 2021259321 A1 WO2021259321 A1 WO 2021259321A1 CN 2021101809 W CN2021101809 W CN 2021101809W WO 2021259321 A1 WO2021259321 A1 WO 2021259321A1
Authority
WO
WIPO (PCT)
Prior art keywords
chip
queue
target
storage
current
Prior art date
Application number
PCT/CN2021/101809
Other languages
French (fr)
Chinese (zh)
Inventor
付行双
陈昌胜
仲建锋
胡达
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2021259321A1 publication Critical patent/WO2021259321A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Definitions

  • the embodiments of the present disclosure relate to the field of communication technologies, and in particular, to a storage scheduling method, device, and storage medium.
  • the performance index is often achieved by increasing the number of queues and correspondingly increasing the off-chip storage space.
  • the messages in each queue can be stored in on-chip storage space or off-chip storage devices. When a new message is received, the storage location of the message needs to be scheduled.
  • the storage scheduling method for scheduling the storage location of the message in addition to meeting the function of moving the message from the on-chip to the off-chip storage device, also needs to improve the utilization of on-chip resources, minimize the discarding of messages, and improve the chip Overall performance.
  • the main purpose of the embodiments of the present disclosure is to propose a storage scheduling method, device, and storage medium, aiming to realize the function of improving the utilization of on-chip storage space through storage scheduling, thereby improving the overall performance of the chip.
  • the embodiments of the present disclosure provide a storage scheduling method.
  • the method includes the following steps: combining the length of the received target message and the target corresponding to the target message.
  • the sum of the current on-chip queue depths of the queue is determined as the update depth of the target queue; when the update depth of the target queue is greater than the movement threshold of the target queue, it is determined that the target message needs to be moved to an off-chip storage device Storage; if the bandwidth of the current off-chip storage device is sufficient and the capacity of the off-chip storage device is sufficient, the target message is moved to the off-chip and stored on the off-chip storage device, and the on-chip queue depth of the target queue remains unchanged; if the current chip The bandwidth of the external storage device is insufficient or the capacity of the off-chip storage device is insufficient, and the current on-chip storage occupancy value is less than or equal to the preset storage occupancy threshold, the target message is stored in the on-chip storage device, and the current update depth of the target
  • the embodiments of the present disclosure also propose a storage scheduling device, the device includes a memory, a processor, is stored on the memory and can run on the processor
  • the program and the data bus used to realize the connection and communication between the processor and the memory, and when the program is executed by the processor, the steps of the foregoing method are implemented.
  • embodiments of the present disclosure provide a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs It may be executed by one or more processors to implement the steps of the foregoing method.
  • the storage scheduling method, device and storage medium proposed in this embodiment include: determining the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the update depth of the target queue. When the update depth of the target queue is greater than the moving threshold of the target queue, it is determined that the target message needs to be moved to an off-chip storage device for storage.
  • the target message is moved to the off-chip and stored on the off-chip storage device, and the on-chip queue depth of the target queue remains unchanged; if the current off-chip storage is The device bandwidth is insufficient or the off-chip storage device capacity is insufficient, and the current on-chip storage occupancy value is less than or equal to the preset storage occupancy threshold, the target message is stored in the on-chip storage device, and the current update depth of the target queue is , The sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined as the new current on-chip queue depth of the target queue; if the current on-chip storage occupancy value is greater than the preset If the storage occupancy threshold is set, the target message is moved and discarded, and the on-chip queue depth of the target queue remains unchanged.
  • the target queue when the update depth of the target queue is greater than the moving threshold of the target queue, on the one hand, when the off-chip storage device cannot successfully store the target message and the current on-chip storage occupancy value is less than the preset storage occupancy threshold, the target queue The message is stored in the on-chip space again, which improves the utilization of the on-chip storage space, thereby improving the overall performance of the chip; on the other hand, the off-chip storage device cannot successfully store the target message and the current on-chip storage occupancy value is greater than the preset Only when the storage occupancy threshold is triggered, the move and discard of the target message is triggered to discard the message, so as to reduce the probability of discarding the message as much as possible, and to prevent the storage scheduling method from affecting the normal operation of the business.
  • FIG. 1 is a flowchart of a storage scheduling method provided by an embodiment
  • FIG. 2 is a flowchart of a storage scheduling method provided by another embodiment
  • FIG. 3 is a schematic structural diagram of a storage scheduling device provided by an embodiment
  • FIG. 4 is a schematic structural diagram of a storage scheduling device provided by another embodiment
  • FIG. 5 is a schematic structural diagram of a storage scheduling device provided by another embodiment
  • Fig. 6 is a schematic structural diagram of a storage scheduling device provided by an embodiment.
  • the embodiment of the present disclosure provides a storage scheduling method, including: determining the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the update depth of the target queue. When the update depth is greater than the moving threshold of the target queue, it is determined that the target message needs to be moved to an off-chip storage device for storage.
  • the target message is moved off-chip and stored on the off-chip storage device, and the on-chip queue depth of the target queue remains unchanged; if the current off-chip The bandwidth of the storage device is insufficient or the capacity of the off-chip storage device is insufficient, and the current on-chip storage occupancy value is less than or equal to the preset storage occupancy threshold, then the target message is stored in the on-chip storage device, and the current update depth of the target queue , That is, the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined as the new current on-chip queue depth of the target queue; if the current on-chip storage occupancy value If it is greater than the preset storage occupancy threshold, the target message is moved and discarded, and the on-chip queue depth of the target queue remains unchanged.
  • the target queue when the update depth of the target queue is greater than the moving threshold of the target queue, on the one hand, when the off-chip storage device cannot successfully store the target message and the current on-chip storage occupancy value is less than the preset storage occupancy threshold, the target queue The message is stored in the on-chip space again, which improves the utilization of the on-chip storage space, thereby improving the overall performance of the chip; on the other hand, the off-chip storage device cannot successfully store the target message and the current on-chip storage occupancy value is greater than the preset Only when the storage occupancy threshold is triggered, the move and discard of the target message is triggered, and the message is discarded, so as to reduce the probability of discarding the message as much as possible, and to prevent the storage scheduling method from affecting the normal operation of the business.
  • FIG. 1 is a flowchart of a storage scheduling method provided by an embodiment of the disclosure. This embodiment is applicable to a scenario where the storage location of a message is scheduled. This embodiment may be executed by a storage scheduling apparatus, which may be implemented by software and/or hardware, and the storage scheduling apparatus may be integrated into a communication device. As shown in Figure 1, the storage scheduling method provided in this embodiment includes the following steps:
  • Step 101 The sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined as the update depth of the target queue.
  • the queues in this embodiment can be divided according to users, that is, messages of different users belong to different queues, or they can be divided according to service types, that is, messages of different services belong to different queues, or queues can be divided according to other factors. , This implementation does not impose restrictions on this.
  • the storage scheduling apparatus After receiving the target message, the storage scheduling apparatus needs to determine whether the target message is stored in the on-chip storage space or in the off-chip storage device.
  • the on-chip storage space in this embodiment refers to the storage space on the chip in the storage scheduling device.
  • the on-chip storage space in this embodiment may be cache space, random access memory (Random Access Memory, RAM), etc.
  • the off-chip storage device in this embodiment may be a storage device provided outside the chip.
  • the chip in this embodiment may be a chip in a network processing engine.
  • the target message may carry the queue number. After receiving the target message, the queue corresponding to the target message is determined according to the queue number of the target message. For the convenience of description, the queue corresponding to the target message is called the target queue.
  • the current on-chip queue depth of the target queue refers to the length of the message stored in the on-chip storage space in the target queue.
  • the current on-chip queue depth of the target queue can be obtained from the module that manages the on-chip queue depth in the storage scheduling device after receiving the target message, or it can be obtained according to the current on-chip queue depth after receiving the target message.
  • the length of the message stored in the on-chip storage space is directly calculated.
  • the length of the message in this embodiment may refer to the length under different metrics such as the number of bytes of the message and the number of slices of the message.
  • the sum of the length of the received target message and the current on-chip queue depth of the target queue is determined as the update depth of the target queue. For example, assuming that the length of the target message is c0 and the current on-chip queue depth of the target queue is b0, then c0+b0 is determined as the update depth of the target queue.
  • Step 102 When the update depth of the target queue is greater than the moving threshold of the target queue, it is determined that the target message needs to be moved to an off-chip storage device for storage.
  • each target queue corresponds to a moving threshold
  • the moving threshold may be preset.
  • the moving threshold of the target queue can be set according to the needs of the user, or it can be sent to the storage scheduling device by other devices.
  • the update depth of the target queue is greater than the moving threshold of the target queue, it means that the target queue is congested at this time, that is, in the scenario where the message enters the queue fast and the dequeue is slow, it is determined that the target message needs Move to an off-chip storage device for storage.
  • the target message when the update depth of the target queue is less than or equal to the moving threshold of the target queue, the target message is stored in the on-chip storage space; the current on-chip queue depth of the target queue is added to the length of the target message And, determine the new current on-chip queue depth of the target queue.
  • the target queue when the target queue is not congested, that is, in a scenario where messages are slow to enter the queue and quickly dequeue, after storing the target message in the on-chip storage space, update the current on-chip queue depth of the target queue. Improve the accuracy of the current on-chip queue depth of the target queue, thereby improving the accuracy of subsequent storage scheduling and further improving the performance of the chip.
  • the way the messages in the queue are stored in the on-chip storage space can be shared storage, that is, multiple queues share on-chip storage space, or exclusive storage, that is, each queue has its own corresponding
  • the on-chip storage space can also be hybrid storage, that is, multiple queues share a part of the on-chip storage space, and each queue also has its own corresponding on-chip storage space. This embodiment does not limit the storage mode of the queue message in the on-chip storage space.
  • Step 103 Determine whether the bandwidth of the current off-chip storage device is sufficient, and whether the cache capacity of the off-chip storage device is sufficient.
  • the status information sent by the off-chip storage device needs to be received to determine whether the off-chip storage device can store the target message.
  • the off-chip storage device may send the status information to the storage scheduling apparatus at a preset frequency.
  • the status information is used to indicate whether the off-chip storage device has the ability to store target messages.
  • the status information may be information such as the current bandwidth and/or current remaining storage space of the off-chip storage device.
  • Step 104 If the bandwidth of the current off-chip storage device is sufficient and the capacity of the off-chip storage device is sufficient, move the target message to the off-chip and store in the off-chip storage device, and perform step 105;
  • the storage scheduling apparatus determines that the target message needs to be moved to the off-chip storage device for storage. , The target message will be moved to the off-chip storage device for storage.
  • Step 105 The on-chip queue depth of the target queue remains unchanged.
  • the on-chip queue depth of the target queue corresponding to the target message does not change, and the current on-chip storage occupancy value also does not change.
  • the current on-chip storage occupancy value refers to the sum of the current on-chip queue depths of all queues.
  • the current on-chip storage occupancy value may be sent to the storage scheduling device by other modules.
  • Step 106 If the bandwidth of the current off-chip storage device is insufficient, or the storage capacity of the off-chip storage device is sufficient, step 107 is executed.
  • the current off-chip storage device does not have the ability to store the target message.
  • the target message will not be moved, and will not be moved to the off-chip storage device.
  • Step 107 Whether the current on-chip storage occupancy value is greater than the on-chip preset storage occupancy threshold.
  • the target message that needs to be moved off-chip when the off-chip storage device does not have the ability to store the target message, it is determined according to the comparison result of the current on-chip storage occupancy value and the on-chip preset storage occupancy threshold Whether the current on-chip storage device has the ability to store target messages.
  • the storage scheduling device needs to determine the current on-chip storage occupancy value: the sum of the current on-chip queue depths of all queues is determined as the current on-chip storage occupancy value. In this implementation manner, the sum of the current on-chip queue depths of all queues is determined as the current on-chip storage occupancy value, which can improve the accuracy of the current on-chip storage occupancy value as much as possible.
  • the current on-chip storage occupancy value may be sent to the storage scheduling device by other modules.
  • Step 108 When the current on-chip storage occupancy value is greater than the on-chip preset storage occupancy threshold, the target message that needs to be moved off-chip is stored on the chip again.
  • the current on-chip storage occupancy value is less than the preset storage occupancy threshold, indicating that there is excess storage space in the on-chip storage device at this time, and the current on-chip storage device has the ability to store the target message.
  • the off-chip storage device cannot successfully store the target message. However, when the current on-chip storage device has the ability to store the target message, the message in the target queue is re-stored in the on-chip space, which improves the utilization of the on-chip storage space. , Improve the overall performance of the chip.
  • Step 109 Determine the current update depth of the target queue, that is, the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the new current on-chip queue depth of the target queue.
  • the current on-chip queue depth of the target queue needs to be updated.
  • the specific update method is: the sum of the current on-chip queue depth of the target queue plus the length of the target message is determined as the new current on-chip queue depth of the target queue.
  • Step 110 When the previous on-chip storage occupancy value is less than or equal to the on-chip preset storage occupancy threshold, the target message is moved and discarded.
  • the off-chip storage device cannot store the target message
  • the on-chip storage device cannot store the target message
  • the target message is marked as being moved and discarded, and the storage scheduling device moves and discards the target message.
  • the move and discard of the target message is triggered to discard the message, so as to reduce the number of discarded messages as much as possible. The probability of avoiding the storage scheduling method from affecting the normal operation of the business.
  • the foregoing method of determining whether a message is moved or discarded is simple to implement and highly efficient.
  • Step 111 The on-chip queue depth of the target queue remains unchanged.
  • the information that needs to be configured may include: the number of queues, the movement threshold corresponding to each queue, and the preset storage occupancy threshold, etc.
  • the embodiment of the present disclosure provides a storage scheduling method, including: determining the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the update depth of the target queue. When the update depth is greater than the move threshold of the target queue, it is determined that the target message needs to be moved to the off-chip storage device for storage. If the current off-chip storage device has sufficient bandwidth and the off-chip storage device capacity is sufficient, move the target message off-chip and store it in the off-chip.
  • the on-chip queue depth of the target queue remains unchanged; if the bandwidth of the current off-chip storage device is insufficient or the capacity of the off-chip storage device is insufficient, and the current on-chip storage occupancy value is less than or equal to the preset storage occupancy threshold, the target The message is stored in the on-chip storage device, and the current update depth of the target queue, that is, the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message, is determined as the new target queue The current on-chip queue depth; if the current on-chip storage occupancy value is greater than the preset storage occupancy threshold, the target message is moved and discarded, and the on-chip queue depth of the target queue remains unchanged.
  • the target queue when the update depth of the target queue is greater than the moving threshold of the target queue, on the one hand, when the off-chip storage device cannot successfully store the target message and the current on-chip storage occupancy value is less than the preset storage occupancy threshold, the target queue The message is stored in the on-chip space again, which improves the utilization of the on-chip storage space, thereby improving the overall performance of the chip; on the other hand, the off-chip storage device cannot successfully store the target message and the current on-chip storage occupancy value is greater than the preset Only when the storage occupancy threshold is triggered, the move and discard of the target message is triggered to discard the message, so as to reduce the probability of discarding the message as much as possible, and to prevent the storage scheduling method from affecting the normal operation of the business.
  • FIG. 2 is a flowchart of a storage scheduling method provided by another embodiment of the present disclosure. This embodiment provides a detailed description of other steps included in the storage scheduling method on the basis of the embodiment shown in FIG. 1 and various alternative solutions. As shown in Figure 2, the storage scheduling method provided in this embodiment includes the following steps:
  • Step 201 Determine the attributes of the target message.
  • Step 202 When it is judged that the attribute of the target message is an on-chip message, the target message is stored in the on-chip storage.
  • Step 203 When it is determined that the attribute of the target message is an off-chip message, the target message is stored in an off-chip storage device.
  • Step 204 When it is determined that the attribute of the target message is a mixed type, it is determined to execute step 205.
  • the step of determining the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined to be the update depth of the target queue.
  • the target message will carry its own attribute information.
  • the attributes of the message in this embodiment may include: mixed-type messages, on-chip messages, and off-chip messages.
  • mixed type messages refer to messages that can be stored in off-chip storage devices or in on-chip storage space.
  • On-chip messages refer to messages that can only be stored in on-chip storage space.
  • Messages refer to messages that can only be stored in off-chip storage devices.
  • the attributes of the target message are first judged. Select subsequent operations based on the attributes of the target message.
  • the first case when it is determined that the target message is an on-chip message, no storage scheduling is required, and the target message is stored in the on-chip storage space.
  • the second case when it is determined that the attributes of the target message are of mixed types, it is necessary to determine whether the target message needs to be stored on-chip or off-chip at this time, that is, storage scheduling needs to be performed, and step 205 is determined to be executed.
  • the third case when it is determined that the target message is an off-chip message, there is no need to perform storage scheduling, and the target message is stored in an off-chip storage device.
  • Storage scheduling can be performed when storage scheduling is needed, avoiding the business processing efficiency caused by blind scheduling to store on-chip messages to off-chip storage devices Reduce, or, store off-chip messages to the on-chip storage space to occupy the on-chip storage space.
  • the messages in the same queue in this embodiment may be messages of the same attribute or messages of different attributes. This embodiment is not limited to this.
  • Step 205 The sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined as the update depth of the target queue.
  • step 205 The implementation process and technical principles of step 205 are similar to that of step 101, and will not be repeated here.
  • Step 206 Determine whether the update depth of the target queue is greater than the moving threshold of the target queue.
  • Step 207 When the update depth of the target queue is less than or equal to the moving threshold of the target queue, store the target message in the on-chip storage space.
  • step 207 the update depth of the target queue is less than or equal to the moving threshold of the target queue, indicating that the target message can be stored in the on-chip storage space. Therefore, the target message is stored in the on-chip storage space.
  • Step 208 The sum of the current on-chip queue depth of the target queue plus the length of the target message is determined as the new current on-chip queue depth of the target queue.
  • step 208 after storing the target message in the on-chip storage space, the current on-chip queue depth of the target queue needs to be updated to improve the accuracy of subsequent storage scheduling.
  • the update method is to determine the new current on-chip queue depth of the target queue by adding the sum of the current on-chip queue depth of the target queue to the length of the target message.
  • Step 209 When the update depth of the target queue is greater than the moving threshold of the target queue, it is determined that the target message needs to be moved to an off-chip storage device for storage.
  • step 209 and step 102 are similar, and will not be repeated here.
  • Step 210 Determine whether the bandwidth of the current off-chip storage device is sufficient, and whether the cache capacity of the off-chip storage device is sufficient.
  • the status information sent by the off-chip storage device needs to be received to determine whether the off-chip storage device can store the target message.
  • the off-chip storage device may send the status information to the storage scheduling apparatus at a preset frequency.
  • the status information is used to indicate whether the off-chip storage device has the ability to store target messages.
  • the status information may be information such as the current bandwidth and/or current remaining storage space of the off-chip storage device.
  • Step 211 If the bandwidth of the current off-chip storage device is sufficient and the capacity of the off-chip storage device is sufficient, move the target message to the off-chip and store in the off-chip storage device.
  • the storage scheduling device moves the target message to the off-chip storage device for storage.
  • Step 212 Move the target message to the off-chip and store it in the off-chip storage device.
  • Step 213 The on-chip queue depth of the target queue remains unchanged.
  • the storage scheduling device After the storage scheduling device successfully moves the target message to the off-chip storage device for storage, it does not need to update the current on-chip queue depth of the target queue. Since the current on-chip queue depth of the target queue has not changed in this scenario, the current on-chip queue depth of the target queue is determined as the new current on-chip queue depth of the target queue.
  • step 211 and step 105 are similar, and will not be repeated here.
  • Step 214 If the bandwidth of the current off-chip storage device is insufficient, or the storage capacity of the off-chip storage device is sufficient, step 215 is executed.
  • step 214 and step 106 are similar, and will not be repeated here.
  • Step 215 Whether the current on-chip storage occupancy value is greater than the on-chip preset storage occupancy threshold.
  • the target message that needs to be moved off-chip when the off-chip storage device does not have the ability to store the target message, it is determined according to the comparison result of the current on-chip storage occupancy value and the on-chip preset storage occupancy threshold Whether the current on-chip storage device has the ability to store target messages.
  • step 215 The implementation process and technical principles of step 215 are similar to step 107, and will not be repeated here.
  • Step 216 When the current on-chip storage occupancy value is greater than the on-chip preset storage occupancy threshold, the target message that needs to be moved off-chip is stored on the chip again.
  • the current on-chip storage occupancy value is less than the preset storage occupancy threshold, indicating that there is excess storage space in the on-chip storage device at this time, and the current on-chip storage device has the ability to store the target message.
  • the off-chip storage device cannot successfully store the target message. However, when the current on-chip storage device has the ability to store the target message, the message in the target queue is re-stored in the on-chip space, which improves the utilization of the on-chip storage space. , Improve the overall performance of the chip.
  • Step 217 Determine the current update depth of the target queue, that is, the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the new current on-chip queue depth of the target queue.
  • step 217 The implementation process and technical principles of step 217 are similar to step 109, and will not be repeated here.
  • Step 218 When the previous on-chip storage occupancy value is less than or equal to the on-chip preset storage occupancy threshold, the target message is moved and discarded.
  • the off-chip storage device cannot store the target message
  • the on-chip storage device cannot store the target message
  • the target message is marked as being moved and discarded, and the storage scheduling device moves and discards the target message.
  • the move and discard of the target message is triggered to discard the message, so as to reduce the number of discarded messages as much as possible. The probability of avoiding the storage scheduling method from affecting the normal operation of the business.
  • Step 219 The on-chip queue depth of the target queue remains unchanged.
  • the storage scheduling device moves and discards the target message, it does not need to update the current on-chip queue depth of the target queue. Since the current on-chip queue depth of the target queue has not changed in this scenario, the current on-chip queue depth of the target queue is determined as the new current on-chip queue depth of the target queue.
  • FIG. 3 is a schematic structural diagram of a storage scheduling device provided by an embodiment.
  • the storage scheduling device provided in this embodiment includes the following modules: a threshold management module 31, a movement state counting module 32, and a movement arbitration module 33.
  • the threshold management module 31 and the movement state counting module 32 are both connected to the movement arbitration module 33.
  • the threshold management module 31 can implement the movement threshold of the query queue and the query on-chip storage occupancy threshold. Assuming that the number of queues is two, numbered 0 and 1, then the threshold management module 31 can query the corresponding queue movement threshold according to the queue number, and store it in the shared temporary storage register for the movement arbitration module 33 to use, or according to the queue number Query the corresponding storage occupancy threshold. Assume that the shift domain value corresponding to queue 0 is a0, and the corresponding storage occupancy threshold value is s0. The moving threshold corresponding to queue 1 is a1, and the corresponding storage occupancy threshold is s1.
  • the moving state counting module 32 can determine the current on-chip queue depth of the queue, determine the update depth of the queue, and determine the new current on-chip queue depth of the queue. Further, the moving state counting module 32 can also determine the message attributes of the target message.
  • Fig. 3 includes N+1 moving state counting modules 32.
  • Each moving state counting module 32 can manage the current on-chip queue depth of queues in different dimensions. For example, the movement state counting module 0 manages the current on-chip queue depth of Q+1 queues when the queue is divided from dimension A, and the movement state counting module N manages the current on-chip queue depth of Q+1 queues when the queue is divided from dimension M.
  • the current on-chip queue depth of queue 0 is b0
  • the current chip queue depth of queue 1 is b1.
  • queue 0 and queue 1 can be queues in any dimension.
  • the movement arbitration module 33 includes an on-chip resource judgment sub-module 331 and a scheduler 332.
  • the number of schedulers 332 may be multiple.
  • the configuration value of scheduler 0 is 2'b00, which means that scheduler 0 performs system-level scheduling.
  • the scheduler 0 is used to calculate the on-chip storage space consumption status in real time, that is, to calculate the current on-chip storage occupancy value.
  • Other schedulers are used to schedule the queue.
  • Each queue can correspond to a scheduler.
  • queue 0 corresponds to scheduler 1
  • queue 1 corresponds to scheduler 2.
  • the configuration value of scheduler 1 and scheduler 2 is 2'b01, which indicates that the scheduling strategy is flow queue level scheduling.
  • the length of the message received by queue 0 is c0
  • the on-chip storage occupancy value at this time is c0'
  • the current on-chip queue depth of queue 0 is b0.
  • the received message is stored in the on-chip storage space.
  • the length of the message received by queue 1 is c1
  • the on-chip buffer occupancy value at this time is c0'+c1'
  • the current on-chip queue depth of queue 1 is b1.
  • the message will be stored in the on-chip space. If the currently received message corresponding to queue 1 needs to be moved to an off-chip storage device, the status information fed back by the off-chip storage device shows that the current off-chip storage device does not have enough storage capacity, and the message will not be moved. Move to an off-chip storage device.
  • the on-chip resource judging submodule 331 determines that the on-chip space is sufficient and there is enough space to store the currently received message, that is, c0'+c1' ⁇ s1, the message that needs to be moved will be stored in the on-chip space again;
  • the internal resource judgment submodule 331 determines that the on-chip space is insufficient to store the currently received message, that is, c0'+c1'>s1, it will trigger the transfer and discard of the message, and discard the message that needs to be moved.
  • any one of the multiple schedulers determines that it needs to be moved, it needs to be moved. Therefore, the multiple schedulers are connected by a "logical OR". If any scheduler determines that the message needs to be moved to an off-chip storage device, and (that is, the "logical AND” on the right in Figure 3), the off-chip storage device has insufficient storage capacity and sufficient on-chip space, the message will be Re-store in the on-chip space; if any scheduler determines that the message needs to be moved to an off-chip storage device, and (ie the "logical AND” on the right in Figure 3), the off-chip storage device has insufficient storage capacity and on-chip space When it is insufficient, it will trigger the transfer and discard of the message, and the message will be discarded.
  • the moving state counting module 32 can update the current on-chip queue depth of the queue according to the storage scheduling result. Therefore, the moving state counting module can be connected with the storage scheduling result, that is, the on-chip/off-chip moving result, and determine whether the on-chip queue depth needs to be updated according to the moving result.
  • the off-chip storage device When the messages currently received in queue 1 need to be moved to an off-chip storage device, if the off-chip storage device does not have enough storage capacity, there is enough space on the chip to store the currently received messages, and the messages that need to be moved will be stored again In the on-chip space, the free on-chip storage space is reused to improve the utilization of the on-chip storage space, thereby improving the overall performance of the chip.
  • the message currently received in queue 1 needs to be moved to an off-chip storage device, if the off-chip storage device does not have enough storage capacity and there is or does not have enough space on the chip to store the currently received message, the message will be triggered. Moving and discarding, discarding the message, reducing the probability of discarding the message as much as possible, and avoiding the storage scheduling method from affecting the normal operation of the business.
  • the number of queues and scheduling strategies can be parameterized and scaled. It can adapt to various system structures and data flow scheduling requirements. Greatly reduce the design difficulty of the system and improve the reliability of the structure. At the same time, it also helps with the portability and inheritability of the structure.
  • the storage scheduling method before performing storage scheduling, first determine the attributes of the target message, and then determine subsequent operations.
  • Storage scheduling can be performed when storage scheduling is needed, avoiding blind scheduling and reporting the chip.
  • the service processing efficiency is reduced due to the storage of files to off-chip storage devices, or the storage of off-chip messages in the on-chip storage space occupies the on-chip storage space; on the other hand, this embodiment may use different storage scheduling results based on different storage scheduling results.
  • the calculation process updates the current on-chip queue depth of the target queue to provide an accurate basis for the subsequent storage scheduling process, improve the accuracy of storage scheduling, and further improve the performance of the chip.
  • FIG. 4 is a schematic structural diagram of a storage scheduling device provided by another embodiment of the present disclosure.
  • the storage scheduling apparatus provided in this embodiment includes the following modules: a first determining module 41, a second determining module 42, a third determining module 43, and a triggering module 44.
  • the first determining module 41 is configured to determine the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the update depth of the target queue.
  • the second determining module 42 is configured to determine that the target message needs to be moved to an off-chip storage device for storage when the update depth of the target queue is greater than the moving threshold of the target queue.
  • the third determining module 43 is configured to determine that if the target message needs to be moved to an off-chip storage device, the off-chip storage device does not have sufficient storage capacity, and when there is enough space on the chip, it is determined that the target message will be stored in the on-chip space again.
  • the trigger module 44 is configured to trigger the removal and discarding of the target message in the target queue if the target message needs to be moved to an off-chip storage device, and the off-chip storage device does not have sufficient storage capacity, and the on-chip space is insufficient.
  • the device further includes: a receiving module, a first storage module, and a discarding module.
  • the receiving module is configured to receive the status information sent by the off-chip storage device.
  • the first storage module is configured to move the target message to the off-chip storage device for storage if it is determined according to the status information that the off-chip storage device can store the target message.
  • the discarding module is configured to discard the target message if it is determined according to the status information that the off-chip storage device cannot store the target message, and there is no space in the on-chip storage to store the target message.
  • the device further includes: a fourth determining module 45 configured to determine the current on-chip queue depth of the target queue minus the length of the dequeue message as the new current on-chip queue depth of the target queue .
  • the fourth determining module 45 is also configured to re-store the target message that needs to be moved to the on-chip space, the current on-chip queue depth of the target queue plus the length of the target message is determined as the new current on-chip of the target queue Queue depth.
  • the device further includes: a fifth determining module configured to determine the sum of the current on-chip queue depths of all queues as the current on-chip storage occupancy value.
  • the trigger module 44 is specifically configured to: add a discard tag to the target queue; in queue dequeue scheduling, if it is determined that the target queue has a discard tag, trigger The packets in the target queue are dequeued, and the dequeued packets are discarded.
  • the storage scheduling device provided in this embodiment is used to execute the storage scheduling method of any of the foregoing embodiments.
  • the implementation principles and technical effects of the storage scheduling device provided in this embodiment are similar, and will not be repeated here.
  • FIG. 5 is a schematic structural diagram of a storage scheduling device provided by another embodiment of the present disclosure. This embodiment provides a detailed description of other modules included in the storage scheduling device on the basis of the embodiment shown in FIG. 4 and various alternative solutions. As shown in FIG. 5, the storage scheduling device provided in this embodiment further includes the following modules: a second storage module 51, a judgment module 52, a sixth determination module 53, a third storage module 54 and a fourth storage module 55.
  • the second storage module 51 is configured to store the target message in the on-chip storage space when the update depth of the target queue is less than or equal to the movement threshold of the target queue.
  • the fourth determining module 45 is also configured to determine the current on-chip queue depth of the target queue plus the length of the target message as the new current on-chip queue depth of the target queue.
  • the fourth determining module 45 is further configured to determine the current on-chip queue depth of the target queue as the new current on-chip queue depth of the target queue if the target message is successfully moved to the off-chip storage device for storage.
  • the preset storage occupancy threshold is a storage occupancy threshold corresponding to the target queue.
  • the device further includes: a fifth determining module, configured to determine a storage occupancy threshold corresponding to the priority of the target queue according to the priority of the target queue when the target message is moved to the off-chip storage device .
  • the judging module 52 is configured to judge the attributes of the target message.
  • the sixth determining module 53 is configured to determine the sum of the length of the target message to be received and the current on-chip queue depth of the target queue corresponding to the target message when it is determined that the attribute of the target message is a mixed type, and it is determined as Steps to update the depth of the target queue.
  • the third storage module 54 is configured to store the target message in the on-chip storage when it is determined that the attribute of the target message is an on-chip message.
  • the fourth storage module 55 is configured to store the target message in the off-chip storage device when it is determined that the attribute of the target message is an off-chip message.
  • the storage scheduling device provided in this embodiment is used to execute the storage scheduling method of any of the foregoing embodiments.
  • the implementation principles and technical effects of the storage scheduling device provided in this embodiment are similar, and will not be repeated here.
  • FIG. 6 is a schematic structural diagram of a storage scheduling device provided by an embodiment of the disclosure.
  • the storage scheduling device includes a processor 61 and a memory 62; the number of processors 61 in the storage scheduling device can be one or more.
  • one processor 61 is taken as an example;
  • the processor 61 and the memory 62; can be connected by a bus or in other ways.
  • the connection by a bus is taken as an example.
  • the memory 62 can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the storage scheduling method in the embodiment of the present application (for example, the first storage scheduling device in the storage scheduling device).
  • the processor 61 stores various functional applications and data processing of the scheduling device by running the software programs, instructions, and modules stored in the memory 62, that is, realizes the above-mentioned storage scheduling method.
  • the memory 62 may mainly include a program storage area and a data storage area.
  • the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the storage scheduling device and the like.
  • the memory 62 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • An embodiment of the present application also provides a storage medium containing computer-executable instructions.
  • the computer-executable instructions are used to execute a storage scheduling method when executed by a computer processor, and the method includes:
  • the target message is moved off-chip and stored in the off-chip storage device, and the on-chip queue depth of the target queue remains unchanged;
  • the target message is stored in the on-chip storage device, and the target queue
  • the current update depth of, that is, the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined as the new current on-chip queue depth of the target queue;
  • the target message is moved and discarded, and the on-chip queue depth of the target queue remains unchanged.
  • a storage medium containing computer-executable instructions provided in this application is not limited to the method operations described above, and can also perform related operations in the storage scheduling method provided in any embodiment of this application. .
  • the various embodiments of the present application can be implemented in hardware or dedicated circuits, software, logic or any combination thereof.
  • some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, although the application is not limited thereto.
  • the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may consist of several physical components.
  • the components are executed cooperatively.
  • Certain physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit .
  • a processor such as a central processing unit, a digital signal processor, or a microprocessor
  • Such software may be distributed on a computer-readable medium, and the computer-readable medium may include a computer storage medium (or a non-transitory medium) and a communication medium (or a transitory medium).
  • computer storage medium includes volatile and non-volatile data implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data).
  • Information such as computer-readable instructions, data structures, program modules, or other data.
  • Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other storage technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or Any other medium used to store desired information and that can be accessed by a computer.
  • communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media. .

Abstract

A storage scheduling method, a device, and a storage medium, relating to the technical field of communications. The method comprises: determining the sum of the length of a received target packet and the current on-chip queue depth of a target queue corresponding to the target packet as an update depth of the target queue; when the update depth of the target queue is greater than a migration threshold of the target queue, determining that the target packet needs to be migrated to an off-chip storage device for storage; if the current off-chip storage device bandwidth is sufficient and the off-chip storage device capacity is sufficient, migrating the target packet out of a chip and storing the target packet in the off-chip storage device, and the on-chip queue depth of the target queue remaining unchanged; if the current off-chip storage device bandwidth is not sufficient or the off-chip storage device capacity is not sufficient and the current on-chip storage occupancy value is less than or equal to a preset storage occupancy threshold, storing the target packet on an on-chip storage device, and determining the current update depth of the target queue as the new current on-chip queue depth of the target queue; and if the current on-chip storage occupancy value is greater than the preset storage occupancy threshold, migrating and discarding the target packet, and the on-chip queue depth of the target queue remaining unchanged. The storage scheduling method improves the utilization rate of an on-chip storage space, thereby improving the overall performance of a chip.

Description

存储调度方法、设备和存储介质Storage scheduling method, equipment and storage medium
相关申请的交叉引用Cross-references to related applications
本公开要求在2020年6月23日提交国家知识产权局、申请号为202010582287.9、发明名称为“存储调度方法、设备和存储介质”的中国专利申请的优先权,该申请的全部内容通过引用结合在本公开中。This disclosure requires the priority of a Chinese patent application filed with the State Intellectual Property Office, the application number is 202010582287.9, and the invention title is "Storage Scheduling Method, Device, and Storage Medium" on June 23, 2020. The entire content of the application is incorporated by reference. In this disclosure.
技术领域Technical field
本公开实施例涉及通信技术领域,尤其涉及一种存储调度方法、设备和存储介质。The embodiments of the present disclosure relate to the field of communication technologies, and in particular, to a storage scheduling method, device, and storage medium.
背景技术Background technique
在网络处理引擎中,一方面需要不断提高性能指标,而另一方面又受限于芯片面积、资源以及工艺,不可能无限制提高主频或通过堆砌资源来达到满足性能需求的目的。因此,在系统设计时往往通过增加队列数目并相应增加片外存储空间来达到性能指标。各队列中的报文可以存储在片上存储空间或者片外存储设备中。当新接收到报文时,需要对该报文的存储位置进行调度。In the network processing engine, on the one hand, it is necessary to continuously improve the performance index, and on the other hand, it is limited by the chip area, resources, and technology. It is impossible to increase the main frequency without limitation or to meet the performance requirements by piling up resources. Therefore, in system design, the performance index is often achieved by increasing the number of queues and correspondingly increasing the off-chip storage space. The messages in each queue can be stored in on-chip storage space or off-chip storage devices. When a new message is received, the storage location of the message needs to be scheduled.
由于片外存储设备带宽有限、容量有限,还会额外增加功耗、资源、电路面积,因此,不可能无限制增加片外存储设备来达到满足性能需求。因此对报文存储位置进行调度的存储调度方法,在满足将报文从片内搬移至片外存储设备的功能外,还需提高片上资源的利用率,尽量减少报文的丢弃,以提高芯片整体性能。Due to the limited bandwidth and capacity of off-chip storage devices, additional power consumption, resources, and circuit area will be added. Therefore, it is impossible to increase off-chip storage devices indefinitely to meet performance requirements. Therefore, the storage scheduling method for scheduling the storage location of the message, in addition to meeting the function of moving the message from the on-chip to the off-chip storage device, also needs to improve the utilization of on-chip resources, minimize the discarding of messages, and improve the chip Overall performance.
发明内容Summary of the invention
本公开实施例的主要目的在于提出一种存储调度方法、设备和存储介质,旨在实现通过存储调度提高片上存储空间的利用率,从而提高芯 片整体性能的功能。The main purpose of the embodiments of the present disclosure is to propose a storage scheduling method, device, and storage medium, aiming to realize the function of improving the utilization of on-chip storage space through storage scheduling, thereby improving the overall performance of the chip.
为实现上述目的,根据本公开的第一方面,本公开实施例提供了一种存储调度方法,所述方法包括以下步骤:将接收到的目标报文的长度以及所述目标报文对应的目标队列的当前片上队列深度之和,确定为所述目标队列的更新深度;当所述目标队列的更新深度大于所述目标队列的搬移阈值时,确定所述目标报文需要搬移到片外存储设备存储;若当前片外存储设备带宽充足并且片外存储设备容量充足,将所述目标报文搬移至片外存于片外存储设备,所述目标队列的片上队列深度保持不变;若当前片外存储设备带宽不足或片外存储设备容量不足,并且,当前片上存储占用值小于或等于预设存储占用阈值,将所述目标报文存于片上存储设备,将所述目标队列的当前更新深度,即,将接收到的目标报文的长度以及所述目标报文对应的目标队列的当前片上队列深度之和,确定为所述目标队列的新的当前片上队列深度;若当前片上存储占用值大于预设存储占用阈值,则搬移丢弃所述目标报文,所述目标队列的片上队列深度保持不变。In order to achieve the above objective, according to the first aspect of the present disclosure, the embodiments of the present disclosure provide a storage scheduling method. The method includes the following steps: combining the length of the received target message and the target corresponding to the target message. The sum of the current on-chip queue depths of the queue is determined as the update depth of the target queue; when the update depth of the target queue is greater than the movement threshold of the target queue, it is determined that the target message needs to be moved to an off-chip storage device Storage; if the bandwidth of the current off-chip storage device is sufficient and the capacity of the off-chip storage device is sufficient, the target message is moved to the off-chip and stored on the off-chip storage device, and the on-chip queue depth of the target queue remains unchanged; if the current chip The bandwidth of the external storage device is insufficient or the capacity of the off-chip storage device is insufficient, and the current on-chip storage occupancy value is less than or equal to the preset storage occupancy threshold, the target message is stored in the on-chip storage device, and the current update depth of the target queue , That is, the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined as the new current on-chip queue depth of the target queue; if the current on-chip storage occupancy value If it is greater than the preset storage occupancy threshold, the target message is moved and discarded, and the on-chip queue depth of the target queue remains unchanged.
为实现上述目的,根据本公开的第二方面,本公开实施例还提出了一种存储调度设备,所述设备包括存储器、处理器、存储在所述存储器上并可在所述处理器上运行的程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,所述程序被所述处理器执行时实现前述方法的步骤。In order to achieve the above objective, according to the second aspect of the present disclosure, the embodiments of the present disclosure also propose a storage scheduling device, the device includes a memory, a processor, is stored on the memory and can run on the processor The program and the data bus used to realize the connection and communication between the processor and the memory, and when the program is executed by the processor, the steps of the foregoing method are implemented.
为实现上述目的,根据本公开的第三方面,本公开实施例提供了一种存储介质,用于计算机可读存储,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现前述方法的步骤。In order to achieve the foregoing objective, according to the third aspect of the present disclosure, embodiments of the present disclosure provide a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs It may be executed by one or more processors to implement the steps of the foregoing method.
本实施例提出的存储调度方法、设备和存储介质,包括:将接收到的目标报文的长度以及目标报文对应的目标队列的当前片上队列深度之和,确定为目标队列的更新深度,当目标队列的更新深度大于目标队列的搬移阈值时,确定目标报文需要搬移到片外存储设备存储。若当前 片外存储设备带宽充足并且片外存储设备容量充足,将所述目标报文搬移至片外存于片外存储设备,所述目标队列的片上队列深度保持不变;若当前片外存储设备带宽不足或片外存储设备容量不足,并且,当前片上存储占用值小于或等于预设存储占用阈值,将所述目标报文存于片上存储设备,将所述目标队列的当前更新深度,即,将接收到的目标报文的长度以及所述目标报文对应的目标队列的当前片上队列深度之和,确定为所述目标队列的新的当前片上队列深度;若当前片上存储占用值大于预设存储占用阈值,则搬移丢弃所述目标报文,所述目标队列的片上队列深度保持不变。该存储调度方法,在目标队列的更新深度大于目标队列的搬移阈值时,一方面,在片外存储设备无法成功存储目标报文并且当前片上存储占用值小于预设存储占用阈值时,将目标队列的报文重新存储在片内空间,提高了片上存储空间的利用率,从而,提高芯片整体性能;另一方面,在片外存储设备无法成功存储目标报文并且当前片上存储占用值大于预设存储占用阈值时,才触发目标报文的搬移丢弃将该报文丢弃,实现尽可能地减小丢弃报文的概率,避免该存储调度方法影响业务正常运行。The storage scheduling method, device and storage medium proposed in this embodiment include: determining the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the update depth of the target queue. When the update depth of the target queue is greater than the moving threshold of the target queue, it is determined that the target message needs to be moved to an off-chip storage device for storage. If the bandwidth of the current off-chip storage device is sufficient and the capacity of the off-chip storage device is sufficient, the target message is moved to the off-chip and stored on the off-chip storage device, and the on-chip queue depth of the target queue remains unchanged; if the current off-chip storage is The device bandwidth is insufficient or the off-chip storage device capacity is insufficient, and the current on-chip storage occupancy value is less than or equal to the preset storage occupancy threshold, the target message is stored in the on-chip storage device, and the current update depth of the target queue is , The sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined as the new current on-chip queue depth of the target queue; if the current on-chip storage occupancy value is greater than the preset If the storage occupancy threshold is set, the target message is moved and discarded, and the on-chip queue depth of the target queue remains unchanged. In the storage scheduling method, when the update depth of the target queue is greater than the moving threshold of the target queue, on the one hand, when the off-chip storage device cannot successfully store the target message and the current on-chip storage occupancy value is less than the preset storage occupancy threshold, the target queue The message is stored in the on-chip space again, which improves the utilization of the on-chip storage space, thereby improving the overall performance of the chip; on the other hand, the off-chip storage device cannot successfully store the target message and the current on-chip storage occupancy value is greater than the preset Only when the storage occupancy threshold is triggered, the move and discard of the target message is triggered to discard the message, so as to reduce the probability of discarding the message as much as possible, and to prevent the storage scheduling method from affecting the normal operation of the business.
附图说明Description of the drawings
图1为一实施例提供的存储调度方法的流程图;FIG. 1 is a flowchart of a storage scheduling method provided by an embodiment;
图2为另一实施例提供的存储调度方法的流程图;FIG. 2 is a flowchart of a storage scheduling method provided by another embodiment;
图3为一实施例提供的存储调度装置的结构示意图;FIG. 3 is a schematic structural diagram of a storage scheduling device provided by an embodiment;
图4为另一实施例提供的存储调度装置的结构示意图;4 is a schematic structural diagram of a storage scheduling device provided by another embodiment;
图5为又一实施例提供的存储调度装置的结构示意图;FIG. 5 is a schematic structural diagram of a storage scheduling device provided by another embodiment;
图6为一实施例提供的存储调度设备的结构示意图。Fig. 6 is a schematic structural diagram of a storage scheduling device provided by an embodiment.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本公开实施例,并不用于限定本公开实施例。It should be understood that the specific embodiments described herein are only used to explain the embodiments of the present disclosure, and are not used to limit the embodiments of the present disclosure.
在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或“单元”的后缀仅为了有利于本公开实施例的说明,其本身没有特有的意义。因此,“模块”、“部件”或“单元”可以混合地使用。In the following description, the use of suffixes such as “module”, “component” or “unit” used to indicate elements is only for facilitating the description of the embodiments of the present disclosure, and has no special meaning in itself. Therefore, "module", "part" or "unit" can be used in a mixed manner.
本公开实施例提供一种存储调度方法,包括:将接收到的目标报文的长度以及目标报文对应的目标队列的当前片上队列深度之和,确定为目标队列的更新深度,当目标队列的更新深度大于目标队列的搬移阈值时,确定目标报文需要搬移到片外存储设备存储。若当前片外存储设备带宽充足并且片外存储设备容量充足,则将所述目标报文搬移至片外并存于片外存储设备,所述目标队列的片上队列深度保持不变;若当前片外存储设备带宽不足或片外存储设备容量不足,并且,当前片上存储占用值小于或等于预设存储占用阈值,则将所述目标报文存于片上存储设备,将所述目标队列的当前更新深度,即,将接收到的目标报文的长度以及所述目标报文对应的目标队列的当前片上队列深度之和,确定为所述目标队列的新的当前片上队列深度;若当前片上存储占用值大于预设存储占用阈值,则搬移丢弃所述目标报文,所述目标队列的片上队列深度保持不变。该存储调度方法,在目标队列的更新深度大于目标队列的搬移阈值时,一方面,在片外存储设备无法成功存储目标报文并且当前片上存储占用值小于预设存储占用阈值时,将目标队列的报文重新存储在片内空间,提高了片上存储空间的利用率,从而,提高芯片整体性能;另一方面,在片外存储设备无法成功存储目标报文并且当前片上存储占用值大于预设存储占用阈值时,才触发目标报文的搬移丢弃,将该报文丢弃,实现尽可能地减小丢弃报文的概率,避免该存储调度方法影响业务正常运行。The embodiment of the present disclosure provides a storage scheduling method, including: determining the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the update depth of the target queue. When the update depth is greater than the moving threshold of the target queue, it is determined that the target message needs to be moved to an off-chip storage device for storage. If the bandwidth of the current off-chip storage device is sufficient and the capacity of the off-chip storage device is sufficient, the target message is moved off-chip and stored on the off-chip storage device, and the on-chip queue depth of the target queue remains unchanged; if the current off-chip The bandwidth of the storage device is insufficient or the capacity of the off-chip storage device is insufficient, and the current on-chip storage occupancy value is less than or equal to the preset storage occupancy threshold, then the target message is stored in the on-chip storage device, and the current update depth of the target queue , That is, the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined as the new current on-chip queue depth of the target queue; if the current on-chip storage occupancy value If it is greater than the preset storage occupancy threshold, the target message is moved and discarded, and the on-chip queue depth of the target queue remains unchanged. In the storage scheduling method, when the update depth of the target queue is greater than the moving threshold of the target queue, on the one hand, when the off-chip storage device cannot successfully store the target message and the current on-chip storage occupancy value is less than the preset storage occupancy threshold, the target queue The message is stored in the on-chip space again, which improves the utilization of the on-chip storage space, thereby improving the overall performance of the chip; on the other hand, the off-chip storage device cannot successfully store the target message and the current on-chip storage occupancy value is greater than the preset Only when the storage occupancy threshold is triggered, the move and discard of the target message is triggered, and the message is discarded, so as to reduce the probability of discarding the message as much as possible, and to prevent the storage scheduling method from affecting the normal operation of the business.
图1为本公开一实施例提供的存储调度方法的流程图。本实施例适用于对报文的存储位置进行调度的场景中。本实施例可以由存储调度装置执行,该存储调度装置可以由软件和/或硬件的方式实现,该存储调度装置可以集成于通信设备中。如图1所示,本实施例提供的存储调度方法包括如下步骤:FIG. 1 is a flowchart of a storage scheduling method provided by an embodiment of the disclosure. This embodiment is applicable to a scenario where the storage location of a message is scheduled. This embodiment may be executed by a storage scheduling apparatus, which may be implemented by software and/or hardware, and the storage scheduling apparatus may be integrated into a communication device. As shown in Figure 1, the storage scheduling method provided in this embodiment includes the following steps:
步骤101:将接收到的目标报文的长度以及目标报文对应的目标队列的当前片上队列深度之和,确定为目标队列的更新深度。Step 101: The sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined as the update depth of the target queue.
本实施例中的队列可以是按照用户划分,即不同用户的报文属于不同的队列,也可以是按照业务类型划分,即不同业务的报文属于不同的队列,还可以是依据其他要素划分队列,本实施对此不作限制。The queues in this embodiment can be divided according to users, that is, messages of different users belong to different queues, or they can be divided according to service types, that is, messages of different services belong to different queues, or queues can be divided according to other factors. , This implementation does not impose restrictions on this.
存储调度装置在接收到目标报文之后,需要确定该目标报文存储在片上存储空间还是存储在片外存储设备中。本实施例中的片上存储空间指的是存储调度装置中的芯片上的存储空间。本实施例中的片上存储空间可以是缓存空间、随机存取存储器(Random Access Memory,RAM)等。本实施例中的片外存储设备可以是设置于芯片之外的存储设备。本实施例中的芯片可以是网络处理引擎中的芯片。After receiving the target message, the storage scheduling apparatus needs to determine whether the target message is stored in the on-chip storage space or in the off-chip storage device. The on-chip storage space in this embodiment refers to the storage space on the chip in the storage scheduling device. The on-chip storage space in this embodiment may be cache space, random access memory (Random Access Memory, RAM), etc. The off-chip storage device in this embodiment may be a storage device provided outside the chip. The chip in this embodiment may be a chip in a network processing engine.
在一实施例中,目标报文中可以携带队列号。在接收到目标报文之后,根据目标报文的队列号,确定目标报文对应的队列。为了描述方便,将目标报文对应的队列称为目标队列。目标队列的当前片上队列深度指的是该目标队列中存储在片上存储空间中的报文的长度。目标队列的当前片上队列深度可以是在接收到目标报文后,从存储调度装置中的管理片上队列深度的模块中获取到的,也可以是在接收到目标报文后,根据目标队列的当前存储在片上存储空间的报文的长度直接计算出的。In an embodiment, the target message may carry the queue number. After receiving the target message, the queue corresponding to the target message is determined according to the queue number of the target message. For the convenience of description, the queue corresponding to the target message is called the target queue. The current on-chip queue depth of the target queue refers to the length of the message stored in the on-chip storage space in the target queue. The current on-chip queue depth of the target queue can be obtained from the module that manages the on-chip queue depth in the storage scheduling device after receiving the target message, or it can be obtained according to the current on-chip queue depth after receiving the target message. The length of the message stored in the on-chip storage space is directly calculated.
可选地,本实施例中的报文的长度可以指的是报文的字节数、报文的切片数等不同度量标准下的长度。Optionally, the length of the message in this embodiment may refer to the length under different metrics such as the number of bytes of the message and the number of slices of the message.
将接收到的目标报文的长度以及目标队列的当前片上队列深度之和,确定为目标队列的更新深度。举例来说,假设目标报文的长度为c0,目标队列的当前片上队列深度为b0,则将c0+b0确定为目标队列的更新深度。The sum of the length of the received target message and the current on-chip queue depth of the target queue is determined as the update depth of the target queue. For example, assuming that the length of the target message is c0 and the current on-chip queue depth of the target queue is b0, then c0+b0 is determined as the update depth of the target queue.
步骤102:当目标队列的更新深度大于目标队列的搬移阈值时,确定目标报文需要搬移到片外存储设备存储。Step 102: When the update depth of the target queue is greater than the moving threshold of the target queue, it is determined that the target message needs to be moved to an off-chip storage device for storage.
在一实施例中,每个目标队列均对应有搬移阈值,该搬移阈值可以是预先设置的。目标队列的搬移阈值可以根据用户的需求设置,也可以 是其他装置发送给该存储调度装置的。In an embodiment, each target queue corresponds to a moving threshold, and the moving threshold may be preset. The moving threshold of the target queue can be set according to the needs of the user, or it can be sent to the storage scheduling device by other devices.
在一种实现方式中,当目标队列的更新深度大于目标队列的搬移阈值时,说明此时目标队列发生拥塞,即,报文入队快、出队慢的场景中,确定该目标报文需要搬移到片外存储设备存储。In one implementation, when the update depth of the target queue is greater than the moving threshold of the target queue, it means that the target queue is congested at this time, that is, in the scenario where the message enters the queue fast and the dequeue is slow, it is determined that the target message needs Move to an off-chip storage device for storage.
在另一种实现方式中,当目标队列的更新深度小于或者等于目标队列的搬移阈值时,将目标报文存储在片上存储空间;将目标队列的当前片上队列深度加上目标报文的长度之和,确定为目标队列的新的当前片上队列深度。该实现方式中,在目标队列没有发生拥塞时,即,在报文入队慢、出队快的场景中,将目标报文存储在片上存储空间之后,更新目标队列的当前片上队列深度,可以提高目标队列的当前片上队列深度的准确性,从而,提高后续存储调度的准确性,进一步提高芯片的性能。In another implementation, when the update depth of the target queue is less than or equal to the moving threshold of the target queue, the target message is stored in the on-chip storage space; the current on-chip queue depth of the target queue is added to the length of the target message And, determine the new current on-chip queue depth of the target queue. In this implementation, when the target queue is not congested, that is, in a scenario where messages are slow to enter the queue and quickly dequeue, after storing the target message in the on-chip storage space, update the current on-chip queue depth of the target queue. Improve the accuracy of the current on-chip queue depth of the target queue, thereby improving the accuracy of subsequent storage scheduling and further improving the performance of the chip.
需要说明的是,队列中的报文在片上存储空间存储的方式可以是共享式存储,即,多个队列共享片上存储空间,也可以是独享式存储,即,每个队列有自身对应的片上存储空间,还可以是混合式存储,即多个队列既共享一部分片上存储空间,每个队列也具有自身对应的片上存储空间。本实施例对队列报文在片上存储空间中的存储方式不作限制。It should be noted that the way the messages in the queue are stored in the on-chip storage space can be shared storage, that is, multiple queues share on-chip storage space, or exclusive storage, that is, each queue has its own corresponding The on-chip storage space can also be hybrid storage, that is, multiple queues share a part of the on-chip storage space, and each queue also has its own corresponding on-chip storage space. This embodiment does not limit the storage mode of the queue message in the on-chip storage space.
步骤103:判断当前片外存储设备的带宽是否充足,片外存储设备的缓存容量是否充足。Step 103: Determine whether the bandwidth of the current off-chip storage device is sufficient, and whether the cache capacity of the off-chip storage device is sufficient.
一实施例中,在目标报文发生搬移之前,需要接收片外存储设备发送的状态信息,以确定片外存储设备能否存储目标报文。In one embodiment, before the target message is moved, the status information sent by the off-chip storage device needs to be received to determine whether the off-chip storage device can store the target message.
可选地,片外存储设备可以以预设的频率向存储调度装置发送状态信息。该状态信息用于表明该片外存储设备是否具有存储目标报文的能力。示例性地,该状态信息可以是该片外存储设备的当前带宽和/或当前剩余存储空间等信息。Optionally, the off-chip storage device may send the status information to the storage scheduling apparatus at a preset frequency. The status information is used to indicate whether the off-chip storage device has the ability to store target messages. Exemplarily, the status information may be information such as the current bandwidth and/or current remaining storage space of the off-chip storage device.
步骤104:若当前片外存储设备带宽充足并且片外存储设备容量充足,则将所述目标报文搬移至片外存于片外存储设备,执行步骤105;Step 104: If the bandwidth of the current off-chip storage device is sufficient and the capacity of the off-chip storage device is sufficient, move the target message to the off-chip and store in the off-chip storage device, and perform step 105;
在一实施例中,在片外存储设备的带宽满足目标报文的带宽需求,并且,片外存储设备的存储空间充足时,存储调度装置在确定目标报文 需要搬移到片外存储设备存储之后,会将该目标报文搬移至片外存储设备存储。In one embodiment, when the bandwidth of the off-chip storage device meets the bandwidth requirement of the target message, and the storage space of the off-chip storage device is sufficient, the storage scheduling apparatus determines that the target message needs to be moved to the off-chip storage device for storage. , The target message will be moved to the off-chip storage device for storage.
步骤105:目标队列的片上队列深度保持不变。Step 105: The on-chip queue depth of the target queue remains unchanged.
在一实施例中,目标报文搬移至片外,存储在片外片外存储设备存储时,目标报文对应的目标队列的片上队列深度不变,当前片上存储占用值也不变。In one embodiment, when the target message is moved off-chip and stored in an off-chip off-chip storage device, the on-chip queue depth of the target queue corresponding to the target message does not change, and the current on-chip storage occupancy value also does not change.
当前片上存储占用值指的是所有队列的当前片上队列深度之和。The current on-chip storage occupancy value refers to the sum of the current on-chip queue depths of all queues.
在一实施例中,当前片上存储占用值可以是其他模块发送给该存储调度装置的。In an embodiment, the current on-chip storage occupancy value may be sent to the storage scheduling device by other modules.
步骤106:若当前片外存储设备的带宽不足,或者,片外存储设备的存储容量充足,执行步骤107。Step 106: If the bandwidth of the current off-chip storage device is insufficient, or the storage capacity of the off-chip storage device is sufficient, step 107 is executed.
在一实施例中,根据片外存储设备发送的状态信息,当前片外存储设备不具有存储目标报文的能力。In an embodiment, according to the status information sent by the off-chip storage device, the current off-chip storage device does not have the ability to store the target message.
可以确定的是,片外存储设备存储能力不足时,目标报文不会发生搬移操作,不会搬移至片外存储设备。It is certain that when the storage capacity of the off-chip storage device is insufficient, the target message will not be moved, and will not be moved to the off-chip storage device.
步骤107:当前片上存储占用值是否大于片内预设存储占用阈值。Step 107: Whether the current on-chip storage occupancy value is greater than the on-chip preset storage occupancy threshold.
在一实施例中,需要搬移至片外的目标报文,在片外存储设备不具有存储目标报文的能力时,根据当前片上存储占用值与片内预设存储占用阈值的比较结果,确定当前片上存储设备是否具有存储目标报文的能力。In one embodiment, the target message that needs to be moved off-chip, when the off-chip storage device does not have the ability to store the target message, it is determined according to the comparison result of the current on-chip storage occupancy value and the on-chip preset storage occupancy threshold Whether the current on-chip storage device has the ability to store target messages.
该存储调度装置需要确定出当前片上存储占用值:将所有队列的当前片上队列深度之和,确定为当前片上存储占用值。该实现方式中,将所有队列的当前片上队列深度之和,确定为当前片上存储占用值,可以尽可能地提高当前片上存储占用值的准确性。The storage scheduling device needs to determine the current on-chip storage occupancy value: the sum of the current on-chip queue depths of all queues is determined as the current on-chip storage occupancy value. In this implementation manner, the sum of the current on-chip queue depths of all queues is determined as the current on-chip storage occupancy value, which can improve the accuracy of the current on-chip storage occupancy value as much as possible.
在一实施例中,当前片上存储占用值可以是其他模块发送给该存储调度装置的。In an embodiment, the current on-chip storage occupancy value may be sent to the storage scheduling device by other modules.
步骤108:当前片上存储占用值大于片内预设存储占用阈值时,将需要搬移至片外的目标报文重新存储在片上。Step 108: When the current on-chip storage occupancy value is greater than the on-chip preset storage occupancy threshold, the target message that needs to be moved off-chip is stored on the chip again.
当前片上存储占用值小于预设存储占用阈值,说明此时片上存储设备中还有多余的存储空间,当前片上存储设备具有存储目标报文的能力。The current on-chip storage occupancy value is less than the preset storage occupancy threshold, indicating that there is excess storage space in the on-chip storage device at this time, and the current on-chip storage device has the ability to store the target message.
在片外存储设备无法成功存储目标报文,但是,当前片上存储设备具有存储目标报文的能力时,将目标队列的报文重新存储在片内空间,提高了片上存储空间的利用率,从而,提高芯片整体性能。The off-chip storage device cannot successfully store the target message. However, when the current on-chip storage device has the ability to store the target message, the message in the target queue is re-stored in the on-chip space, which improves the utilization of the on-chip storage space. , Improve the overall performance of the chip.
步骤109:将目标队列的当前更新深度,即,将接收到的目标报文的长度以及目标报文对应的目标队列的当前片上队列深度之和,确定为目标队列新的当前片上队列深度。Step 109: Determine the current update depth of the target queue, that is, the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the new current on-chip queue depth of the target queue.
在一实施例中,需要更新目标队列的当前片上队列深度。具体更新方式为:将目标队列的当前片上队列深度加上目标报文的长度之和,确定为目标队列的新的当前片上队列深度。In one embodiment, the current on-chip queue depth of the target queue needs to be updated. The specific update method is: the sum of the current on-chip queue depth of the target queue plus the length of the target message is determined as the new current on-chip queue depth of the target queue.
步骤110:前片上存储占用值小于或者等于片内预设存储占用阈值时,搬移丢弃目标报文。Step 110: When the previous on-chip storage occupancy value is less than or equal to the on-chip preset storage occupancy threshold, the target message is moved and discarded.
在确定片外存储设备无法存储目标报文,并且,片内存储设备也无法存储目标报文时,对目标报文打上搬移丢弃的标记,存储调度装置将该目标报文搬移丢弃。When it is determined that the off-chip storage device cannot store the target message, and the on-chip storage device cannot store the target message, the target message is marked as being moved and discarded, and the storage scheduling device moves and discards the target message.
在片外存储设备无法成功存储目标报文,并且,当前片内存储设备也无法存储目标报文时,才触发目标报文的搬移丢弃将该报文丢弃,实现尽可能地减小丢弃报文的概率,避免该存储调度方法影响业务正常运行。When the off-chip storage device cannot successfully store the target message, and the current on-chip storage device cannot store the target message, the move and discard of the target message is triggered to discard the message, so as to reduce the number of discarded messages as much as possible. The probability of avoiding the storage scheduling method from affecting the normal operation of the business.
上述确定是否发生报文搬移丢弃的方式,实现简单、效率较高。The foregoing method of determining whether a message is moved or discarded is simple to implement and highly efficient.
步骤111:目标队列的片上队列深度保持不变。Step 111: The on-chip queue depth of the target queue remains unchanged.
在执行本实施例提供的存储调度方法之前,还需要预先进行信息配置。需要配置的信息可以包括:队列的数量、每个队列对应的搬移阈值以及预设存储占用阈值等。Before executing the storage scheduling method provided in this embodiment, information configuration is also required in advance. The information that needs to be configured may include: the number of queues, the movement threshold corresponding to each queue, and the preset storage occupancy threshold, etc.
本公开实施例提供一种存储调度方法,包括:将接收到的目标报文的长度以及目标报文对应的目标队列的当前片上队列深度之和,确定为目标队列的更新深度,当目标队列的更新深度大于目标队列的搬移阈值 时,确定目标报文需要搬移到片外存储设备存储,若当前片外存储设备带宽充足并且片外存储设备容量充足,则将目标报文搬移至片外并存于片外存储设备,目标队列的片上队列深度保持不变;若当前片外存储设备带宽不足或片外存储设备容量不足,并且,当前片上存储占用值小于或等于预设存储占用阈值,则将目标报文存于片上存储设备,将目标队列的当前更新深度,即,将接收到的目标报文的长度以及目标报文对应的目标队列的当前片上队列深度之和,确定为目标队列的新的当前片上队列深度;若当前片上存储占用值大于预设存储占用阈值,则搬移丢弃目标报文,目标队列的片上队列深度保持不变。该存储调度方法,在目标队列的更新深度大于目标队列的搬移阈值时,一方面,在片外存储设备无法成功存储目标报文并且当前片上存储占用值小于预设存储占用阈值时,将目标队列的报文重新存储在片内空间,提高了片上存储空间的利用率,从而,提高芯片整体性能;另一方面,在片外存储设备无法成功存储目标报文并且当前片上存储占用值大于预设存储占用阈值时,才触发目标报文的搬移丢弃将该报文丢弃,实现尽可能地减小丢弃报文的概率,避免该存储调度方法影响业务正常运行。The embodiment of the present disclosure provides a storage scheduling method, including: determining the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the update depth of the target queue. When the update depth is greater than the move threshold of the target queue, it is determined that the target message needs to be moved to the off-chip storage device for storage. If the current off-chip storage device has sufficient bandwidth and the off-chip storage device capacity is sufficient, move the target message off-chip and store it in the off-chip. For off-chip storage devices, the on-chip queue depth of the target queue remains unchanged; if the bandwidth of the current off-chip storage device is insufficient or the capacity of the off-chip storage device is insufficient, and the current on-chip storage occupancy value is less than or equal to the preset storage occupancy threshold, the target The message is stored in the on-chip storage device, and the current update depth of the target queue, that is, the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message, is determined as the new target queue The current on-chip queue depth; if the current on-chip storage occupancy value is greater than the preset storage occupancy threshold, the target message is moved and discarded, and the on-chip queue depth of the target queue remains unchanged. In the storage scheduling method, when the update depth of the target queue is greater than the moving threshold of the target queue, on the one hand, when the off-chip storage device cannot successfully store the target message and the current on-chip storage occupancy value is less than the preset storage occupancy threshold, the target queue The message is stored in the on-chip space again, which improves the utilization of the on-chip storage space, thereby improving the overall performance of the chip; on the other hand, the off-chip storage device cannot successfully store the target message and the current on-chip storage occupancy value is greater than the preset Only when the storage occupancy threshold is triggered, the move and discard of the target message is triggered to discard the message, so as to reduce the probability of discarding the message as much as possible, and to prevent the storage scheduling method from affecting the normal operation of the business.
图2为本公开另一实施例提供的存储调度方法的流程图。本实施例在图1所示实施例及各种可选方案的基础上,对该存储调度方法包括的其他步骤作一详细说明。如图2所示,本实施例提供的存储调度方法包括如下步骤:FIG. 2 is a flowchart of a storage scheduling method provided by another embodiment of the present disclosure. This embodiment provides a detailed description of other steps included in the storage scheduling method on the basis of the embodiment shown in FIG. 1 and various alternative solutions. As shown in Figure 2, the storage scheduling method provided in this embodiment includes the following steps:
步骤201:判断目标报文的属性。Step 201: Determine the attributes of the target message.
步骤202:当判断目标报文的属性为片上报文时,将目标报文存储在片上存储中。Step 202: When it is judged that the attribute of the target message is an on-chip message, the target message is stored in the on-chip storage.
步骤203:当判断目标报文的属性为片外报文时,将目标报文存储在片外存储设备中。Step 203: When it is determined that the attribute of the target message is an off-chip message, the target message is stored in an off-chip storage device.
步骤204:当判断目标报文的属性为混合类型时,确定执行步骤205。Step 204: When it is determined that the attribute of the target message is a mixed type, it is determined to execute step 205.
即,当判断目标报文的属性为混合类型时,确定执行将接收到的目标报文的长度以及目标报文对应的目标队列的当前片上队列深度之和, 确定为目标队列的更新深度的步骤。That is, when it is judged that the attribute of the target message is a mixed type, the step of determining the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined to be the update depth of the target queue. .
在一实施例中,目标报文中会携带自身的属性信息。本实施例中的报文的属性可以包括:混合类型报文、片上报文以及片外报文。其中,混合类型报文指的是即可以存储在片外存储设备中也可以存储在片上存储空间中的报文,片上报文指的是只能存储在片上存储空间中的报文,片外报文指的是只能存储在片外存储设备中的报文。In an embodiment, the target message will carry its own attribute information. The attributes of the message in this embodiment may include: mixed-type messages, on-chip messages, and off-chip messages. Among them, mixed type messages refer to messages that can be stored in off-chip storage devices or in on-chip storage space. On-chip messages refer to messages that can only be stored in on-chip storage space. Messages refer to messages that can only be stored in off-chip storage devices.
本实施例在接收到目标报文后,先判断目标报文的属性。根据目标报文的属性选择后续操作。第一种情况:当确定目标报文为片上报文时,不需要进行存储调度,将目标报文存储在片上存储空间中。第二种情况:当确定目标报文的属性为混合类型时,需要确定此时目标报文需要存储在片上还是片外,即需要进行存储调度,确定执行步骤205。第三种情况:当确定目标报文为片外报文时,也不需要进行存储调度,将目标报文存储在片外存储设备中。In this embodiment, after receiving the target message, the attributes of the target message are first judged. Select subsequent operations based on the attributes of the target message. The first case: when it is determined that the target message is an on-chip message, no storage scheduling is required, and the target message is stored in the on-chip storage space. The second case: when it is determined that the attributes of the target message are of mixed types, it is necessary to determine whether the target message needs to be stored on-chip or off-chip at this time, that is, storage scheduling needs to be performed, and step 205 is determined to be executed. The third case: when it is determined that the target message is an off-chip message, there is no need to perform storage scheduling, and the target message is stored in an off-chip storage device.
这种先确定目标报文的属性,再确定后续操作的处理方式,可以在需要存储调度的时候,才进行存储调度,避免盲目调度将片上报文存储至片外存储设备而导致的业务处理效率降低,或者,将片外报文存储至片上存储空间而占用片上存储空间。This first determines the attributes of the target message, and then determines the processing method for subsequent operations. Storage scheduling can be performed when storage scheduling is needed, avoiding the business processing efficiency caused by blind scheduling to store on-chip messages to off-chip storage devices Reduce, or, store off-chip messages to the on-chip storage space to occupy the on-chip storage space.
需要说明的是,本实施例中的同一队列中的报文可以是相同属性的报文,也可以是不同属性的报文。本实施例并不以此为限。It should be noted that the messages in the same queue in this embodiment may be messages of the same attribute or messages of different attributes. This embodiment is not limited to this.
步骤205:将接收到的目标报文的长度以及目标报文对应的目标队列的当前片上队列深度之和,确定为目标队列的更新深度。Step 205: The sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined as the update depth of the target queue.
步骤205与步骤101的实现过程和技术原理类似,此处不再赘述。The implementation process and technical principles of step 205 are similar to that of step 101, and will not be repeated here.
步骤206:判断目标队列的更新深度是否大于目标队列的搬移阈值。Step 206: Determine whether the update depth of the target queue is greater than the moving threshold of the target queue.
步骤207:当目标队列的更新深度小于或者等于目标队列的搬移阈值时,将目标报文存储在片上存储空间。Step 207: When the update depth of the target queue is less than or equal to the moving threshold of the target queue, store the target message in the on-chip storage space.
在步骤207中,目标队列的更新深度小于或者等于目标队列的搬移阈值,说明可以将该目标报文存储在片上存储空间中,因此,将目标报文存储在片上存储空间。In step 207, the update depth of the target queue is less than or equal to the moving threshold of the target queue, indicating that the target message can be stored in the on-chip storage space. Therefore, the target message is stored in the on-chip storage space.
步骤208:将目标队列的当前片上队列深度加上目标报文的长度之和,确定为目标队列的新的当前片上队列深度。Step 208: The sum of the current on-chip queue depth of the target queue plus the length of the target message is determined as the new current on-chip queue depth of the target queue.
在步骤208中,在将目标报文存储在片上存储空间后,需要更新目标队列的当前片上队列深度,以提高后续存储调度的准确性。更新方式为将目标队列的当前片上队列深度加上目标报文的长度之和,确定为目标队列的新的当前片上队列深度。In step 208, after storing the target message in the on-chip storage space, the current on-chip queue depth of the target queue needs to be updated to improve the accuracy of subsequent storage scheduling. The update method is to determine the new current on-chip queue depth of the target queue by adding the sum of the current on-chip queue depth of the target queue to the length of the target message.
步骤209:当目标队列的更新深度大于目标队列的搬移阈值时,确定目标报文需要搬移到片外存储设备存储。Step 209: When the update depth of the target queue is greater than the moving threshold of the target queue, it is determined that the target message needs to be moved to an off-chip storage device for storage.
步骤209与步骤102的实现过程和技术原理类似,此处不再赘述。The implementation process and technical principles of step 209 and step 102 are similar, and will not be repeated here.
步骤210:判断当前片外存储设备的带宽是否充足,片外存储设备的缓存容量是否充足。Step 210: Determine whether the bandwidth of the current off-chip storage device is sufficient, and whether the cache capacity of the off-chip storage device is sufficient.
在目标报文发生搬移之前,需要接收片外存储设备发送的状态信息,以确定片外存储设备能否存储目标报文。Before the target message is moved, the status information sent by the off-chip storage device needs to be received to determine whether the off-chip storage device can store the target message.
可选地,片外存储设备可以以预设的频率向存储调度装置发送状态信息。该状态信息用于表明该片外存储设备是否具有存储目标报文的能力。示例性地,该状态信息可以是该片外存储设备的当前带宽和/或当前剩余存储空间等信息。Optionally, the off-chip storage device may send the status information to the storage scheduling apparatus at a preset frequency. The status information is used to indicate whether the off-chip storage device has the ability to store target messages. Exemplarily, the status information may be information such as the current bandwidth and/or current remaining storage space of the off-chip storage device.
步骤211:若当前片外存储设备带宽充足并且片外存储设备容量充足,将所述目标报文搬移至片外存于片外存储设备。Step 211: If the bandwidth of the current off-chip storage device is sufficient and the capacity of the off-chip storage device is sufficient, move the target message to the off-chip and store in the off-chip storage device.
在一实施例中,在片外存储设备的带宽满足目标报文的带宽需求,并且,片外存储设备的存储空间充足时,即,在片外存储设备有足够的能力存储目标报文时,存储调度装置在确定目标报文需要搬移到片外存储设备存储之后,会将该目标报文搬移至片外存储设备存储。In an embodiment, when the bandwidth of the off-chip storage device meets the bandwidth requirement of the target message, and the storage space of the off-chip storage device is sufficient, that is, when the off-chip storage device has sufficient capacity to store the target message, After determining that the target message needs to be moved to the off-chip storage device for storage, the storage scheduling device moves the target message to the off-chip storage device for storage.
步骤212:将目标报文搬移至片外,存储于片外存储设备。Step 212: Move the target message to the off-chip and store it in the off-chip storage device.
步骤213:目标队列的片上队列深度保持不变。Step 213: The on-chip queue depth of the target queue remains unchanged.
存储调度装置在成功将目标报文搬移到片外存储设备存储之后,不需要更新目标队列的当前片上队列深度。由于这种场景中目标队列的当前片上队列深度没有变更,因此,将目标队列的当前片上队列深度确定 为目标队列的新的当前片上队列深度。After the storage scheduling device successfully moves the target message to the off-chip storage device for storage, it does not need to update the current on-chip queue depth of the target queue. Since the current on-chip queue depth of the target queue has not changed in this scenario, the current on-chip queue depth of the target queue is determined as the new current on-chip queue depth of the target queue.
步骤211与步骤105的实现过程和技术原理类似,此处不再赘述。The implementation process and technical principles of step 211 and step 105 are similar, and will not be repeated here.
步骤214:若当前片外存储设备的带宽不足,或者,片外存储设备的存储容量充足,执行步骤215。Step 214: If the bandwidth of the current off-chip storage device is insufficient, or the storage capacity of the off-chip storage device is sufficient, step 215 is executed.
步骤214与步骤106的实现过程和技术原理类似,此处不再赘述。The implementation process and technical principles of step 214 and step 106 are similar, and will not be repeated here.
步骤215:当前片上存储占用值是否大于片内预设存储占用阈值。Step 215: Whether the current on-chip storage occupancy value is greater than the on-chip preset storage occupancy threshold.
在一实施例中,需要搬移至片外的目标报文,在片外存储设备不具有存储目标报文的能力时,根据当前片上存储占用值与片内预设存储占用阈值的比较结果,确定当前片上存储设备是否具有存储目标报文的能力。In one embodiment, the target message that needs to be moved off-chip, when the off-chip storage device does not have the ability to store the target message, it is determined according to the comparison result of the current on-chip storage occupancy value and the on-chip preset storage occupancy threshold Whether the current on-chip storage device has the ability to store target messages.
步骤215与步骤107的实现过程和技术原理类似,此处不再赘述。The implementation process and technical principles of step 215 are similar to step 107, and will not be repeated here.
步骤216:当前片上存储占用值大于片内预设存储占用阈值时,将需要搬移至片外的目标报文重新存储在片上。Step 216: When the current on-chip storage occupancy value is greater than the on-chip preset storage occupancy threshold, the target message that needs to be moved off-chip is stored on the chip again.
当前片上存储占用值小于预设存储占用阈值,说明此时片上存储设备中还有多余的存储空间,当前片上存储设备具有存储目标报文的能力。The current on-chip storage occupancy value is less than the preset storage occupancy threshold, indicating that there is excess storage space in the on-chip storage device at this time, and the current on-chip storage device has the ability to store the target message.
在片外存储设备无法成功存储目标报文,但是,当前片上存储设备具有存储目标报文的能力时,将目标队列的报文重新存储在片内空间,提高了片上存储空间的利用率,从而,提高芯片整体性能。The off-chip storage device cannot successfully store the target message. However, when the current on-chip storage device has the ability to store the target message, the message in the target queue is re-stored in the on-chip space, which improves the utilization of the on-chip storage space. , Improve the overall performance of the chip.
步骤217:将目标队列的当前更新深度,即,将接收到的目标报文的长度以及目标报文对应的目标队列的当前片上队列深度之和,确定为目标队列新的当前片上队列深度。Step 217: Determine the current update depth of the target queue, that is, the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the new current on-chip queue depth of the target queue.
步骤217与步骤109的实现过程和技术原理类似,此处不再赘述。The implementation process and technical principles of step 217 are similar to step 109, and will not be repeated here.
步骤218:前片上存储占用值小于或者等于片内预设存储占用阈值时,搬移丢弃目标报文。Step 218: When the previous on-chip storage occupancy value is less than or equal to the on-chip preset storage occupancy threshold, the target message is moved and discarded.
在确定片外存储设备无法存储目标报文,并且,片内存储设备也无法存储目标报文时,对目标报文打上搬移丢弃的标记,存储调度装置将该目标报文搬移丢弃。When it is determined that the off-chip storage device cannot store the target message, and the on-chip storage device cannot store the target message, the target message is marked as being moved and discarded, and the storage scheduling device moves and discards the target message.
在片外存储设备无法成功存储目标报文,并且,当前片内存储设备 也无法存储目标报文时,才触发目标报文的搬移丢弃将该报文丢弃,实现尽可能地减小丢弃报文的概率,避免该存储调度方法影响业务正常运行。When the off-chip storage device cannot successfully store the target message, and the current on-chip storage device cannot store the target message, the move and discard of the target message is triggered to discard the message, so as to reduce the number of discarded messages as much as possible. The probability of avoiding the storage scheduling method from affecting the normal operation of the business.
步骤219:目标队列的片上队列深度保持不变。Step 219: The on-chip queue depth of the target queue remains unchanged.
存储调度装置在将目标报文搬移丢弃之后,不需要更新目标队列的当前片上队列深度。由于这种场景中目标队列的当前片上队列深度没有变更,因此,将目标队列的当前片上队列深度确定为目标队列的新的当前片上队列深度。After the storage scheduling device moves and discards the target message, it does not need to update the current on-chip queue depth of the target queue. Since the current on-chip queue depth of the target queue has not changed in this scenario, the current on-chip queue depth of the target queue is determined as the new current on-chip queue depth of the target queue.
以下结合存储调度装置的一种具体的实现方式对本实施例的方案进行详细描述。图3为一实施例提供的存储调度装置的结构示意图。如图3所示,本实施例提供的存储调度装置包括如下模块:阈值管理模块31、搬移状态计数模块32以及搬移仲裁模块33。其中,阈值管理模块31及搬移状态计数模块32均与搬移仲裁模块33连接。The solution of this embodiment will be described in detail below in conjunction with a specific implementation of the storage scheduling device. FIG. 3 is a schematic structural diagram of a storage scheduling device provided by an embodiment. As shown in FIG. 3, the storage scheduling device provided in this embodiment includes the following modules: a threshold management module 31, a movement state counting module 32, and a movement arbitration module 33. Among them, the threshold management module 31 and the movement state counting module 32 are both connected to the movement arbitration module 33.
阈值管理模块31可以实现查询队列的搬移阈值以及查询片内存储占用阈值。假设队列的数量为2条,编号0和1,那么,阈值管理模块31可以依据队列号查询对应的队列搬移阈值,将其存入共享暂存寄存器供搬移仲裁模块33使用,还可以依据队列号查询对应的存储占用阈值。假设队列0对应的搬移域值为a0,对应的存储占用阈值为s0。队列1对应的搬移阈值为a1,对应的存储占用阈值为s1。The threshold management module 31 can implement the movement threshold of the query queue and the query on-chip storage occupancy threshold. Assuming that the number of queues is two, numbered 0 and 1, then the threshold management module 31 can query the corresponding queue movement threshold according to the queue number, and store it in the shared temporary storage register for the movement arbitration module 33 to use, or according to the queue number Query the corresponding storage occupancy threshold. Assume that the shift domain value corresponding to queue 0 is a0, and the corresponding storage occupancy threshold value is s0. The moving threshold corresponding to queue 1 is a1, and the corresponding storage occupancy threshold is s1.
搬移状态计数模块32可以确定队列的当前片上队列深度,确定队列的更新深度,以及确定队列的新的当前片上队列深度。进一步地,搬移状态计数模块32还可以确定目标报文的报文属性。图3中包括N+1个搬移状态计数模块32。每个搬移状态计数模块32可以管理不同维度下的队列的当前片上队列深度。例如,搬移状态计数模块0管理从维度A划分队列时,Q+1个队列的当前片上队列深度,搬移状态计数模块N管理从维度M划分队列时,Q+1个队列的当前片上队列深度。假设队列0的当前片上队列深度为b0,假设队列1的当前片队列深度为b1。这里的队列0和队列1可以是任意维度下的队列。The moving state counting module 32 can determine the current on-chip queue depth of the queue, determine the update depth of the queue, and determine the new current on-chip queue depth of the queue. Further, the moving state counting module 32 can also determine the message attributes of the target message. Fig. 3 includes N+1 moving state counting modules 32. Each moving state counting module 32 can manage the current on-chip queue depth of queues in different dimensions. For example, the movement state counting module 0 manages the current on-chip queue depth of Q+1 queues when the queue is divided from dimension A, and the movement state counting module N manages the current on-chip queue depth of Q+1 queues when the queue is divided from dimension M. Suppose the current on-chip queue depth of queue 0 is b0, and the current chip queue depth of queue 1 is b1. Here, queue 0 and queue 1 can be queues in any dimension.
搬移仲裁模块33包括片内资源判断子模块331和调度器332。其中,调度器332的数量可以为多个。可选地,调度器0的配置值为2’b00,表示该调度器0进行系统级调度。调度器0用于实时计算片上存储空间消耗状态,即,计算当前片上存储占用值。其他的调度器用于对队列进行调度。每个队列可以对应一个调度器。示例性地,队列0对应调度器1,队列1对应调度器2。调度器1和调度器2的配置值为2’b01,表示调度策略为流队列级调度。The movement arbitration module 33 includes an on-chip resource judgment sub-module 331 and a scheduler 332. Among them, the number of schedulers 332 may be multiple. Optionally, the configuration value of scheduler 0 is 2'b00, which means that scheduler 0 performs system-level scheduling. The scheduler 0 is used to calculate the on-chip storage space consumption status in real time, that is, to calculate the current on-chip storage occupancy value. Other schedulers are used to schedule the queue. Each queue can correspond to a scheduler. Illustratively, queue 0 corresponds to scheduler 1, and queue 1 corresponds to scheduler 2. The configuration value of scheduler 1 and scheduler 2 is 2'b01, which indicates that the scheduling strategy is flow queue level scheduling.
队列0接收到的报文的长度为c0,此时的片上存储占用值为c0’,队列0的当前片上队列深度为b0。将b0+c0确定为0号队列的更新深度。如果调度器1确定b0+c0>a0,那么队列0对应的当前接收到的报文需要搬移到片外存储设备中;如果调度器1确定b0+c0≤a0,那么将队列0对应的当前接收到的报文存储在片上存储空间中。The length of the message received by queue 0 is c0, the on-chip storage occupancy value at this time is c0', and the current on-chip queue depth of queue 0 is b0. Determine b0+c0 as the update depth of queue 0. If scheduler 1 determines that b0+c0>a0, then the currently received message corresponding to queue 0 needs to be moved to the off-chip storage device; if scheduler 1 determines that b0+c0≤a0, then the current received message corresponding to queue 0 The received message is stored in the on-chip storage space.
同样地,队列1接收到的报文长度c1,此时的片上缓存占用值为c0’+c1’,队列1的当前片上队列深度为b1。将b1+c1确定为队列1的更新深度。如果调度器2确定b1+c1>a1,那么队列1对应的当前接收到的报文需要搬移到片外存储设备中;如果调度器2确定b1+c1≤a1,那么将队列1对应的当前接收到的报文存储在片上存储空间中。Similarly, the length of the message received by queue 1 is c1, the on-chip buffer occupancy value at this time is c0'+c1', and the current on-chip queue depth of queue 1 is b1. Determine b1+c1 as the update depth of queue 1. If scheduler 2 determines that b1+c1>a1, then the currently received message corresponding to queue 1 needs to be moved to the off-chip storage device; if scheduler 2 determines that b1+c1≤a1, then the currently received message corresponding to queue 1 The received message is stored in the on-chip storage space.
如果在队列1对应的当前接收到的报文不需要搬移到片外存储设备,报文会存储在片上空间。如果在队列1对应的当前接收到的报文需要搬移到片外存储设备,片外存储设备反馈的状态信息显示当前片外存储设备没有足够的存储能力,报文不会发生搬移操作,不会搬移至片外片外存储设备。如果片内资源判断子模块331确定片内空间充足,有足够空间存储当前接收到的报文,即,c0’+c1’≤s1,需要搬移的报文会重新存储在片上空间中;如果片内资源判断子模块331确定片内空间不足,不足以存储当前接收到的报文,即,c0’+c1’>s1,则会触发报文的搬移丢弃,将需要搬移的报文丢弃。If the currently received message corresponding to queue 1 does not need to be moved to an off-chip storage device, the message will be stored in the on-chip space. If the currently received message corresponding to queue 1 needs to be moved to an off-chip storage device, the status information fed back by the off-chip storage device shows that the current off-chip storage device does not have enough storage capacity, and the message will not be moved. Move to an off-chip storage device. If the on-chip resource judging submodule 331 determines that the on-chip space is sufficient and there is enough space to store the currently received message, that is, c0'+c1'≤s1, the message that needs to be moved will be stored in the on-chip space again; The internal resource judgment submodule 331 determines that the on-chip space is insufficient to store the currently received message, that is, c0'+c1'>s1, it will trigger the transfer and discard of the message, and discard the message that needs to be moved.
如图3所示,多个调度器中的任一个调度器确定需要搬移,则需要搬移,因此,多个调度器之间通过“逻辑或”连接。如果任一个调度器 确定需要将报文搬移到片外存储设备,并且(即图3中右方的“逻辑与”),片外存储设备存储能力不足、片内空间充足时,则报文会重新存储在片上空间中;如果任一个调度器确定需要将报文搬移到片外存储设备,并且(即图3中右方的“逻辑与”),片外存储设备存储能力不足、片内空间不足时,则会触发报文的搬移丢弃,将报文丢弃。As shown in Figure 3, if any one of the multiple schedulers determines that it needs to be moved, it needs to be moved. Therefore, the multiple schedulers are connected by a "logical OR". If any scheduler determines that the message needs to be moved to an off-chip storage device, and (that is, the "logical AND" on the right in Figure 3), the off-chip storage device has insufficient storage capacity and sufficient on-chip space, the message will be Re-store in the on-chip space; if any scheduler determines that the message needs to be moved to an off-chip storage device, and (ie the "logical AND" on the right in Figure 3), the off-chip storage device has insufficient storage capacity and on-chip space When it is insufficient, it will trigger the transfer and discard of the message, and the message will be discarded.
搬移状态计数模块32可以根据存储调度结果更新队列的当前片上队列深度。因此,搬移状态计数模块可以与存储调度结果,即片上/片外搬移结果连接,根据搬移结果确定是否需要更新片上队列深度。The moving state counting module 32 can update the current on-chip queue depth of the queue according to the storage scheduling result. Therefore, the moving state counting module can be connected with the storage scheduling result, that is, the on-chip/off-chip moving result, and determine whether the on-chip queue depth needs to be updated according to the moving result.
在队列1当前接收到的报文需要搬移到片外存储设备时,如果片外存储设备没有足够的存储能力,片内有足够空间存储当前接收到的报文,需要搬移的报文会重新存储在片上空间中,将空闲的片上存储空间重新利用起来,提高了片上存储空间的利用率,从而,提高芯片整体性能。在队列1当前接收到的报文需要搬移到片外存储设备时,如果片外存储设备没有足够的存储能力,片内有也没有足够空间存储当前接收到的报文时,才触发报文的搬移丢弃,将该报文丢弃,实现尽可能地减小丢弃报文的概率,避免该存储调度方法影响业务正常运行。When the messages currently received in queue 1 need to be moved to an off-chip storage device, if the off-chip storage device does not have enough storage capacity, there is enough space on the chip to store the currently received messages, and the messages that need to be moved will be stored again In the on-chip space, the free on-chip storage space is reused to improve the utilization of the on-chip storage space, thereby improving the overall performance of the chip. When the message currently received in queue 1 needs to be moved to an off-chip storage device, if the off-chip storage device does not have enough storage capacity and there is or does not have enough space on the chip to store the currently received message, the message will be triggered. Moving and discarding, discarding the message, reducing the probability of discarding the message as much as possible, and avoiding the storage scheduling method from affecting the normal operation of the business.
基于本实施例所提供的存储调度方法,在设计输入多队列时可以有极高的自由度。在队列数量、调度策略上能实现参数化及规模化。能适配各种不同的系统结构和数据流调度需求。大大降低系统的设计难度,提高结构的可靠性。同时也对结构的可移植性和可继承性提供了帮助。Based on the storage scheduling method provided by this embodiment, there can be a very high degree of freedom when designing input multi-queues. The number of queues and scheduling strategies can be parameterized and scaled. It can adapt to various system structures and data flow scheduling requirements. Greatly reduce the design difficulty of the system and improve the reliability of the structure. At the same time, it also helps with the portability and inheritability of the structure.
本实施例提供的存储调度方法,一方面,在进行存储调度之前,先判断目标报文的属性,再确定后续操作,可以在需要存储调度的时候,才进行存储调度,避免盲目调度将片上报文存储至片外存储设备而导致的业务处理效率降低,或者,将片外报文存储至片上存储空间而占用片上存储空间;另一方面,本实施例可以基于不同的存储调度结果,采用不同的计算过程更新目标队列的当前片上队列深度,以为后续的存储调度过程提供准确的依据,提高存储调度的精准性,进而,进一步提高芯片的性能。In the storage scheduling method provided in this embodiment, on the one hand, before performing storage scheduling, first determine the attributes of the target message, and then determine subsequent operations. Storage scheduling can be performed when storage scheduling is needed, avoiding blind scheduling and reporting the chip. The service processing efficiency is reduced due to the storage of files to off-chip storage devices, or the storage of off-chip messages in the on-chip storage space occupies the on-chip storage space; on the other hand, this embodiment may use different storage scheduling results based on different storage scheduling results. The calculation process updates the current on-chip queue depth of the target queue to provide an accurate basis for the subsequent storage scheduling process, improve the accuracy of storage scheduling, and further improve the performance of the chip.
图4为本公开另一实施例提供的存储调度装置的结构示意图。如图4所示,本实施例提供的存储调度装置包括如下模块:第一确定模块41、第二确定模块42、第三确定模块43以及触发模块44。FIG. 4 is a schematic structural diagram of a storage scheduling device provided by another embodiment of the present disclosure. As shown in FIG. 4, the storage scheduling apparatus provided in this embodiment includes the following modules: a first determining module 41, a second determining module 42, a third determining module 43, and a triggering module 44.
第一确定模块41,被配置为将接收到的目标报文的长度以及目标报文对应的目标队列的当前片上队列深度之和,确定为目标队列的更新深度。The first determining module 41 is configured to determine the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the update depth of the target queue.
第二确定模块42,被配置为当目标队列的更新深度大于目标队列的搬移阈值时,确定目标报文需要搬移到片外存储设备存储。The second determining module 42 is configured to determine that the target message needs to be moved to an off-chip storage device for storage when the update depth of the target queue is greater than the moving threshold of the target queue.
第三确定模块43,被配置为若目标报文需要搬移到片外存储设备,片外存储设备没有足够存储能力,并且,片上有足够空间时,确定目标报文会重新存储在片上空间。The third determining module 43 is configured to determine that if the target message needs to be moved to an off-chip storage device, the off-chip storage device does not have sufficient storage capacity, and when there is enough space on the chip, it is determined that the target message will be stored in the on-chip space again.
触发模块44,被配置为若目标报文需要搬移到片外存储设备,片外存储设备没有足够存储能力,并且,片上空间不足时,则触发目标队列的目标报文搬移丢弃。The trigger module 44 is configured to trigger the removal and discarding of the target message in the target queue if the target message needs to be moved to an off-chip storage device, and the off-chip storage device does not have sufficient storage capacity, and the on-chip space is insufficient.
可选地,该装置还包括:接收模块、第一存储模块以及丢弃模块。Optionally, the device further includes: a receiving module, a first storage module, and a discarding module.
接收模块,被配置为接收片外存储设备发送的状态信息。The receiving module is configured to receive the status information sent by the off-chip storage device.
第一存储模块,被配置为若根据状态信息确定片外存储设备能够存储目标报文,则将目标报文搬移到片外存储设备存储。The first storage module is configured to move the target message to the off-chip storage device for storage if it is determined according to the status information that the off-chip storage device can store the target message.
丢弃模块,被配置为若根据状态信息确定片外存储设备无法存储目标报文,并且,片内存储没有空间存储目标报文时,则将目标报文丢弃。The discarding module is configured to discard the target message if it is determined according to the status information that the off-chip storage device cannot store the target message, and there is no space in the on-chip storage to store the target message.
在一实施例中,该装置还包括:第四确定模块45,被配置为将目标队列的当前片上队列深度减去出队报文的长度之差,确定为目标队列的新的当前片上队列深度。In an embodiment, the device further includes: a fourth determining module 45 configured to determine the current on-chip queue depth of the target queue minus the length of the dequeue message as the new current on-chip queue depth of the target queue .
第四确定模块45,还被配置为将需要搬移的目标报文重新存储到片上空间时,目标队列的当前片上队列深度加上目标报文的长度之和,确定为目标队列的新的当前片上队列深度。The fourth determining module 45 is also configured to re-store the target message that needs to be moved to the on-chip space, the current on-chip queue depth of the target queue plus the length of the target message is determined as the new current on-chip of the target queue Queue depth.
在一实施例中,该装置还包括:第五确定模块,被配置为将所有队列的当前片上队列深度之和,确定为当前片上存储占用值。In an embodiment, the device further includes: a fifth determining module configured to determine the sum of the current on-chip queue depths of all queues as the current on-chip storage occupancy value.
在一实施例中,在触发目标队列的报文搬移丢弃的方面,触发模块44具体用于:为目标队列添加丢弃标签;在队列出队调度中,若确定目标队列存在丢弃标签,则触发目标队列的报文出队,并将出队报文丢弃。In one embodiment, in terms of triggering the message transfer and discarding of the target queue, the trigger module 44 is specifically configured to: add a discard tag to the target queue; in queue dequeue scheduling, if it is determined that the target queue has a discard tag, trigger The packets in the target queue are dequeued, and the dequeued packets are discarded.
本实施例提供的存储调度装置用于执行上述任意实施例的存储调度方法,本实施例提供的存储调度装置实现原理和技术效果类似,此处不再赘述。The storage scheduling device provided in this embodiment is used to execute the storage scheduling method of any of the foregoing embodiments. The implementation principles and technical effects of the storage scheduling device provided in this embodiment are similar, and will not be repeated here.
图5为本公开又一实施例提供的存储调度装置的结构示意图。本实施例在图4所示实施例及各种可选方案的基础上,对存储调度装置包括的其他模块作一详细说明。如图5所示,本实施例提供的存储调度装置还包括如下模块:第二存储模块51、判断模块52、第六确定模块53、第三存储模块54以及第四存储模块55。FIG. 5 is a schematic structural diagram of a storage scheduling device provided by another embodiment of the present disclosure. This embodiment provides a detailed description of other modules included in the storage scheduling device on the basis of the embodiment shown in FIG. 4 and various alternative solutions. As shown in FIG. 5, the storage scheduling device provided in this embodiment further includes the following modules: a second storage module 51, a judgment module 52, a sixth determination module 53, a third storage module 54 and a fourth storage module 55.
第二存储模块51,被配置为当目标队列的更新深度小于或者等于目标队列的搬移阈值时,将目标报文存储在片上存储空间。The second storage module 51 is configured to store the target message in the on-chip storage space when the update depth of the target queue is less than or equal to the movement threshold of the target queue.
第四确定模块45,还被配置为将目标队列的当前片上队列深度加上目标报文的长度之和,确定为目标队列的新的当前片上队列深度。The fourth determining module 45 is also configured to determine the current on-chip queue depth of the target queue plus the length of the target message as the new current on-chip queue depth of the target queue.
第四确定模块45,还被配置为若成功将目标报文搬移到片外存储设备存储,则将目标队列的当前片上队列深度确定为目标队列的新的当前片上队列深度。The fourth determining module 45 is further configured to determine the current on-chip queue depth of the target queue as the new current on-chip queue depth of the target queue if the target message is successfully moved to the off-chip storage device for storage.
可选地,预设存储占用阈值为目标队列对应的存储占用阈值。相对应地,该装置还包括:第五确定模块,被配置为若将目标报文搬移到片外存储设备时,则根据目标队列的优先级,确定与目标队列的优先级对应的存储占用阈值。Optionally, the preset storage occupancy threshold is a storage occupancy threshold corresponding to the target queue. Correspondingly, the device further includes: a fifth determining module, configured to determine a storage occupancy threshold corresponding to the priority of the target queue according to the priority of the target queue when the target message is moved to the off-chip storage device .
判断模块52,被配置为判断目标报文的属性。The judging module 52 is configured to judge the attributes of the target message.
第六确定模块53,被配置为当判断目标报文的属性为混合类型时,确定执行将接收到的目标报文的长度以及目标报文对应的目标队列的当前片上队列深度之和,确定为目标队列的更新深度的步骤。The sixth determining module 53 is configured to determine the sum of the length of the target message to be received and the current on-chip queue depth of the target queue corresponding to the target message when it is determined that the attribute of the target message is a mixed type, and it is determined as Steps to update the depth of the target queue.
在一实施例中,第三存储模块54,被配置为当判断目标报文的属性为片上报文时,将目标报文存储在片上存储中。In an embodiment, the third storage module 54 is configured to store the target message in the on-chip storage when it is determined that the attribute of the target message is an on-chip message.
第四存储模块55,被配置为当判断目标报文的属性为片外报文时,将目标报文存储在片外存储设备中。The fourth storage module 55 is configured to store the target message in the off-chip storage device when it is determined that the attribute of the target message is an off-chip message.
本实施例提供的存储调度装置用于执行上述任意实施例的存储调度方法,本实施例提供的存储调度装置实现原理和技术效果类似,此处不再赘述。The storage scheduling device provided in this embodiment is used to execute the storage scheduling method of any of the foregoing embodiments. The implementation principles and technical effects of the storage scheduling device provided in this embodiment are similar, and will not be repeated here.
图6为本公开一实施例提供的存储调度设备的结构示意图。如图6所示,该存储调度设备包括处理器61和存储器62;存储调度设备中处理器61的数量可以是一个或多个,图6中以一个处理器61为例;存储调度设备中的处理器61和存储器62;可以通过总线或其他方式连接,图6中以通过总线连接为例。FIG. 6 is a schematic structural diagram of a storage scheduling device provided by an embodiment of the disclosure. As shown in Figure 6, the storage scheduling device includes a processor 61 and a memory 62; the number of processors 61 in the storage scheduling device can be one or more. In Figure 6, one processor 61 is taken as an example; The processor 61 and the memory 62; can be connected by a bus or in other ways. In FIG. 6, the connection by a bus is taken as an example.
存储器62作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本申请实施例中的存储调度方法对应的程序指令/模块(例如,存储调度装置中的第一确定模块41、第二确定模块42、第三确定模块43、触发模块44以及第四确定模块45)。处理器61通过运行存储在存储器62中的软件程序、指令以及模块,从而存储调度设备的各种功能应用以及数据处理,即实现上述的存储调度方法。As a computer-readable storage medium, the memory 62 can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the storage scheduling method in the embodiment of the present application (for example, the first storage scheduling device in the storage scheduling device). The determining module 41, the second determining module 42, the third determining module 43, the triggering module 44, and the fourth determining module 45). The processor 61 stores various functional applications and data processing of the scheduling device by running the software programs, instructions, and modules stored in the memory 62, that is, realizes the above-mentioned storage scheduling method.
存储器62可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据存储调度设备的使用所创建的数据等。此外,存储器62可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。The memory 62 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the storage scheduling device and the like. In addition, the memory 62 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
本申请实施例还提供一种包含计算机可执行指令的存储介质,计算机可执行指令在由计算机处理器执行时用于执行一种存储调度方法,该方法包括:An embodiment of the present application also provides a storage medium containing computer-executable instructions. The computer-executable instructions are used to execute a storage scheduling method when executed by a computer processor, and the method includes:
将接收到的目标报文的长度以及所述目标报文对应的目标队列的当前片上队列深度之和,确定为所述目标队列的更新深度;Determining the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the update depth of the target queue;
当所述目标队列的更新深度大于所述目标队列的搬移阈值时,确定所述目标报文需要搬移到片外存储设备存储;When the update depth of the target queue is greater than the moving threshold of the target queue, determining that the target message needs to be moved to an off-chip storage device for storage;
若当前片外存储设备带宽充足并且片外存储设备容量充足,则将所述目标报文搬移至片外并存于片外存储设备,所述目标队列的片上队列深度保持不变;If the bandwidth of the current off-chip storage device is sufficient and the capacity of the off-chip storage device is sufficient, the target message is moved off-chip and stored in the off-chip storage device, and the on-chip queue depth of the target queue remains unchanged;
若当前片外存储设备带宽不足或片外存储设备容量不足,并且,当前片上存储占用值小于或等于预设存储占用阈值,则将所述目标报文存于片上存储设备,将所述目标队列的当前更新深度,即,将接收到的目标报文的长度以及所述目标报文对应的目标队列的当前片上队列深度之和,确定为所述目标队列的新的当前片上队列深度;If the bandwidth of the current off-chip storage device is insufficient or the capacity of the off-chip storage device is insufficient, and the current on-chip storage occupancy value is less than or equal to the preset storage occupancy threshold, the target message is stored in the on-chip storage device, and the target queue The current update depth of, that is, the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined as the new current on-chip queue depth of the target queue;
若当前片上存储占用值大于预设存储占用阈值,则搬移丢弃所述目标报文,所述目标队列的片上队列深度保持不变。If the current on-chip storage occupancy value is greater than the preset storage occupancy threshold, the target message is moved and discarded, and the on-chip queue depth of the target queue remains unchanged.
当然,本申请所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的方法操作,还可以执行本申请任意实施例所提供的存储调度方法中的相关操作。Of course, a storage medium containing computer-executable instructions provided in this application is not limited to the method operations described above, and can also perform related operations in the storage scheduling method provided in any embodiment of this application. .
以上所述,仅为本申请的示例性实施例而已,并非用于限定本申请的保护范围。The above are only exemplary embodiments of the present application, and are not used to limit the protection scope of the present application.
一般来说,本申请的多种实施例可以在硬件或专用电路、软件、逻辑或其任何组合中实现。例如,一些方面可以被实现在硬件中,而其它方面可以被实现在可以被控制器、微处理器或其它计算装置执行的固件或软件中,尽管本申请不限于此。Generally speaking, the various embodiments of the present application can be implemented in hardware or dedicated circuits, software, logic or any combination thereof. For example, some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, although the application is not limited thereto.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、设备中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。A person of ordinary skill in the art can understand that all or some of the steps, systems, and functional modules/units in the device disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof.
在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可 读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。In the hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may consist of several physical components. The components are executed cooperatively. Certain physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit . Such software may be distributed on a computer-readable medium, and the computer-readable medium may include a computer storage medium (or a non-transitory medium) and a communication medium (or a transitory medium). As is well known by those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile data implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Sexual, removable and non-removable media. Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other storage technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or Any other medium used to store desired information and that can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media. .
以上参照附图说明了本公开实施例的优选实施例,并非因此局限本公开实施例的权利范围。本领域技术人员不脱离本公开实施例的范围和实质内所作的任何修改、等同替换和改进,均应在本公开实施例的权利范围之内。The preferred embodiments of the embodiments of the present disclosure are described above with reference to the accompanying drawings, and the scope of rights of the embodiments of the present disclosure is not limited thereby. Any modification, equivalent replacement and improvement made by those skilled in the art without departing from the scope and essence of the embodiments of the present disclosure shall fall within the scope of rights of the embodiments of the present disclosure.

Claims (12)

  1. 一种存储调度方法,其中,所述方法包括:A storage scheduling method, wherein the method includes:
    将接收到的目标报文的长度以及所述目标报文对应的目标队列的当前片上队列深度之和,确定为所述目标队列的更新深度;Determining the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message as the update depth of the target queue;
    当所述目标队列的更新深度大于所述目标队列的搬移阈值时,确定所述目标报文需要搬移到片外存储设备存储;When the update depth of the target queue is greater than the moving threshold of the target queue, determining that the target message needs to be moved to an off-chip storage device for storage;
    若当前片外存储设备带宽充足并且片外存储设备容量充足,则将目标报文搬移至片外并存于片外存储设备,目标队列的片上队列深度保持不变;If the bandwidth of the current off-chip storage device is sufficient and the capacity of the off-chip storage device is sufficient, the target message is moved off-chip and stored on the off-chip storage device, and the on-chip queue depth of the target queue remains unchanged;
    若当前片外存储设备带宽不足或片外存储设备容量不足,并且,当前片上存储占用值小于或等于预设存储占用阈值,则将目标报文存于片上存储设备,将目标队列的当前更新深度,确定为目标队列的新的当前片上队列深度;If the bandwidth of the current off-chip storage device is insufficient or the capacity of the off-chip storage device is insufficient, and the current on-chip storage occupancy value is less than or equal to the preset storage occupancy threshold, the target packet is stored in the on-chip storage device, and the current update depth of the target queue , Determined as the new current on-chip queue depth of the target queue;
    若当前片上存储占用值大于预设存储占用阈值,则搬移丢弃目标报文,目标队列的片上队列深度保持不变。If the current on-chip storage occupancy value is greater than the preset storage occupancy threshold, the target packet is moved and discarded, and the on-chip queue depth of the target queue remains unchanged.
  2. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    当所述目标队列的更新深度小于或者等于所述目标队列的搬移阈值时,将所述目标报文存储在片上存储空间;When the update depth of the target queue is less than or equal to the movement threshold of the target queue, storing the target message in the on-chip storage space;
    将所述目标队列的当前片上队列深度加上所述目标报文的长度之和,确定为所述目标队列的新的当前片上队列深度。The sum of the current on-chip queue depth of the target queue plus the length of the target message is determined as the new current on-chip queue depth of the target queue.
  3. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    若成功将所述目标报文搬移到所述片外存储设备存储,则将所述目标队列的当前片上队列深度确定为所述目标队列的新的当前片上队列深度。If the target message is successfully moved to the off-chip storage device for storage, the current on-chip queue depth of the target queue is determined as the new current on-chip queue depth of the target queue.
  4. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    若所述片外存储设备带宽不足或片外存储设备容量不足,并且,当前片上存储占用值小于或等于预设存储占用阈值,则将目标报文的长度以及目标报文对应的目标队列的当前片上队列深度之和,确定为所述目标队列的新的当前片上队列深度。If the bandwidth of the off-chip storage device is insufficient or the capacity of the off-chip storage device is insufficient, and the current on-chip storage occupancy value is less than or equal to the preset storage occupancy threshold, the length of the target message and the current target queue corresponding to the target message The sum of the on-chip queue depths is determined as the new current on-chip queue depth of the target queue.
  5. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    若当前片上存储占用值大于预设存储占用阈值,所述目标报文发生搬移丢弃,则将所述目标队列的当前片上队列深度确定为所述目标队列的新的当前片上队列深度。If the current on-chip storage occupancy value is greater than the preset storage occupancy threshold, and the target message is moved and discarded, the current on-chip queue depth of the target queue is determined as the new current on-chip queue depth of the target queue.
  6. 根据权利要求1所述的方法,其中,若所述片外存储设备带宽不足或片外存储设备容量不足,并且当前片上存储占用值小于或等于预设存储占用阈值,所述方法还包括:The method according to claim 1, wherein if the bandwidth of the off-chip storage device is insufficient or the capacity of the off-chip storage device is insufficient, and the current on-chip storage occupancy value is less than or equal to a preset storage occupancy threshold, the method further comprises:
    将所有队列的当前片上队列深度之和,确定为所述当前片上存储占用值。The sum of the current on-chip queue depths of all queues is determined as the current on-chip storage occupancy value.
  7. 根据权利要求1至6任一项所述的方法,其中,所述预设存储占用阈值为所述目标队列对应的存储占用阈值。The method according to any one of claims 1 to 6, wherein the preset storage occupancy threshold is a storage occupancy threshold corresponding to the target queue.
  8. 根据权利要求1至6任一项所述的方法,其中,所述将接收到的目标报文的长度以及所述目标报文对应的目标队列的当前片上队列深度之和,确定为所述目标队列的更新深度之前,所述方法还包括:The method according to any one of claims 1 to 6, wherein the sum of the length of the received target message and the current on-chip queue depth of the target queue corresponding to the target message is determined as the target Before the update depth of the queue, the method further includes:
    判断所述目标报文的属性;Judging the attributes of the target message;
    当判断所述目标报文的属性为混合类型时,确定执行所述将接收到的目标报文的长度以及所述目标报文对应的目标队列的当前片上队列深度之和,确定为所述目标队列的更新深度的步骤。When it is determined that the attribute of the target message is of mixed type, the sum of the length of the target message to be received and the current on-chip queue depth of the target queue corresponding to the target message is determined to be the target The update depth step of the queue.
  9. 根据权利要求8所述的方法,其中,所述判断所述目标报文的属性之后,所述方法还包括:The method according to claim 8, wherein after said determining the attribute of the target message, the method further comprises:
    当判断所述目标报文的属性为片上报文时,将所述目标报文存储在片上存储中;When it is determined that the attribute of the target message is an on-chip message, storing the target message in on-chip storage;
    当判断所述目标报文的属性为片外报文时,将所述目标报文存储在所述片外存储设备中。When it is determined that the attribute of the target message is an off-chip message, the target message is stored in the off-chip storage device.
  10. 根据权利要求1至6任一项所述的方法,其中,所述目标报文需要搬移到片外存储设备存储之前,所述方法还包括:The method according to any one of claims 1 to 6, wherein before the target message needs to be moved to an off-chip storage device for storage, the method further comprises:
    接收所述片外存储设备发送的状态信息;Receiving status information sent by the off-chip storage device;
    若根据所述片外存储设备状态信息确定所述片外存储设备能够存储所述目标报文,则将所述目标报文搬移到所述片外存储设备存储;If it is determined based on the off-chip storage device status information that the off-chip storage device can store the target message, move the target message to the off-chip storage device for storage;
    若根据所述片外存储设备状态信息确定所述片外存储设备无法存储所述目标报文,并且,当前片上存储占用值小于或等于预设存储占用阈值,则将所述目标报文存储在片上;If it is determined according to the off-chip storage device status information that the off-chip storage device cannot store the target message, and the current on-chip storage occupancy value is less than or equal to the preset storage occupancy threshold, the target message is stored in Chip;
    若根据所述片外存储设备状态信息确定所述片外存储设备无法存储所述目标报文,并且,当前片上存储占用值大于预设存储占用阈值,则将所述目标报文搬移丢弃。If it is determined according to the off-chip storage device status information that the off-chip storage device cannot store the target message, and the current on-chip storage occupancy value is greater than a preset storage occupancy threshold, the target message is moved and discarded.
  11. 一种存储调度设备,其中,所述设备包括存储器、处理器、存储在所述存储器上并可在所述处理器上运行的程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,所述程序被所述处理器执行时实现如权利要求1至10任一项所述的存储调度方法的步骤。A storage scheduling device, wherein the device includes a memory, a processor, a program that is stored on the memory and can run on the processor, and is used to realize the connection between the processor and the memory A data bus for communication, when the program is executed by the processor, the steps of the storage scheduling method according to any one of claims 1 to 10 are implemented.
  12. 一种存储介质,用于计算机可读存储,其中,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求1至10中任一项所述的存储调度方法的步骤。A storage medium used for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement claims 1 to 10 The steps of any one of the storage scheduling method.
PCT/CN2021/101809 2020-06-23 2021-06-23 Storage scheduling method, device, and storage medium WO2021259321A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010582287.9A CN113835611A (en) 2020-06-23 2020-06-23 Storage scheduling method, device and storage medium
CN202010582287.9 2020-06-23

Publications (1)

Publication Number Publication Date
WO2021259321A1 true WO2021259321A1 (en) 2021-12-30

Family

ID=78964168

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/101809 WO2021259321A1 (en) 2020-06-23 2021-06-23 Storage scheduling method, device, and storage medium

Country Status (2)

Country Link
CN (1) CN113835611A (en)
WO (1) WO2021259321A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115277591B (en) * 2022-08-04 2023-11-07 深圳云豹智能有限公司 Message processing circuit, method, chip and computer equipment
CN117827703A (en) * 2022-09-29 2024-04-05 深圳市中兴微电子技术有限公司 Storage scheduling method, device, equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100188974A1 (en) * 2009-01-29 2010-07-29 Alcatel Lucent Implementation of internet protocol header compression with traffic management quality of service
CN103888377A (en) * 2014-03-28 2014-06-25 华为技术有限公司 Message cache method and device
CN108063653A (en) * 2016-11-08 2018-05-22 华为技术有限公司 A kind of delay control method, apparatus and system
CN109688070A (en) * 2018-12-13 2019-04-26 迈普通信技术股份有限公司 A kind of data dispatching method, the network equipment and retransmission unit
CN109729014A (en) * 2017-10-31 2019-05-07 深圳市中兴微电子技术有限公司 A kind of message storage method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100188974A1 (en) * 2009-01-29 2010-07-29 Alcatel Lucent Implementation of internet protocol header compression with traffic management quality of service
CN103888377A (en) * 2014-03-28 2014-06-25 华为技术有限公司 Message cache method and device
CN108063653A (en) * 2016-11-08 2018-05-22 华为技术有限公司 A kind of delay control method, apparatus and system
CN109729014A (en) * 2017-10-31 2019-05-07 深圳市中兴微电子技术有限公司 A kind of message storage method and device
CN109688070A (en) * 2018-12-13 2019-04-26 迈普通信技术股份有限公司 A kind of data dispatching method, the network equipment and retransmission unit

Also Published As

Publication number Publication date
CN113835611A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
US10705878B2 (en) Task allocating method and system capable of improving computational efficiency of a reconfigurable processing system
WO2021259321A1 (en) Storage scheduling method, device, and storage medium
KR101670642B1 (en) System and method for scheduling packet transmission on a client device
RU2487401C2 (en) Data processing method, router node and data medium
US8155134B2 (en) System-on-chip communication manager
US20140328172A1 (en) Congestion control and qos in noc by regulating the injection traffic
EP2702730A2 (en) Effective circuits in packet-switched networks
US10521258B2 (en) Managing test services in a distributed production service environment
CN113328944B (en) Flow table management method and device
CN113010297A (en) Database write scheduler based on message queue, write method and storage medium
RU2641250C2 (en) Device and method of queue management
CN111107012A (en) Multi-dimensional centralized flow control method and system
WO2019109902A1 (en) Queue scheduling method and apparatus, communication device, and storage medium
CN112148644A (en) Method, apparatus and computer program product for processing input/output requests
WO2021197128A1 (en) Traffic rate-limiting method and apparatus
CN113010464A (en) Data processing apparatus and device
US20190044872A1 (en) Technologies for targeted flow control recovery
CN112272933B (en) Queue control method, device and storage medium
CN114189477B (en) Message congestion control method and device
CN116414534A (en) Task scheduling method, device, integrated circuit, network equipment and storage medium
US20210135999A1 (en) Packet Control Method, Flow Table Update Method, and Node Device
CN114884823A (en) Flow congestion control method and device, computer readable medium and electronic equipment
EP3079314A1 (en) Method to manage resources, system and computer-readable medium
CN112367267A (en) Virtual machine management method and device
CN112073325B (en) Data congestion control and bandwidth estimation method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21828219

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16.05.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21828219

Country of ref document: EP

Kind code of ref document: A1