CN107347039A - A kind of management method and device in shared buffer memory space - Google Patents
A kind of management method and device in shared buffer memory space Download PDFInfo
- Publication number
- CN107347039A CN107347039A CN201610296638.3A CN201610296638A CN107347039A CN 107347039 A CN107347039 A CN 107347039A CN 201610296638 A CN201610296638 A CN 201610296638A CN 107347039 A CN107347039 A CN 107347039A
- Authority
- CN
- China
- Prior art keywords
- queue
- buffer memory
- shared buffer
- memory space
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
The invention discloses a kind of management method and device in shared buffer memory space, methods described includes:Enqueue request based on message determines queue of being joined the team corresponding to the message;Obtain the space hold situation of shared buffer memory capacity-threshold waterline corresponding to the queue and current shared spatial cache;Space hold situation based on shared buffer memory capacity-threshold waterline corresponding to the queue and current shared spatial cache, judges whether the message meets the first caching condition;When the message meets the first caching condition, the shared buffer memory space hold estimated value of the queue is obtained;Shared buffer memory space hold estimated value based on the queue judges whether the message meets the second caching condition, and determines whether to cache the message to the shared buffer memory space according to judged result.
Description
Technical field
The present invention relates to communication technical field, more particularly to a kind of management method and device in shared buffer memory space.
Background technology
Shared buffer memory is a kind of common resource allocation strategy of network communication field, and multiple queue sharing cachings are empty
Between, such a shared buffer memory method can preferably save the space that storage needs when queue is more.However,
There is the problem of queue is seized in shared buffer memory space, the larger queue of flow can fairly frequently access shared slow
Deposit, so as to largely tie up shared buffer memory space, this can cause other queues to be stored without space and packet loss occur
Phenomenon.
In summary, there is provided a kind of Managed Solution in shared buffer memory space, can reasonably carry out shared buffer memory
The distribution in space, improve the utilization rate in shared buffer memory space, it has also become urgent problem to be solved.
The content of the invention
The embodiment of the present invention provides a kind of management method and device in shared buffer memory space, solve at least existing
Problem present in technology, the distribution in shared buffer memory space can be reasonably carried out, improve shared buffer memory space
Utilization rate.
What the technical scheme of the embodiment of the present invention was realized in:
The embodiments of the invention provide a kind of management method in shared buffer memory space, methods described includes:
Enqueue request based on message determines queue of being joined the team corresponding to the message;
The space of shared buffer memory capacity-threshold waterline and current shared spatial cache corresponding to the queue is obtained to account for
Use situation;
Accounted for based on the space of shared buffer memory capacity-threshold waterline and current shared spatial cache corresponding to the queue
With situation, judge whether the message meets the first caching condition;
When the message meets the first caching condition, the shared buffer memory space hold estimation of the queue is obtained
Value;
Shared buffer memory space hold estimated value based on the queue judges whether the message meets the second caching
Condition, and determine whether to cache the message to the shared buffer memory space according to judged result.
In such scheme, shared buffer memory capacity-threshold waterline corresponding to the acquisition queue, including:
The precedence information of the queue is obtained, and the priority based on the queue obtains and the queue
Shared buffer memory capacity-threshold waterline corresponding to priority.
It is described to be based on shared buffer memory capacity-threshold waterline and current shared corresponding to the queue in such scheme
The space hold situation of spatial cache, judges whether the message meets the first caching condition, including:
Accounted for based on the space of shared buffer memory capacity-threshold waterline and current shared spatial cache corresponding to the queue
With situation, judge whether the space hold value of current shared spatial cache is less than the maximum in shared buffer memory space,
And the space hold value of current shared spatial cache is less than shared buffer memory capacity-threshold water corresponding to the queue
Line, if it is, determining that the message meets the first caching condition;Otherwise, it determines the message does not meet
One caching condition.
In such scheme, the shared buffer memory space hold estimated value for obtaining the queue, including:
The number of current first activation queue and the shared buffer memory space hold value that the queue is current are obtained, and
The expection of the queue after the message is joined the team is worth to based on the current shared buffer memory space hold of the queue
Shared buffer memory space hold value;
Expection shared buffer memory space based on the current shared buffer memory space hold value of the queue, the queue
The space hold value of occupation value, the number of current first activation queue and current shared spatial cache, it is determined that
The shared buffer memory space hold estimated value of the queue.
In such scheme, the shared buffer memory space hold estimated value based on the queue judges the message
Whether second caching condition is met, including:
Judge whether the shared buffer memory space hold estimated value of the queue is shared no more than corresponding to the queue
Spatial cache threshold value waterline, if it is, determining that the message meets the second caching condition;Otherwise, it determines institute
State message and do not meet the second caching condition.
The embodiment of the present invention additionally provides a kind of managing device in shared buffer memory space, and described device includes:Really
Cover half block, the first acquisition module, the first judge module, the second acquisition module and the second judge module;Wherein,
The determining module, queue of being joined the team corresponding to the message is determined for the enqueue request based on message;
First acquisition module, for obtaining shared buffer memory capacity-threshold waterline corresponding to the queue and working as
The space hold situation in preceding shared buffer memory space;
First judge module, for based on shared buffer memory capacity-threshold waterline corresponding to the queue and work as
The space hold situation in preceding shared buffer memory space, judge whether the message meets the first caching condition, and
The message triggers the second acquisition module when meeting the first caching condition;
Second acquisition module, for when the message meets the first caching condition, obtaining the queue
Shared buffer memory space hold estimated value;
Second judge module, judge institute for the shared buffer memory space hold estimated value based on the queue
State message and whether meet the second caching condition, and determine whether to cache the message to described according to judged result
Shared buffer memory space.
In such scheme, first acquisition module, it is additionally operable to obtain the precedence information of the queue, and
Priority based on the queue obtains shared buffer memory capacity-threshold water corresponding with the priority of the queue
Line.
In such scheme, first judge module, it is additionally operable to be based on shared buffer memory sky corresponding to the queue
Between the space hold situation of threshold value waterline and current shared spatial cache, judge the sky of current shared spatial cache
Between occupation value whether be less than the maximum in shared buffer memory space, and the space hold value of current shared spatial cache
Less than shared buffer memory capacity-threshold waterline corresponding to the queue, if it is, determining that the message meets first
Caching condition;Otherwise, it determines the message does not meet the first caching condition.
In such scheme, second acquisition module, be additionally operable to obtain current first activation queue number and
The current shared buffer memory space hold value of the queue, and accounted for based on the current shared buffer memory space of the queue
With the expection shared buffer memory space hold value for being worth to the queue after the message is joined the team;
Expection shared buffer memory space based on the current shared buffer memory space hold value of the queue, the queue
The space hold value of occupation value, the number of current first activation queue and current shared spatial cache, it is determined that
The shared buffer memory space hold estimated value of the queue.
In such scheme, second judge module, it is additionally operable to judge that the shared buffer memory space of the queue accounts for
Whether it is not more than shared buffer memory capacity-threshold waterline corresponding to the queue with estimated value, if it is, determining institute
State message and meet the second caching condition;Otherwise, it determines the message does not meet the second caching condition.
Using the management method and device in the above-mentioned shared buffer memory space of the present invention, first, second cache bar is set
Part, accounted for by obtaining the space of shared buffer memory capacity-threshold waterline and current shared spatial cache corresponding to queue
Determine to join the team in the case that message meets the first caching condition with situation, further calculate the shared of the queue
Spatial cache takes estimated value, and then judges whether the message meets the second caching condition, and according to judgement
As a result determine whether to cache the message to the shared buffer memory space;In this way, it is based on joining the team corresponding to queue
Shared buffer memory capacity-threshold waterline, current shared spatial cache space hold situation, be calculated it is described
The information such as the shared buffer memory space hold estimated value of queue determine whether to cache the message to shared buffer memory sky
Between, the reasonable distribution to shared buffer memory space is realized, improves the utilization rate in shared buffer memory space.
Brief description of the drawings
Fig. 1 is the management method schematic flow sheet one in shared buffer memory space in the embodiment of the present invention;
Fig. 2 is the managing device block diagram in shared buffer memory space in the embodiment of the present invention;
Fig. 3 is the management method schematic flow sheet two in shared buffer memory space in the embodiment of the present invention;
Fig. 4 is the management method schematic flow sheet three in shared buffer memory space in the embodiment of the present invention;
Fig. 5 is that the managing device in shared buffer memory space in the embodiment of the present invention forms structural representation.
Embodiment
The present invention is described in further detail with specific embodiment below in conjunction with the accompanying drawings.
Embodiment one
Fig. 1 is the management method schematic flow sheet in shared buffer memory space in the embodiment of the present invention, as shown in figure 1,
The management method in shared buffer memory space includes in the embodiment of the present invention:
Step 101:Enqueue request based on message determines queue of being joined the team corresponding to the message.
Here, the enqueue request of message is received, and the message can be obtained by the enqueue request of analytic message
The queue number information of corresponding queue of joining the team.
Step 102:Obtain shared buffer memory capacity-threshold waterline corresponding to the queue and current shared caching is empty
Between space hold situation.
Here, when actually implementing, before this step, methods described can also include:Each queue is set
Corresponding shared buffer memory capacity-threshold waterline, namely the shared buffer memory capacity-threshold waterline that each queue can take;
The setting can be configured according to being actually needed, therefore the queue configuration information by reading the queue can
Shared buffer memory capacity-threshold waterline corresponding to the queue pre-set.
The actual value in the shared buffer memory space that each queue by reading record takes, can obtain current shared
The actual occupation value of spatial cache.
Based on embodiment of the present invention, the device of the Managed Solution in shared buffer memory space in the embodiment of the present invention
Block diagram may be configured as shown in Fig. 2, including:202 first configuration modules, it can be accounted for for configuring each queue
Spatial cache, read the spatial cache that each queue has currently taken;203 logging modles (cnt_ram,
Count ram), for recording the actual spatial cache taken of each queue;204 second configuration modules
(cfg_ram, that is, configuring ram), for configure communal space threshold values waterline that each queue can take and
Exclusively enjoy space;205 control modules, for handling the application of joining the team of message.
Step 103:It is empty based on shared buffer memory capacity-threshold waterline corresponding to the queue and current shared caching
Between space hold situation, judge whether the message meets the first caching condition.
When actually implementing, the first caching condition is pre-set, for judging that current shared buffer memory takes feelings
Whether condition allows new message to enter, such as:The first caching condition is set to be:The sky of current shared spatial cache
Between occupation value be less than the maximum in shared buffer memory space, and the space hold value of current shared spatial cache is less than
Shared buffer memory capacity-threshold waterline corresponding to the queue;It is if the first caching condition is unsatisfactory for, i.e., current
Shared buffer memory take do not allow new message to enter, that is, abandon the message;If above-mentioned first caching condition obtains
To when meeting, follow-up process is carried out.
Step 104:When the message meets the first caching condition, the shared buffer memory for obtaining the queue is empty
Between take estimated value.
Here, the shared buffer memory space hold estimated value of queue, the queue justice for being characterized in equal priority account for
In the case of shared buffer memory space, the estimated value in the shared buffer memory space that the queue can take;That is, such as
Some current priority of fruit is with the presence of two or more queue shared buffer memory occupancy, then all this is preferential
The shared buffer memory space that the priority can take is divided in the queue of level equally.
, can be based on the queue current shared buffer memory space hold value, the queue when actually implementing
It is expected that shared buffer memory space hold value, the number and current shared spatial cache of current first activation queue
Space hold value, determine the shared buffer memory space hold estimated value of the queue;Wherein, first activation
Queue refers to activates queue with the queue priority identical.
Step 105:Shared buffer memory space hold estimated value based on the queue judges whether the message accords with
The second caching condition is closed, and determines whether to cache the message to the shared buffer memory space according to judged result.
Here it is possible to the second caching condition is pre-set, to further determine whether to allow the message to join the team,
Into the shared buffer memory space, such as:The shared buffer memory space for setting the second caching condition to be the queue accounts for
It is not more than shared buffer memory capacity-threshold waterline corresponding to the queue with estimated value;If by judging, above-mentioned the
Two caching conditions are unmet, and can determine that does not allow the message to join the team, i.e., does not allow the message to enter
Shared buffer memory space, and if the second caching condition is met, you can cache the message enter it is shared
Spatial cache.
Using the above embodiment of the present invention, by obtaining shared buffer memory capacity-threshold waterline corresponding to queue and working as
The space hold situation in preceding shared buffer memory space determines to join the team in the case that message meets the first caching condition, enters
One step calculates the shared buffer memory space hold estimated value of the queue, and then judges whether the message meets the
Two caching conditions, and determine whether to cache the message to the shared buffer memory space according to judged result;Such as
This, the space based on shared buffer memory capacity-threshold waterline corresponding to queue of joining the team, current shared spatial cache accounts for
Determine whether to cache with situation, the information such as shared buffer memory space hold estimated value for the queue being calculated
The message realizes the reasonable distribution to shared buffer memory space, improved shared slow to shared buffer memory space
Deposit the utilization rate in space.
Embodiment two
Fig. 3 is the management method schematic flow sheet in shared buffer memory space in the embodiment of the present invention, as shown in figure 3,
The management method in shared buffer memory space includes in the embodiment of the present invention:
Step 301:The enqueue request of message is received, and determines that the message is corresponding based on the enqueue request
Queue of joining the team.
Here, the queue number for queue of being joined the team corresponding to the message can be obtained by the enqueue request of analytic message
Information, that is, determine queue of being joined the team corresponding to the message.
Step 302:Obtain shared buffer memory capacity-threshold waterline and current shared caching that the queue can take
The space hold value in space.
When actually implementing, the shared buffer memory capacity-threshold waterline that each queue can take can be pre-set, is had
Body can be configured when setting according to the priority of each queue, and what the queue of usual high priority can take is total to
The shared buffer memory capacity-threshold waterline that queue of the spatial cache threshold value waterline not less than low priority can take is enjoyed,
In this way, the data message of this priority query, can take priority and be less than the rcv-queue threshold waterline area of oneself
Shared buffer memory space, but it is shared slow higher than the rcv-queue threshold waterline area of oneself to take priority
Space is deposited, realizes that the communal space takes and distinguishes priority;Such as:Setting a queue to correspond to priority can account for
Communal space threshold values waterline is Cfg_share_thr_prix;
Accordingly, this step specifically includes:Obtain the precedence information of the queue pre-set, and base
Shared buffer memory capacity-threshold waterline corresponding with the priority of the queue is obtained in the priority of the queue;
And the actual value in the shared buffer memory space that each queue by reading record takes, it can obtain current common
Enjoy the actual occupation value of spatial cache.
Step 303:Judge whether the space hold value of current shared spatial cache is less than shared buffer memory space
Maximum, and the space hold value of current shared spatial cache is less than the shared buffer memory sky that the queue can take
Between threshold value waterline, if it is, perform step 304;Otherwise, step 307 is performed.
Here, when the maximum in shared buffer memory space refers to current shared caching without taking, shared buffer memory is empty
Between be worth;In actual applications, the maximum in the shared buffer memory space can be represented with Max_share_size, when
The space hold value in preceding shared buffer memory space can be represented with All_ocp_share_size;
That is, this step operation is actually to judge All_ocp_share_size < Max_share_size, and
Whether All_ocp_share_size < Cfg_share_thr_prix set up.
Step 304:Obtain the shared buffer memory space hold estimated value of the queue.
Here, the shared buffer memory space hold estimated value of queue, the queue justice for being characterized in equal priority account for
In the case of shared buffer memory space, the estimated value in the shared buffer memory space that the queue can take;That is, such as
Some current priority of fruit is with the presence of two or more queue shared buffer memory occupancy, then all this is preferential
The shared buffer memory space that the priority can take is divided in the queue of level equally.
When actually implementing, the expection shared buffer memory space hold of the queue after the message is joined the team can be obtained
Value, and it is empty based on the current shared buffer memory space hold value of the queue, the expection shared buffer memory of the queue
Between occupation value, it is current first activation queue number and current shared spatial cache space hold value, really
The shared buffer memory space hold estimated value of the fixed queue;Wherein, the first activation queue refers to and the team
Row priority identical activates queue, i.e., priority is identical with presently described queue, and is deposited in shared buffer memory
In the queue of occupancy;The number of current first activation queue can use active_share_que_num_prix tables
Show, such as:Except existing and the queue two of the queue priority, then active_share_que_num_prix=3,
The expection shared buffer memory space hold value of the queue is represented using New_ocp_share_size_tmp, described
The current shared buffer memory space hold value of queue can use Ocp_share_size_quex to represent, the queue
Shared buffer memory space hold estimated value can use Req_estimate_tmp to represent;
Specifically, the expection that shared buffer memory space hold estimated value=queue of the queue can be set is shared
The number of the current first activation queues of spatial cache occupation value *+(the space hold value of current shared spatial cache-
The current shared buffer memory space hold value of the queue);I.e.:
Req_estimate_tmp=New_ocp_share_size_tmp*active_share_que _ num_prix+
(All_ocp_share_size-Ocp_share_size_quex);
When actually implementing, the expection shared buffer memory space hold value of message queue after joining the team can be by
The length of the message and the current shared buffer memory space hold of the queue are worth to, and make the length of the message
Spend and represented with pkt_len, then New_ocp_share_size_tmp=pkt_len+Ocp_share_size_quex.
Step 305:Judge whether the shared buffer memory space hold estimated value of the queue is not more than the queue
The shared buffer memory capacity-threshold waterline that can be taken, if it is, performing step 306;Otherwise, step 307 is performed.
Here, it is generally high because shared buffer memory capacity-threshold waterline corresponding to the queue of different priorities is different
The shared buffer memory capacity-threshold waterline that the queue of priority can take is higher, therefore, this priority query it is new
Enter packet, the communal space that priority is less than the rcv-queue threshold waterline area of oneself can be taken, but can not
To take the communal space that priority is higher than the rcv-queue threshold waterline area of oneself, using the present embodiment, realize
Shared buffer memory space hold distinguishes priority, and the high queue sharing space of usual priority can take threshold values waterline
The queue sharing space low more than priority can take threshold values waterline, can be as needed, flexible configuration, carry
The high utilization rate of shared buffer memory.
Step 306:The message is cached to the shared buffer memory space, and updates the shared slow of the queue
Occupancy is deposited, performs step 308.
Here, the shared buffer memory of the queue after renewal takes empty equal to the expection shared buffer memory of the queue
Between occupation value, i.e.,:pkt_len+Ocp_share_size_quex;
Accordingly, the space hold value in presently described shared buffer memory space can also be updated, i.e.,:
All_ocp_share_size+pkt_len。
Step 307:Abandon the message.
Step 308:Terminate this handling process.
Embodiment three
Fig. 4 is the management method schematic flow sheet in shared buffer memory space in the embodiment of the present invention, as shown in figure 4,
The management method in shared buffer memory space includes in the embodiment of the present invention:
Step 401:Obtain the current shared buffer memory of a queue and take Ocp_share_size_quex.
Step 402:The message for receiving the queue enters application, and the message length is pkt_len.
Step 403:Read current queue configuration information cfg_ram and the shared buffer memory occupied information of queue
cnt_ram。
Here, queue configuration information cfg_ram includes the communal space threshold values waterline that each queue can take
With exclusively enjoy spatial information, the reality that the shared buffer memory occupied information cnt_ram of queue includes each queue is shared
Cache occupation value.
Step 404:Obtain Cfg_share_thr_prix, Ocp_share_size_quex and Max_share_size.
Here, Cfg_share_thr_prix represents that the queue corresponds to the communal space valve that priority can take
It is worth waterline, Ocp_share_size_quex represents the current shared buffer memory space hold value of the queue,
Max_share_size represents the maximum in shared buffer memory space.
Step 405:Judge whether
All_ocp_share_size < Max_share_size and All_ocp_share_size <
Cfg_share_thr_prix, if it is, performing step 406;Otherwise, step 410 is performed.
Step 406:Obtain New_ocp_share_size_tmp=pkt_len+Ocp_share_size_quex.
Here, New_ocp_share_size_tmp represents the expection shared buffer memory space hold value of the queue.
Step 407:Obtain
Req_estimate_tmp=New_ocp_share_size_tmp*active_share_que _ num_prix+
(All_ocp_share_size-Ocp_share_size_quex)。
Here, Req_estimate_tmp represents the shared buffer memory space hold estimated value of the queue,
Active_share_que_num_prix represents the number with queue priority identical activation queue,
All_ocp_share_size represents the space hold value of current shared spatial cache.
Step 408:Judge whether Req_estimate_tmp≤Cfg_share_thr_prix, if it is, performing
Step 409;Otherwise 410 are performed.
Step 409:By the packet buffer to shared buffer memory space, and update the shared buffer memory of the queue
Take.
Step 410:Abandon the message.
Example IV
Fig. 5 is that the managing device in shared buffer memory space in the embodiment of the present invention forms structural representation, such as Fig. 5
Shown, the managing device composition in shared buffer memory space includes in the embodiment of the present invention:Determining module 51, first
Acquisition module 52, the first judge module 53, the second acquisition module 54 and the second judge module 55;Wherein,
The determining module 51, the team that joined the team corresponding to the message is determined for the enqueue request based on message
Row;
First acquisition module 52, for obtain shared buffer memory capacity-threshold waterline corresponding to the queue and
The space hold situation of current shared spatial cache;
First judge module 53, for based on shared buffer memory capacity-threshold waterline corresponding to the queue and
The space hold situation of current shared spatial cache, judges whether the message meets the first caching condition, and
The second acquisition module 54 is triggered when the message meets the first caching condition;
Second acquisition module 54, for when the message meets the first caching condition, obtaining the team
The shared buffer memory space hold estimated value of row;
Second judge module 55, judge for the shared buffer memory space hold estimated value based on the queue
Whether the message meets the second caching condition, and determines whether to cache the message to institute according to judged result
State shared buffer memory space.
In one embodiment, first acquisition module 52, it is additionally operable to obtain the precedence information of the queue,
And the priority based on the queue obtains shared buffer memory capacity-threshold water corresponding with the priority of the queue
Line.
In one embodiment, first judge module 53, it is additionally operable to slow based on being shared corresponding to the queue
The space hold situation of capacity-threshold waterline and current shared spatial cache is deposited, judges current shared spatial cache
Space hold value whether be less than the maximum in shared buffer memory space, and the space of current shared spatial cache accounts for
It is less than shared buffer memory capacity-threshold waterline corresponding to the queue with value, if it is, determining that the message meets
First caching condition;Otherwise, it determines the message does not meet the first caching condition.
In one embodiment, second acquisition module 54, it is additionally operable to obtain the number of current first activation queue
Mesh and the current shared buffer memory space hold value of the queue, and it is empty based on the current shared buffer memory of the queue
Between take and be worth to the expection shared buffer memory space hold value of the queue after the message is joined the team;
Expection shared buffer memory space based on the current shared buffer memory space hold value of the queue, the queue
The space hold value of occupation value, the number of current first activation queue and current shared spatial cache, it is determined that
The shared buffer memory space hold estimated value of the queue.
In one embodiment, second judge module 55, it is additionally operable to judge that the shared buffer memory of the queue is empty
Between take estimated value whether be not more than shared buffer memory capacity-threshold waterline corresponding to the queue, if it is, really
The fixed message meets the second caching condition;Otherwise, it determines the message does not meet the second caching condition.
In one embodiment, described device can also include:Setup module 56, for based on each queue
The information such as the shared buffer memory capacity-threshold waterline that each queue of priority setting can take.
In embodiments of the present invention, the determining module 51, first in the managing device in the shared buffer memory space
Acquisition module 52, the first judge module 53, the second acquisition module 54, the second judge module 55 and setting mould
Block 56, it can be believed by the central processing unit (CPU, Central Processing Unit) in terminal or numeral
Number processor (DSP, Digital Signal Processor) or field programmable gate array (FPGA, Field
Programmable Gate Array) or integrated circuit (ASIC, Application Specific Integrated
Circuit) realize.
It need to be noted that be:Above is referred to the description of device, be with above method description it is similar, together
The beneficial effect description of method, is not repeated.For the technology not disclosed in device embodiment of the present invention
Details, it refer to the description of the inventive method embodiment.
It will be appreciated by those skilled in the art that:Realize that all or part of step of above method embodiment can be with
Completed by the related hardware of programmed instruction, foregoing program can be stored in a computer-readable storage
In medium, the program upon execution, execution the step of including above method embodiment;And foregoing storage is situated between
Matter includes:Movable storage device, random access memory (RAM, Random Access Memory),
Read-only storage (ROM, Read-Only Memory), magnetic disc or CD etc. are various can be with storage program
The medium of code.
Or if the above-mentioned integrated unit of the present invention is realized in the form of software function module and as independently
Production marketing or in use, can also be stored in a computer read/write memory medium.Based on so
Understanding, the part that the technical scheme of the embodiment of the present invention substantially contributes to correlation technique in other words can
To be embodied in the form of software product, the computer software product is stored in a storage medium, bag
Some instructions are included to so that a computer equipment (can be personal computer, server or network
Equipment etc.) perform all or part of each embodiment methods described of the present invention.And foregoing storage medium bag
Include:Movable storage device, RAM, ROM, magnetic disc or CD etc. are various can be with Jie of store program codes
Matter.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited to
This, any one skilled in the art the invention discloses technical scope in, can readily occur in
Change or replacement, it should all be included within the scope of the present invention.Therefore, protection scope of the present invention should
It is defined by the scope of the claims.
Claims (10)
1. a kind of management method in shared buffer memory space, it is characterised in that methods described includes:
Enqueue request based on message determines queue of being joined the team corresponding to the message;
The space of shared buffer memory capacity-threshold waterline and current shared spatial cache corresponding to the queue is obtained to account for
Use situation;
Accounted for based on the space of shared buffer memory capacity-threshold waterline and current shared spatial cache corresponding to the queue
With situation, judge whether the message meets the first caching condition;
When the message meets the first caching condition, the shared buffer memory space hold estimation of the queue is obtained
Value;
Shared buffer memory space hold estimated value based on the queue judges whether the message meets the second caching
Condition, and determine whether to cache the message to the shared buffer memory space according to judged result.
2. according to the method for claim 1, it is characterised in that described to obtain corresponding to the queue altogether
Spatial cache threshold value waterline is enjoyed, including:
The precedence information of the queue is obtained, and the priority based on the queue obtains and the queue
Shared buffer memory capacity-threshold waterline corresponding to priority.
3. method according to claim 1 or 2, it is characterised in that described corresponding based on the queue
Shared buffer memory capacity-threshold waterline and current shared spatial cache space hold situation, judge the message
Whether first caching condition is met, including:
Accounted for based on the space of shared buffer memory capacity-threshold waterline and current shared spatial cache corresponding to the queue
With situation, judge whether the space hold value of current shared spatial cache is less than the maximum in shared buffer memory space,
And the space hold value of current shared spatial cache is less than shared buffer memory capacity-threshold water corresponding to the queue
Line, if it is, determining that the message meets the first caching condition;Otherwise, it determines the message does not meet
One caching condition.
4. method according to claim 1 or 2, it is characterised in that described to obtain being total to for the queue
Enjoy spatial cache and take estimated value, including:
The number of current first activation queue and the shared buffer memory space hold value that the queue is current are obtained, and
The expection of the queue after the message is joined the team is worth to based on the current shared buffer memory space hold of the queue
Shared buffer memory space hold value;
Expection shared buffer memory space based on the current shared buffer memory space hold value of the queue, the queue
The space hold value of occupation value, the number of current first activation queue and current shared spatial cache, it is determined that
The shared buffer memory space hold estimated value of the queue.
5. method according to claim 1 or 2, it is characterised in that being total to based on the queue
Enjoy spatial cache occupancy estimated value and judge whether the message meets the second caching condition, including:
Judge whether the shared buffer memory space hold estimated value of the queue is shared no more than corresponding to the queue
Spatial cache threshold value waterline, if it is, determining that the message meets the second caching condition;Otherwise, it determines institute
State message and do not meet the second caching condition.
6. a kind of managing device in shared buffer memory space, it is characterised in that described device includes:Determining module,
First acquisition module, the first judge module, the second acquisition module and the second judge module;Wherein,
The determining module, queue of being joined the team corresponding to the message is determined for the enqueue request based on message;
First acquisition module, for obtaining shared buffer memory capacity-threshold waterline corresponding to the queue and working as
The space hold situation in preceding shared buffer memory space;
First judge module, for based on shared buffer memory capacity-threshold waterline corresponding to the queue and work as
The space hold situation in preceding shared buffer memory space, judge whether the message meets the first caching condition, and
The message triggers the second acquisition module when meeting the first caching condition;
Second acquisition module, for when the message meets the first caching condition, obtaining the queue
Shared buffer memory space hold estimated value;
Second judge module, judge institute for the shared buffer memory space hold estimated value based on the queue
State message and whether meet the second caching condition, and determine whether to cache the message to described according to judged result
Shared buffer memory space.
7. device according to claim 6, it is characterised in that
First acquisition module, it is additionally operable to obtain the precedence information of the queue, and is based on the queue
Priority obtain corresponding with the priority of queue shared buffer memory capacity-threshold waterline.
8. the device according to claim 6 or 7, it is characterised in that
First judge module, be additionally operable to based on shared buffer memory capacity-threshold waterline corresponding to the queue and
The space hold situation of current shared spatial cache, judge current shared spatial cache space hold value whether
Less than the maximum in shared buffer memory space, and the space hold value of current shared spatial cache is less than the queue
Corresponding shared buffer memory capacity-threshold waterline, if it is, determining that the message meets the first caching condition;It is no
Then, determine that the message does not meet the first caching condition.
9. the device according to claim 6 or 7, it is characterised in that
Second acquisition module, number and the queue for being additionally operable to obtain current first activation queue are current
Shared buffer memory space hold value, and be worth to based on the current shared buffer memory space hold of the queue described
The expection shared buffer memory space hold value of message queue after joining the team;
Expection shared buffer memory space based on the current shared buffer memory space hold value of the queue, the queue
The space hold value of occupation value, the number of current first activation queue and current shared spatial cache, it is determined that
The shared buffer memory space hold estimated value of the queue.
10. the device according to claim 6 or 7, it is characterised in that
Second judge module, be additionally operable to judge the queue shared buffer memory space hold estimated value whether
No more than shared buffer memory capacity-threshold waterline corresponding to the queue, if it is, determining that the message meets
Two caching conditions;Otherwise, it determines the message does not meet the second caching condition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610296638.3A CN107347039B (en) | 2016-05-05 | 2016-05-05 | Management method and device for shared cache space |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610296638.3A CN107347039B (en) | 2016-05-05 | 2016-05-05 | Management method and device for shared cache space |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107347039A true CN107347039A (en) | 2017-11-14 |
CN107347039B CN107347039B (en) | 2020-02-21 |
Family
ID=60253678
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610296638.3A Active CN107347039B (en) | 2016-05-05 | 2016-05-05 | Management method and device for shared cache space |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107347039B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108111436A (en) * | 2017-11-30 | 2018-06-01 | 浙江宇视科技有限公司 | A kind of network equipment buffer scheduling method and system |
CN108768898A (en) * | 2018-04-03 | 2018-11-06 | 郑州云海信息技术有限公司 | A kind of method and its device of network-on-chip transmitting message |
CN108833301A (en) * | 2018-05-30 | 2018-11-16 | 杭州迪普科技股份有限公司 | A kind of message processing method and device |
CN109246080A (en) * | 2018-08-03 | 2019-01-18 | 广东工业大学 | A kind of resource share method, device, equipment and computer readable storage medium |
CN109495401A (en) * | 2018-12-13 | 2019-03-19 | 迈普通信技术股份有限公司 | The management method and device of caching |
CN110618966A (en) * | 2019-09-27 | 2019-12-27 | 迈普通信技术股份有限公司 | Message processing method and device and electronic equipment |
CN111563060A (en) * | 2020-07-13 | 2020-08-21 | 南京艾科朗克信息科技有限公司 | Sharing cache method based on FPGA (field programmable Gate array) report management |
CN115878334A (en) * | 2023-03-08 | 2023-03-31 | 深圳云豹智能有限公司 | Data caching processing method and system, storage medium and electronic equipment |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20040018785A (en) * | 2002-08-27 | 2004-03-04 | 엘지전자 주식회사 | Method for Queue Management Using Queuing Threshold |
CN101141399A (en) * | 2007-10-16 | 2008-03-12 | 武汉烽火网络有限责任公司 | Dual-threshold port queue control method for sharing storage exchange supporting multicast |
CN101656682A (en) * | 2009-06-12 | 2010-02-24 | 中兴通讯股份有限公司 | Method and system for processing mobile multimedia data broadcasting services |
CN102413063A (en) * | 2012-01-12 | 2012-04-11 | 盛科网络(苏州)有限公司 | Method and system for dynamically adjusting allocation threshold value of output port resources |
CN102420776A (en) * | 2012-01-12 | 2012-04-18 | 盛科网络(苏州)有限公司 | Method and system for dynamically regulating portal resource allocation threshold value |
US20130259063A1 (en) * | 2012-03-29 | 2013-10-03 | Alcatel-Lucent Usa Inc. | Methods and apparatuses for adapting buffer capacity at routers |
CN103685062A (en) * | 2013-12-02 | 2014-03-26 | 华为技术有限公司 | Cache management method and device |
US20140258632A1 (en) * | 2013-03-07 | 2014-09-11 | International Business Machines Corporation | Sharing Cache In A Computing System |
CN104125168A (en) * | 2013-04-27 | 2014-10-29 | 中兴通讯股份有限公司 | A scheduling method and system for shared resources |
CN104426790A (en) * | 2013-08-26 | 2015-03-18 | 中兴通讯股份有限公司 | Method and device for carrying out distribution control on cache space with multiple queues |
CN104852863A (en) * | 2015-04-15 | 2015-08-19 | 清华大学 | Method and device for managing dynamic threshold in switch of shared cache |
-
2016
- 2016-05-05 CN CN201610296638.3A patent/CN107347039B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20040018785A (en) * | 2002-08-27 | 2004-03-04 | 엘지전자 주식회사 | Method for Queue Management Using Queuing Threshold |
CN101141399A (en) * | 2007-10-16 | 2008-03-12 | 武汉烽火网络有限责任公司 | Dual-threshold port queue control method for sharing storage exchange supporting multicast |
CN101656682A (en) * | 2009-06-12 | 2010-02-24 | 中兴通讯股份有限公司 | Method and system for processing mobile multimedia data broadcasting services |
CN102413063A (en) * | 2012-01-12 | 2012-04-11 | 盛科网络(苏州)有限公司 | Method and system for dynamically adjusting allocation threshold value of output port resources |
CN102420776A (en) * | 2012-01-12 | 2012-04-18 | 盛科网络(苏州)有限公司 | Method and system for dynamically regulating portal resource allocation threshold value |
US20130259063A1 (en) * | 2012-03-29 | 2013-10-03 | Alcatel-Lucent Usa Inc. | Methods and apparatuses for adapting buffer capacity at routers |
US20140258632A1 (en) * | 2013-03-07 | 2014-09-11 | International Business Machines Corporation | Sharing Cache In A Computing System |
CN104125168A (en) * | 2013-04-27 | 2014-10-29 | 中兴通讯股份有限公司 | A scheduling method and system for shared resources |
CN104426790A (en) * | 2013-08-26 | 2015-03-18 | 中兴通讯股份有限公司 | Method and device for carrying out distribution control on cache space with multiple queues |
CN103685062A (en) * | 2013-12-02 | 2014-03-26 | 华为技术有限公司 | Cache management method and device |
CN104852863A (en) * | 2015-04-15 | 2015-08-19 | 清华大学 | Method and device for managing dynamic threshold in switch of shared cache |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108111436A (en) * | 2017-11-30 | 2018-06-01 | 浙江宇视科技有限公司 | A kind of network equipment buffer scheduling method and system |
CN108768898A (en) * | 2018-04-03 | 2018-11-06 | 郑州云海信息技术有限公司 | A kind of method and its device of network-on-chip transmitting message |
CN108833301A (en) * | 2018-05-30 | 2018-11-16 | 杭州迪普科技股份有限公司 | A kind of message processing method and device |
CN109246080A (en) * | 2018-08-03 | 2019-01-18 | 广东工业大学 | A kind of resource share method, device, equipment and computer readable storage medium |
CN109246080B (en) * | 2018-08-03 | 2021-08-27 | 广东工业大学 | Resource sharing method, device, equipment and computer readable storage medium |
CN109495401A (en) * | 2018-12-13 | 2019-03-19 | 迈普通信技术股份有限公司 | The management method and device of caching |
CN109495401B (en) * | 2018-12-13 | 2022-06-24 | 迈普通信技术股份有限公司 | Cache management method and device |
CN110618966A (en) * | 2019-09-27 | 2019-12-27 | 迈普通信技术股份有限公司 | Message processing method and device and electronic equipment |
CN110618966B (en) * | 2019-09-27 | 2022-05-17 | 迈普通信技术股份有限公司 | Message processing method and device and electronic equipment |
CN111563060A (en) * | 2020-07-13 | 2020-08-21 | 南京艾科朗克信息科技有限公司 | Sharing cache method based on FPGA (field programmable Gate array) report management |
CN115878334A (en) * | 2023-03-08 | 2023-03-31 | 深圳云豹智能有限公司 | Data caching processing method and system, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN107347039B (en) | 2020-02-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107347039A (en) | A kind of management method and device in shared buffer memory space | |
CN108513290A (en) | A kind of selection method and device of network slice | |
CN109343965A (en) | Resource adjusting method, device, cloud platform and server | |
CN104504147B (en) | A kind of resource coordination method of data-base cluster, apparatus and system | |
WO2009070324A1 (en) | A method for setting parameters and determining latency in a chained device system | |
CN102591799B (en) | Method and device for data storage | |
CN106598495A (en) | Mixed storage service quality control method and control apparatus | |
CN106527995B (en) | A kind of data dilatation moving method of I/O equilibrium | |
CN109213699A (en) | A kind of metadata management method, system, equipment and computer readable storage medium | |
JP2007102762A5 (en) | ||
US20130322271A1 (en) | System for performing data cut-through | |
CN108696911A (en) | A kind of selection method and device of data transmission of internet of things mode | |
CN106789751A (en) | Network route based on Resource Availability | |
CN111245732A (en) | Flow control method, device and equipment | |
CN101505505A (en) | Base station control method and apparatus | |
CN109660468A (en) | A kind of port congestion management method, device and equipment | |
CN109587072A (en) | Distributed system overall situation speed limiting system and method | |
CN108874324A (en) | A kind of access request processing method, device, equipment and readable storage medium storing program for executing | |
CN103336670B (en) | A kind of method and apparatus data block being distributed automatically based on data temperature | |
CN108334460A (en) | data cache method and device | |
CN106911740A (en) | A kind of method and apparatus of cache management | |
CN103220230B (en) | Support the dynamic shared buffer method that message crossbar stores | |
CN105430028A (en) | Service calling method, service providing method, and node | |
CN105094742B (en) | A kind of method and apparatus for writing data | |
CN107689923A (en) | Message processing method and router |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |