CN112835818A - Method for recovering address of buffer space of flow queue - Google Patents

Method for recovering address of buffer space of flow queue Download PDF

Info

Publication number
CN112835818A
CN112835818A CN202110135642.2A CN202110135642A CN112835818A CN 112835818 A CN112835818 A CN 112835818A CN 202110135642 A CN202110135642 A CN 202110135642A CN 112835818 A CN112835818 A CN 112835818A
Authority
CN
China
Prior art keywords
cache
aging
module
queue
message
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110135642.2A
Other languages
Chinese (zh)
Inventor
武斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xinhe Semiconductor Technology Wuxi Co Ltd
Original Assignee
Xinhe Semiconductor Technology Wuxi Co Ltd
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 Xinhe Semiconductor Technology Wuxi Co Ltd filed Critical Xinhe Semiconductor Technology Wuxi Co Ltd
Priority to CN202110135642.2A priority Critical patent/CN112835818A/en
Publication of CN112835818A publication Critical patent/CN112835818A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0871Allocation or management of cache space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0891Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using clearing, invalidating or resetting means

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method for recovering a buffer space address of a flow queue.A aging module is added on the basis of normal scheduling dequeuing so as to age a message stored in a buffer for the longest time; the aging method of the aging module comprises time-triggered aging, space-triggered aging and congestion-triggered aging; the aging module is used for serially connecting a double linked list by using an enqueue command address and storing corresponding queue information by using the command address; the aging module ages the enqueued nodes; the aging module can suggest and disassemble a doubly linked list. The invention can rapidly recover the buffer space occupied by the congestion flow without forcing the flow queue to empty to recover the buffer space; the method can improve the utilization efficiency of the buffer, reasonably abandon the congestion flow packets, release the buffer occupied by the congestion flow for a long time to be used by the normal flow, and avoid the flow interruption of the normal flow due to no buffer space.

Description

Method for recovering address of buffer space of flow queue
Technical Field
The invention relates to the technical field of buffer space release, in particular to a method for recovering addresses of buffer spaces of a flow queue.
Background
In a traffic management system, a flow queue (congested flow) which has been queued in a buffer space and cannot be dequeued for a long time occupies the buffer space for a long time. The buffer space can not be released for a long time, so that the utilization rate of the buffer space is reduced, the normal enqueuing of other queues is influenced, the non-congestion flow packet loss is generated, and the service quality of the system is reduced.
At present, methods for releasing the buffer space occupied by the congested flows include: once a congested flow is monitored, the flow is actively cleared. And secondly, scanning the cache queue in a fixed period, and actively aging the queue to generate dequeue scheduling if the queue is not dequeued in the scanning period. And thirdly, discarding the congestion flow in advance.
However, the above methods have the disadvantages of complex configuration, slow recovery of cache space, poor real-time performance and low cache utilization rate; and for congestion caused by long-time back pressure of an outlet and unavailable links, the buffer space occupied by the congested flow cannot be automatically recovered.
Disclosure of Invention
The invention aims to provide a method for recovering a buffer space address of a flow queue, which adds an aging dequeuing function on the basis of normal scheduling dequeuing, ages a message stored in a buffer for the longest time, and solves the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme:
a method for recovering address of buffer space in flow queue,
after a packet arrives at an enqueue module, firstly applying for an idle address from an idle pointer pool (cache space address management) to generate a packet enqueue command; and then writing the packet fragments into the applied cache space, maintaining the series connection relation of the queue chain table, and generating a packet enqueue descriptor to the queue scheduling module and the packet aging module.
The packet storage space receives a write-in command from the enqueue module and stores a packet; and receiving a read command from the dequeue module, and reading the return packet data.
The queue scheduling module combines the aging queues sent by the aging module according to scheduling strategies (RR scheduling and SP scheduling), comprehensively judges the dequeue of the scheduling queues, and responds to the outlet back pressure; and marking a discarding mark for dequeuing the aging queue.
The dequeue module receives dequeue queue number information from the queue scheduling module, maintains a queue chain table, generates a dequeue read cache command, reads data and completes dequeue operation; and sending the command address which is dequeued to the storage space address management module for recycling, and sending dequeue command information without discarding marks to the aging module for dequeue operation.
The aging module is responsible for carrying out sequencing management on addresses of the messages in the cache and judging whether the messages are discarded or not according to the cache depth and the time of the messages in the cache; when the cache depth exceeds a certain threshold value, or the storage time of the message in the cache exceeds a certain threshold value, the message is discarded.
The aging method comprises time trigger aging, space trigger aging and congestion trigger aging.
As a further scheme of the invention: the judgment of message discarding meets the following three conditions:
1. setting a caching Threshold value Threshold _ Depth by the caching Depth Buffer _ Depth >;
2. message storage time Tpacket>Setting a threshold Tdrop
3. The congestion status indication CNG _ State is received.
As a further scheme of the invention: three conditions can be selected by the register configuration as follows:
(1) any one is satisfied or discarded;
(2) any two are satisfied or discarded;
(3) all three are satisfied or discarded.
As a further scheme of the invention: the maintenance of the cache Depth (Sys _ Depth) is divided into a system level and a User level (User _ Depth); managing the use condition of the whole cache at a system level, wherein the entering or exiting cache of each message updates the depth of the cache at the system level; the user level depth is the cache amount occupied by counting a specific user, and the cache depth count of the user can be updated only when the message of the user enters or exits the cache; packet dropping enables richer policy configuration based on system-level and user-level cache depth statistics.
As a further scheme of the invention: message storage time (T)storage) Is calculated according to the current time (T)current) Minus the time (T) that the message enters the cacheinput) Calculating to obtain; maintain a 64bit system time (T) within the systemsystem) The format is the data format defined by the 1588 protocol.
As a further scheme of the invention: when each message enters the cache, the system time T at the moment can be determinedsystemAs TinputStored in a time stamp buffer, when stored togetherThe timestamp caches also have addresses for storing messages; when a message enters or exits the cache, the data in the timestamp cache and the current time T are triggeredcurrentAnd comparing, selecting the memory address with the largest difference, taking out the memory address of the corresponding message, sending the corresponding message address to the dequeue scheduling module, and discarding.
Compared with the prior art, the invention has the beneficial effects that:
1. the invention can quickly recover the buffer space occupied by the congestion flow without forcing the flow queue to empty to recover the buffer space.
2. The invention can improve the utilization efficiency of the buffer, reasonably abandon the congestion flow packets, release the buffer occupied by the congestion flow for a long time to be used by the normal flow, and avoid the flow interruption of the normal flow because of no buffer space.
Drawings
Fig. 1 is a flowchart of a method for recovering addresses in a buffer space of a stream queue.
Detailed Description
The technical solution of the present patent will be described in further detail with reference to the following embodiments.
Referring to fig. 1, a method for recovering addresses in a buffer space of a stream queue includes the following steps:
after the packet arrives at the enqueue module, an idle address is applied to the idle pointer pool to generate a packet enqueue command. And then writing the packet fragments into the applied cache space, and simultaneously maintaining the serial connection relation of the queue linked lists. Generating a packet enqueue descriptor to a queue scheduling module and a packet aging module;
the packet storage space receives a write command from the enqueue module and stores the packet. Receiving a read command from the dequeue module, and reading the return packet data;
and the queue scheduling module combines the aging queues sent by the aging module according to a scheduling strategy, comprehensively judges the dequeuing of the scheduling queues, and responds to the outlet back pressure. For dequeuing of the aging queue, marking a discard mark;
the dequeue module receives dequeue queue number information from the queue scheduling module, maintains a queue chain table, generates a dequeue read cache command, reads data and completes dequeue operation; and sending the command address which is dequeued to the storage space address management module for recycling. Meanwhile, dequeuing command information without discarding marks is sent to an aging module for dequeuing operation;
the aging module is responsible for carrying out sequencing management on addresses of the messages in the cache and judging whether the messages are discarded or not according to the cache depth and the time of the messages in the cache; when the cache depth exceeds a certain threshold value, or the storage time of the message in the cache exceeds a certain threshold value, the message is discarded.
The judgment of message discarding meets the following three conditions:
1. setting a caching Threshold value Threshold _ Depth by the caching Depth Buffer _ Depth >;
2. message storage time Tpacket>Setting a threshold Tdrop
3. Receiving a congestion State indication CNG _ State;
the three conditions described above can be selected by register configuration as follows:
1. any one is satisfied or discarded;
2. any two are satisfied or discarded;
3. all three are satisfied or discarded;
the maintenance of the cache Depth Sys _ Depth is divided into a system level and a User level User _ Depth, the system level manages the use condition of the whole cache, and the entering or exiting cache of each message updates the Depth of the system level cache; the user level depth is the cache amount occupied by counting a specific user, and the cache depth count of the user can be updated only when the message of the user enters or exits the cache; packet dropping enables richer policy configuration based on system-level and user-level cache depth statistics.
Message storage time (T)storage) Is calculated according to the current time (T)current) Minus the time (T) that the message enters the cacheinput) Calculating to obtain; maintain a 64bit system time (T) within the systemsystem) The format is a data format defined by 1588 protocol; when each message enters the cache, the system time T at the moment can be determinedsystemAs TinputStoring the address in a timestamp cache and storing the address in the timestamp cache and the address in which the message is stored; when a message enters or exits the cache, the data in the timestamp cache and the current time T are triggeredcurrentAnd comparing, selecting the memory address with the largest difference, taking out the memory address of the corresponding message, sending the corresponding message address to the dequeue scheduling module, and discarding.
Although the preferred embodiments of the present patent have been described in detail, the present patent is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present patent within the knowledge of those skilled in the art.

Claims (7)

1. A method for recovering the address of buffer memory space in flow queue includes normal scheduling dequeue, and is characterized in that an aging module is added on the basis of normal scheduling dequeue to age the message stored in buffer memory for the longest time;
the aging method of the aging module comprises time-triggered aging, space-triggered aging and congestion-triggered aging;
the aging module is used for serially connecting a double linked list by using an enqueue command address and storing corresponding queue information by using the command address;
the aging module ages the enqueued nodes;
the aging module can suggest and disassemble a doubly linked list.
2. The method for recovering the address of the buffer space of the stream queue according to claim 1, wherein the specific process is as follows:
after the packet arrives at the enqueue module, firstly applying for an idle address from the idle pointer pool to generate a packet enqueue command; then writing the package fragments into the applied cache space, maintaining the serial connection relation of the queue chain table, and generating a package enqueue descriptor to a queue scheduling module and a package aging module;
the packet storage space receives a write-in command from the enqueue module and stores a packet; receiving a read command from the dequeue module, and reading the return packet data;
the queue scheduling module combines the aging queues sent by the aging module according to a scheduling strategy, comprehensively judges the dequeuing of the scheduling queues, and simultaneously responds to the back pressure of an outlet; for dequeuing of the aging queue, marking a discard mark;
the dequeue module receives dequeue queue number information from the queue scheduling module, maintains a queue chain table, generates a dequeue read cache command, reads data and completes dequeue operation; sending the command address which is dequeued to a storage space address management module for recycling, and sending dequeue command information without discarding marks to an aging module for dequeue operation;
the aging module is responsible for carrying out sequencing management on addresses of the messages in the cache and judging whether the messages are discarded or not according to the cache depth and the time of the messages in the cache; when the cache depth exceeds a certain threshold value, or the storage time of the message in the cache exceeds a certain threshold value, the message is discarded.
3. The method according to claim 2, wherein the judgment of the packet discarding satisfies the following three conditions:
(1) setting a caching Threshold value Threshold _ Depth by the caching Depth Buffer _ Depth >;
(2) message storage time Tpacket>Setting a threshold Tdrop
(3) The congestion status indication CNG _ State is received.
4. The method as claimed in claim 3, wherein the three conditions are selected by register configuration according to the following discarding strategy
(1) Any one is satisfied or discarded;
(2) any two are satisfied or discarded;
(3) all three are satisfied or discarded.
5. The method according to claim 3, wherein the cache depth is maintained at a system level and a user level; managing the use condition of the whole cache at a system level, wherein the entering or exiting cache of each message updates the depth of the cache at the system level; the user level depth is the cache amount occupied by counting a specific user, and the cache depth count of the user can be updated only when the message of the user enters or exits the cache; packet dropping enables richer policy configuration based on system-level and user-level cache depth statistics.
6. The method according to claim 3, wherein the calculation of the message storage time is calculated by subtracting the time of the message entering the buffer from the current time.
7. The method according to any of claims 1-6, wherein each packet enters the buffer memory, and the system time T at that moment is determined by the buffer memory address recoverysystemTime T as message entering cacheinputStoring the messages in a timestamp cache, and simultaneously storing addresses stored in the messages in the timestamp cache; when a message enters or exits the cache, the data in the timestamp cache and the current time T are triggeredcurrentAnd comparing, selecting the memory address with the largest difference, taking out the memory address of the corresponding message, sending the corresponding message address to the dequeue scheduling module, and discarding.
CN202110135642.2A 2021-02-01 2021-02-01 Method for recovering address of buffer space of flow queue Pending CN112835818A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110135642.2A CN112835818A (en) 2021-02-01 2021-02-01 Method for recovering address of buffer space of flow queue

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110135642.2A CN112835818A (en) 2021-02-01 2021-02-01 Method for recovering address of buffer space of flow queue

Publications (1)

Publication Number Publication Date
CN112835818A true CN112835818A (en) 2021-05-25

Family

ID=75931265

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110135642.2A Pending CN112835818A (en) 2021-02-01 2021-02-01 Method for recovering address of buffer space of flow queue

Country Status (1)

Country Link
CN (1) CN112835818A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968893A (en) * 2022-07-27 2022-08-30 井芯微电子技术(天津)有限公司 PCIe message queue scheduling method, system and device based on timestamp
CN117931088A (en) * 2024-02-02 2024-04-26 重庆赛力斯凤凰智创科技有限公司 Vehicle-end data processing method and device, electronic equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002019637A1 (en) * 2000-08-28 2002-03-07 Entridia Corporation Method and apparatus for queue administration in a packet processing device
CN102209016A (en) * 2010-03-29 2011-10-05 成都市华为赛门铁克科技有限公司 Data processing method, device and data processing system
CN102447610A (en) * 2010-10-14 2012-05-09 中兴通讯股份有限公司 Method and device for realizing message buffer resource sharing
CN104426796A (en) * 2013-08-21 2015-03-18 中兴通讯股份有限公司 Congestion avoiding method and apparatus of router
CN105610725A (en) * 2016-01-11 2016-05-25 盛科网络(苏州)有限公司 Dynamic queue congestion aging management method and device
CN110011924A (en) * 2018-01-04 2019-07-12 深圳市中兴微电子技术有限公司 A kind of method and apparatus for removing cache congestion

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002019637A1 (en) * 2000-08-28 2002-03-07 Entridia Corporation Method and apparatus for queue administration in a packet processing device
CN102209016A (en) * 2010-03-29 2011-10-05 成都市华为赛门铁克科技有限公司 Data processing method, device and data processing system
CN102447610A (en) * 2010-10-14 2012-05-09 中兴通讯股份有限公司 Method and device for realizing message buffer resource sharing
CN104426796A (en) * 2013-08-21 2015-03-18 中兴通讯股份有限公司 Congestion avoiding method and apparatus of router
CN105610725A (en) * 2016-01-11 2016-05-25 盛科网络(苏州)有限公司 Dynamic queue congestion aging management method and device
CN110011924A (en) * 2018-01-04 2019-07-12 深圳市中兴微电子技术有限公司 A kind of method and apparatus for removing cache congestion

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968893A (en) * 2022-07-27 2022-08-30 井芯微电子技术(天津)有限公司 PCIe message queue scheduling method, system and device based on timestamp
CN114968893B (en) * 2022-07-27 2022-09-30 井芯微电子技术(天津)有限公司 PCIe message queue scheduling method, system and device based on timestamp
CN117931088A (en) * 2024-02-02 2024-04-26 重庆赛力斯凤凰智创科技有限公司 Vehicle-end data processing method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN109479032B (en) Congestion avoidance in network devices
EP2736197B1 (en) Packet reassembly and resequence method, apparatus and system
US20050147032A1 (en) Apportionment of traffic management functions between devices in packet-based communication networks
CN100405344C (en) Apparatus and method for distributing buffer status information in a switching fabric
CN101977162B (en) Load balancing method of high-speed network
US12101260B1 (en) Multi-destination traffic handling optimizations in a network device
CN116671081B (en) Delay-based automatic queue management and tail drop
CN112835818A (en) Method for recovering address of buffer space of flow queue
WO2022016889A1 (en) Congestion control method and device
CN114531488B (en) High-efficiency cache management system for Ethernet switch
CN101356777B (en) Managing on-chip queues in switched fabric networks
JP3687501B2 (en) Transmission queue management system and management method for packet switch
CN102035719A (en) Method and device for processing message
US6982986B2 (en) QoS scheduler and method for implementing quality of service anticipating the end of a chain of flows
JP2002281080A (en) Packet switch device and multicast transmitting method
US20030179706A1 (en) Network processor having fast flow queue disable process
JP2000124953A (en) Buffer control method and buffer controller
CN101465794B (en) Method and apparatus for scheduling packet
CN110011924B (en) Method and device for clearing cache congestion
CN113572655B (en) Congestion detection method and system for non-lost network
CN111865813B (en) Data center network transmission control method and system based on anti-ECN mark and readable storage medium
US6973036B2 (en) QoS scheduler and method for implementing peak service distance using next peak service time violated indication
CN117395207A (en) Fine granularity flow control method for lossless network
WO2011144157A1 (en) Data transmission method, apparatus and system
US7103051B2 (en) QoS scheduler and method for implementing quality of service with aging time stamps

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210525