Summary of the invention
In view of this, the invention provides a kind of buffer scheduling method and a kind of buffer scheduling device, can reduce the generation of the small letter situation of RAID5.
A kind of buffer scheduling method provided by the invention, this buffer scheduling method is applied to the memory device that includes storage control, RAID5 and write buffer memory, the write order of depositing in the command queue of described storage control that includes data is from each data channel, the described data of depositing in the buffer memory of writing transfer from described command queue, also wait for the band that belongs to the corresponding data passage that refreshes to RAID5 that this buffer scheduling method comprises:
A0, refresh when constantly arriving at every turn, judge to belong to the band of each data channel respectively in the described data volume of writing in the buffer memory;
A1, judge band at step a0 and when writing data volume in the buffer memory, allow this band is carried out described refreshing greater than first threshold described; Wherein, first threshold is more than or equal to 1/2 band and less than 1 band;
A2, judge band at step a0 and when writing data volume in the buffer memory, forbid this band is carried out described refreshing less than second threshold value described; Wherein, second threshold value is greater than 0 and less than 1/2 band;
A3, judge band when the described data volume of writing in the buffer memory is in interval between the first threshold and second threshold value, if if current refreshing is because fixed time interval arrives and is triggered then forbids the current band of this data channel carried out and describedly refresh that current to refresh the moment be owing to the described buffer memory of writing reaches waterline and is triggered then allows described the refreshing of current band execution to this data channel constantly at step a0.
This buffer scheduling method further comprises:
B0, in data volume that step a0 judges when shared ratio is less than predetermined value in all bands greater than the band of first threshold, the band at each data channel triggers execution in step b1 respectively;
Whether b1, the data that write order comprised of judging current band correspondence in described command queue and the described total amount of the data in the buffer memory of writing be greater than the 3rd threshold value; Wherein, the 3rd threshold value more than or equal to 1/2 band and less than 1 band, the 3rd threshold value smaller or equal to first threshold;
B2, the described total amount during greater than the 3rd threshold value of judging current band at step b1 are transferred current band corresponding data that write order comprised and data and the described data of being transferred that belong to current band in the buffer memory of writing are refreshed simultaneously in described command queue;
B3, the described total amount during of judging current band at step b1 not greater than the 3rd threshold value, if described command queue is current when having expired, then transfer current band corresponding data that write order comprised and data and the described data of being transferred that belong to current band in the buffer memory of writing are refreshed simultaneously in described command queue.
A LUN among the corresponding RAID5 of data channel difference under each band, the address of each LUN can be recycled;
When existing write address to be respectively many write orders of the tail address of same LUN and first address in the described command queue simultaneously, the data that step b2 and step b3 transfer at the current band of correspondence only limit to the data that write order comprised of write address for the tail address of this LUN.
This buffer scheduling method further during less than predetermined value, forbids that the data that write order comprised in the described command queue are transferred to the described buffer memory of writing in described ratio.
This buffer scheduling method further comprises:
C0, monitor each data channel whether packet loss information is arranged;
C1, when step c0 monitors the packet loss information of data channel, judge this data channel packet loss whether be since network take place congested due to;
C2, step c1 judge this data channel packet loss be not since network take place congested due to the time, trigger step b1 at the band that belongs to this data channel.
A kind of buffer scheduling device provided by the invention, this buffer scheduling device is applied to the memory device that includes storage control, RAID5 and write buffer memory, the write order of depositing in the command queue of described storage control that includes data is from each data channel, the described data of depositing in the buffer memory of writing transfer from described command queue, also wait for the band that belongs to the corresponding data passage that refreshes to RAID5 that this buffer scheduling device comprises:
The refresh control judging module is used for judging to belong to the band of each data channel respectively in the described data volume of writing in the buffer memory refresh when constantly arriving at every turn;
The refresh control Executive Module is used for judging band in the refresh control judging module and, allows this band is carried out described refreshing during greater than first threshold in the described data volume of writing buffer memory; Judging band in the refresh control judging module, forbids this band is carried out described refreshing when writing data volume in the buffer memory less than second threshold value described; Judge band when the described data volume of writing in the buffer memory is in interval between the first threshold and second threshold value in the refresh control judging module, if if current refreshing is because fixed time interval arrives and is triggered then forbids this band carried out and describedly refresh that current to refresh the moment be owing to the described buffer memory of writing reaches waterline and is triggered then allows described the refreshing of this band execution constantly; Wherein, first threshold is more than or equal to 1/2 band and less than 1 band, and second threshold value is greater than 0 and less than 1/2 band.
This buffer scheduling device further comprises:
Formation interaction triggers module, be used for the data volume judged in the refresh control judging module greater than the band of first threshold in the shared ratio of all bands during less than predetermined value, the band at each data channel triggers the mutual judging module of formation respectively;
The mutual judging module of formation, be used for judging current band in the corresponding data that write order comprised of described command queue and the described total amount of the data in the buffer memory of writing whether greater than the 3rd threshold value; Wherein, the 3rd threshold value more than or equal to 1/2 band and less than 1 band, the 3rd threshold value smaller or equal to first threshold;
The mutual Executive Module of formation, the described total amount that is used for judging current band in the mutual judging module of formation is during greater than the 3rd threshold value, transfers current band corresponding data that write order comprised and data and the described data of being transferred that belong to current band in the buffer memory of writing are refreshed simultaneously in described command queue; The described total amount of judging current band in the mutual judging module of formation is not during greater than the 3rd threshold value, if described command queue is current when having expired, then transfer current band corresponding data that write order comprised and data and the described data of being transferred that belong to current band in the buffer memory of writing are refreshed simultaneously in described command queue.
A LUN among the corresponding RAID5 of data channel difference under each band, the address of each LUN can be recycled;
When existing write address to be respectively many write orders of the tail address of same LUN and first address in the described command queue simultaneously, the data that the mutual Executive Module of formation is transferred at the current band of correspondence only limit to the data that write order comprised of write address for the tail address of this LUN.
Formation interaction triggers module further forbids that in described ratio the data that write order comprised in the described command queue transfer to the described buffer memory of writing during less than predetermined value.
This buffer scheduling device further comprises:
Passage packet loss monitoring modular, whether be used to monitor each data channel has packet loss information;
Packet loss is handled judging module, is used in passage packet loss monitoring module monitors when the packet loss information of data channel is arranged, judge this data channel packet loss whether be since the network generation congested due to;
Packet loss processing execution module, be used for packet loss handle judging module judge this data channel packet loss be not since network take place congested due to the time, trigger the mutual judging module of formation at the band that belongs to this data channel.
As seen from the above technical solution, the present invention is refreshing constantly then at every turn, only allows the band of larger data amount carried out to refresh and forbid the band of small data quantity carried out and refresh.Because after writing the refreshing of a part of band of being buffered in each larger data amount, the free space of data accumulation can be provided for another part band of small data quantity immediately, therefore, another band of small data quantity can build up to big quantity as soon as possible before constantly arriving and is refreshed follow-up refreshing, so repeatedly, can realize that each band alternately uses the limited buffer memory accumulation data of writing, and with this small letter situation of avoiding small data quantity to refresh being caused.
More preferably, when band quantity too much (the EC quantity that for example realizes the video recording storage is uprushed) and cause the data of each band all can't reach the data volume that can be refreshed and be trapped in when writing in the buffer memory, the present invention can transfer not to be handed over to as yet from command queue and write data in buffer, and make the data transferred by in advance and write the data that belong to same band in the buffer memory and merge brush down, promptly, the data that utilization is transferred from command queue are replenished the strip data amount of writing in the buffer memory, and carry out with the data volume after replenishing and to refresh, thereby, can when avoiding small data quantity to refresh, empty as early as possible to write in the buffer memory and be detained the shared space of data.
Further, when the situation of packet loss occurring,, represent that promptly packet loss is because due to the performance deficiency of memory device as long as packet loss is not because network congestion causes, to this, can utilize the data of command queue to replenish targetedly and accelerate refreshing respective strap.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is described in more detail.
Situation for the way * stripe size of the capacity of writing buffer memory 〉=EC passage, adopt existing mode can avoid the generation of small letter situation, therefore, present embodiment is mainly still at writing buffer memory (because present embodiment is mainly used in IP SAN memory device, thereby mentioned " writing buffer memory " all is meant the buffer memory of writing in the IP SAN memory device in the present embodiment) off-capacity think that multichannel EC passage provides the situation in enough spaces, promptly write the way * stripe size of the capacity<EC passage of buffer memory.
Wherein, for the IP SAN memory device that only comprises a RAID5, the LUN of all road EC passage correspondences all belongs to same RAID5, and correspondingly, the stripe size of each road EC passage is identical.And for the IP SAN memory device that comprises more than a RAID5, the LUN of each road EC passage correspondence may belong to different RAID5.Like this, because the configuration of different RAID5 may be different, thereby corresponding LUN belong to the stripe size of each road EC passage of different RAID5 also just might be different, at this moment, way * stripe size of writing the capacity<EC passage of buffer memory can be expressed as the stripe size of the way * maximum of capacity<EC passage of writing buffer memory.
In order to think that in the off-capacity of writing buffer memory multichannel EC passage provides the generation that reduces the small letter situation under the situation in enough spaces, present embodiment will be refreshing of small data quantity by what the control that refreshes was avoided as far as possible.For this reason, present embodiment is refreshing constantly then at every turn, need to judge whether the data volume of band in writing buffer memory of each road EC passage enough avoids small letter earlier, have only the band of larger data amount just to allow to be performed the band that refreshes small data quantity and then forbid being performed refreshing, even if rather than also still refresh when the data volume of band in writing buffer memory is very little as prior art.Because after writing the refreshing of a part of band of being buffered in each larger data amount, the free space of data accumulation can be provided for another part band of small data quantity immediately, therefore, another band of small data quantity can build up to big quantity as soon as possible before constantly arriving and is refreshed follow-up refreshing.So carry out the accumulation of the refreshing of a part of band, another part band repeatedly, can realize that each band alternately uses the limited buffer memory accumulation data of writing, and with this small letter situation of avoiding small data quantity to refresh being caused.
Fig. 4 is a preferred flow schematic diagram of the refresh control process that the buffer scheduling method is adopted in the embodiment of the invention.As shown in Figure 4, the refresh control process that the buffer scheduling method in the present embodiment is adopted is refreshing when constantly arriving at every turn, can carry out following step at the band of each EC:
Whether step 401 judges the data volume of this band in writing buffer memory greater than A, if execution in step 402 then, otherwise execution in step 403.Wherein, the value of A is more than or equal to 1/2 band and less than 1 band, and promptly A is more than or equal to 1/2 band and less than 1 band, and for example, A can get 2/3 band.
Therefore step 402 does not belong to small letter to refreshing of this band, allows to carry out at this band to refresh, and finishes this flow process then, and waits for and refresh arrival constantly next time.
Whether step 403 judges the data volume of this band in writing buffer memory less than C, if execution in step 404 then, otherwise execution in step 405.Wherein, the value of C is greater than 0 and less than 1/2 band, and promptly A is more than or equal to 1/2 band and less than 1 band, and for example, C can get 1/3 band.
Therefore step 404 belongs to small letter to refreshing of this band, forbids carrying out at this band and refreshes, and finishes this flow process then, and waits for and refresh arrival constantly next time.
Step 405 judges that constantly whether current refreshing be owing to write buffer memory and reach due to the waterline, if execution in step 406 then, otherwise (for example current refreshing constantly be owing to fixed time interval due to) execution in step 407.
Step 406, even if the current refreshable data volume of this band is less, but writing has not had the data volume that free space can make this band and has continued accumulation in the buffer memory, thereby allows to carry out at this band and refresh, and finishes this flow process then, and waits for and refresh arrival constantly next time.
Step 407, writing free space in the buffer memory also is enough to make the data volume of this band to continue accumulation, thereby temporarily forbids this band carried out and refresh, and finishes this flow process then, and waits for and refresh arrival constantly next time.
So far, a kind of preferred refresh control flow process at a band finishes.
Above-mentioned flow process only is a kind of preferred implementation, in the practical application, sequencing between above-mentioned each step that relates to judgement can be adjusted arbitrarily, a plurality of band also can a shared flow process be realized above-mentioned some judgements, can adjust arbitrarily and refreshes the specific implementation of judging flow process as long as satisfy following refresh control principle:
A0, when arriving (can refresh that trigger condition is constantly discerned, for example fixed time interval arrive or write buffer memory and reach waterline) refreshing constantly at every turn according to monitoring, judgement belongs to the data volume of band in writing buffer memory of each road EC passage respectively;
A1, when a0 judges band and is writing data volume in the buffer memory and reach A, allow this band carried out and refresh;
A2, when a0 judges band and is writing data volume in the buffer memory less than C, forbid this band carried out and refresh;
A3, when a0 judges band and is writing data volume in the buffer memory and be in interval between A and the C (promptly smaller or equal to A and more than or equal to C), if current refreshing is because fixed time interval arrives and is triggered then forbids this band carried out and refresh so that the data volume of this band in writing buffer memory can continue accumulation constantly, if current refreshing constantly be owing to write buffer memory reach waterline be triggered allow to this band execution refresh, to avoid not having free space to cause packet loss owing to writing buffer memory.
As seen, the small letter situation of utilizing refresh control to avoid small data quantity to refresh to a certain extent to be caused.But, when band quantity is too much, the insufficient space that is used for data accumulation that provides for each band in the buffer memory is provided all can be built up to all bands to allow to be performed the data volume that refreshes, forbid that execution refreshes thereby cause a large amount of bars of writing in the buffer memory to prepare and carry, and then the data volume that a large amount of bands occur is detained in writing buffer memory, at this moment, the effect of refresh control will be affected.
Therefore, write the data of being detained in the buffer memory in order when band quantity is too much, can in time to remove, present embodiment can be by with command queue mutual, suitably from command queue, transfer not to be handed over to as yet and write data in buffer, and make the data transferred by in advance and write the data that belong to same band in the buffer memory and merge brush down, promptly, the data that utilization is transferred from command queue are replenished the strip data amount of writing in the buffer memory, and carry out with the data volume after replenishing and to refresh, thereby, can when avoiding small data quantity to refresh, empty to write in the buffer memory and be detained the shared space of data, so that each band can be based on accumulation data in writing buffer memory alternately under the aforesaid refresh control.
Specifically, when the mass data delay occurring in writing buffer memory, the data of most bands in writing buffer memory obviously can't be refreshed.That is, this moment, the data volume in writing buffer memory was very little greater than the shared ratio regular meeting in all bands of the band of A, for example 1: 5,1: 10.Therefore, present embodiment can be after refreshing constantly at every turn, statistics refreshes the data volume judged when constantly carrying out refresh control greater than the band of A shared ratio in all bands in this time, when the ratio of statistics triggers formation reciprocal process at the band of each road EC passage (LUN) respectively during less than predetermined value again.
Fig. 5 is a preferred flow schematic diagram of the formation reciprocal process that the buffer scheduling method is adopted in the embodiment of the invention.As shown in Figure 5, the formation reciprocal process that the buffer scheduling method in the present embodiment is adopted, trigger following flow process less than predetermined value time-division safety pin to the band of each EC passage (being LUN) in the ratio of statistics and begin to carry out from step 501:
Whether step 501, the total amount of judging current band corresponding data that write order comprised and current band data in writing buffer memory in command queue greater than B, if execution in step 502 then, otherwise execution in step 503.
Wherein, the value of B is more than or equal to 1/2 band and less than 1 band, and promptly B is more than or equal to 1/2 band and less than 1 band.And B and A are as the data volume standard that allows to refresh equally.Though the span of B and A is identical, be B smaller or equal to A be owing to write and data have taken place in the buffer memory be detained because this flow process is triggered, therefore, also can write buffer memory and B is set in order to empty as early as possible less than A, that is, suitably reduce the data volume standard that refreshes of allowing.
Step 502, transfer current band in command queue corresponding data that write order comprised and with the data transferred with write the data that belong to current band in the buffer memory and refresh simultaneously, finish flow process then at current band.
Wherein, because this flow process do not carry out refreshing when constantly arriving, therefore, performed refreshing do not belong to refresh the normal refresh when constantly arriving but can be regarded as a kind of pressure and refreshes in this flow process.
Other need to prove that the address of the LUN of each road EC passage correspondence can be recycled, and promptly upper layer application can write the LUN circulation.Therefore, may occur existing simultaneously in the command queue write address to be respectively the tail address of same LUN and many write orders of first address.At this moment, what comprised in the write order of write address for the tail address of this LUN may be the data of ending place of this last band of LUN, and what comprised in the write order of write address for the first address of this LUN then may be the data of the section start of this first band of LUN.That is to say, though the data that a plurality of write orders comprise belong to same LUN, but belong to the different bands in the same LUN, therefore, only transferring write address in this step is the data that write order comprised of the tail address of corresponding LUN, is the data that the write order of the first address of corresponding LUN comprises and do not transfer the write address that is present in simultaneously in the command queue.For example, the write address of the write order in the current band command queue is by along being: 0xfff00,0xfff80,0x00080,0x00100..., it is that data in two write orders of 0xfff00,0xfff80 and the data that belong to current band in writing buffer memory force to refresh that this step is only transferred write address.
Step 503 judges whether command queue is current full, if then execution in step 504, otherwise end is at the flow process of current band.
In this step, may there be two kinds of situations:
A kind of situation is that the LUN of all EC passage correspondences is a shared unique formation in command queue, at this moment, judges that command queue just is meant whether this unique formation is current full current whether having expired.
Another kind of situation is, the LUN of each EC passage correspondence has an independently corresponding subqueue respectively in command queue, promptly, exist and the identical and plurality of sub formation one to one of LUN quantity (being EC passage way), at this moment, judge that command queue is meant then whether corresponding subqueue is current full current whether having expired.
Step 504, though current band is failed greater than B with the data total amount of writing in the buffer memory in command queue, but because command queue is full this moment, thereby still transfer current band in command queue corresponding data that write order comprised and with the data transferred with write the data that belong to current band in the buffer memory and refresh simultaneously, finish flow process then at current band.
The specific implementation of this step and step 502 can be identical, promptly, equally when current band exists write address to be respectively many write orders of the tail address of corresponding LUN and first address simultaneously, only transfer the data that write order comprised of write address in command queue for the tail address of corresponding LUN.
So far, the formation interaction flow at current band finishes.
At the above-mentioned flow process of any band all is that the ratio of judging statistics after refreshing constantly is triggered during less than predetermined value and carries out, and therefore, formation reciprocal process can be regarded as at a kind of supporting process of refresh control process during intermittence.
And, at the band of each road EC passage (being LUN) the above-mentioned flow process as shown in Figure 5 carried out respectively, can carry out simultaneously, also can be that order is carried out.Under preceding a kind of situation about carrying out simultaneously, needed expense can be bigger, therefore, and the latter event of preferred order execution preferably.
Based on as shown in Figure 5 flow process as seen, after the processing through the formation interaction flow, write that can occur immediately in the buffer memory in a large number can be for the free space of data accumulation.Free space after the formation interaction flow is handled can make writes the strip data amount during greater than A that occurs enough ratios in the buffer memory, can stop formation mutual, and wait for refreshing and carry out refresh control when constantly arriving; Even if carried out free space after the formation interaction flow is handled at several strips, still be not enough to refresh next time make when constantly arriving write enough ratios appear in the buffer memory and the strip data amount greater than A, also can after refreshing constantly, continue execution formation interaction flow next time.
In addition, when carrying out above-mentioned flow process at the band of the LUN of any EC passage correspondence, all need judge current band in command queue and whether write the data in buffer total amount, and this deterministic process is mainly by querying command formation respectively with write data volume in the buffer memory, sue for peace then in step 501 greater than B.Therefore, preferably should be in this process the data that write order comprised in the decretum inhibitorium formation to the normal transfer of writing buffer memory, with the accuracy of the judged result of guaranteeing step 501.
Except above-described refresh control and formation reciprocal process, the buffer scheduling method of present embodiment can also be carried out high preferential emergency treatment at any EC passage that packet loss takes place.
Fig. 6 is a preferred flow schematic diagram of the packet loss processing procedure that the buffer scheduling method is adopted in the embodiment of the invention.As shown in Figure 6, the packet loss processing procedure that adopted of the buffer scheduling method in the present embodiment comprises the steps:
Step 601, whether have packet loss information, trigger step 601 after having monitored packet loss information if monitoring each EC passage.
How to produce, how to transmit and how to monitor about the packet loss information in this step, being those skilled in the art can realize, so this paper is no longer given unnecessary details.
Step 602, the packet loss of EC passage is normally caused by two kinds of situations, a kind of then is can't arrive IP SAN memory device owing to network congestion causes data, another kind is that IP SAN memory device can't return success response owing to fail in time to finish Refresh Data, obviously can't solve by IP SAN memory device for the previous case, should be got rid of, therefore, judge this EC passage packet loss whether be since network take place congested due to, if process ends then, otherwise trigger step 501 in the flow process as shown in Figure 5 at the band of the LUN of this EC passage correspondence.
In this step, judge that whether packet loss is because the specific implementation that network takes place due to congested can be varied.And present embodiment also provides a kind of preferred mode, and this mode can utilize the congestion marking in the data message to judge.Specifically: take place when congested at network, switching equipment in the network can be provided with congestion marking in the data message of carrying write order, therefore, can in this step according to whether being provided with congestion marking in the data message from the carrying write order of any EC passage by the switching equipment in the network, the packet loss of judging this EC passage whether be because network takes place congested network take place congested due to.
So far, the flow process of a packet loss processing procedure finishes.
In the practical application, step 601 can be the step of executed in real time, regardless of step 602 whether be triggered, the also judged result of step 602 no matter, step 601 all can keep carrying out incessantly.
More than, be detailed description to the buffer scheduling method in the present embodiment.Though above explanation all is the video monitoring scenes that combine IP SAN memory device and application thereof, but except the video monitoring scene of IP SAN memory device and application thereof, buffer scheduling method in the present embodiment can also be applicable to that equally other includes the memory device of RAID5, perhaps, with other application scenarioss of the data continuity characteristics of the data partition territory storage of other data channel, different circuit-switched data passages like video monitoring has multichannel and EC channel types equally and every circuit-switched data passage.
In the practical application, this buffer scheduling method can utilize computer program to be achieved, and therefore, present embodiment is also to should the buffer scheduling method providing corresponding buffer scheduling device.
A kind of buffer scheduling device that provides in the present embodiment is shown in Fig. 7 a, this device mainly can be applicable to the memory device (for example IP SAN memory device) that includes storage control, RAID5 and write buffer memory, and the data that write order comprised in the command queue in the storage control are handed over to earlier to be write in the buffer memory behind the buffer memory, be refreshed to RAID5 from the described buffer memory of writing.Referring to Fig. 7 a, this device comprises:
Refresh control judging module 711, when being used for arriving refreshing constantly at every turn (can refresh that trigger condition is constantly discerned according to monitoring, for example fixed time interval arrive or write buffer memory and reach waterline), judgement belongs to the data volume of band in writing buffer memory of each data channel respectively.
Refresh control Executive Module 712 is used for judging band in the data volume of writing buffer memory during greater than A in refresh control judging module 711, allows this band carried out to refresh; When refresh control judging module 711 is judged band and write data volume in the buffer memory less than C, forbid this band carried out and refresh; When refresh control judging module 711 is judged band and is being write data volume in the buffer memory and be in interval between A and the C (promptly smaller or equal to A and more than or equal to C), if if current refreshing is because fixed time interval arrives and is triggered then forbids this band carried out and refresh that current to refresh the moment be to reach waterline and be triggered then allow this band execution is refreshed owing to writing buffer memory constantly.In the practical application, refresh control Executive Module 712 can refresh trigger condition constantly according to monitoring and judge the current reason that arrives constantly that refreshes, and is perhaps refreshed trigger condition constantly and is announced refresh control Executive Module 712 by 711 monitorings of refresh control judging module.Wherein, the value of A and C is as described in the method part.
As seen, buffer scheduling device shown in Fig. 7 a can utilize refresh control only to allow refreshing of big data quantity and limit refreshing of small data quantity, and make and to write the free space that data accumulation can be provided for another part band of small data quantity behind the refreshing of a part of band of being buffered in each larger data amount immediately, therefore, another band of small data quantity can follow-up refresh to build up to as soon as possible before constantly arriving allow the big quantity that is refreshed.So carry out the accumulation of the refreshing of a part of band, another part band repeatedly, can realize that each band alternately uses the limited buffer memory accumulation data of writing, and with this small letter situation of avoiding small data quantity to refresh being caused.
But, too much causing writing inadequate buffer space with by all bands alternately during accumulation data in band quantity, the mass data that occurs easily writing in the buffer memory is detained, and at this moment, the refresh control effect of buffer scheduling device will be affected shown in Fig. 7 a.
For this reason, present embodiment also provides the another kind of buffer scheduling device shown in Fig. 7 b.Another kind of buffer scheduling device shown in Fig. 7 b is based on the basis as Fig. 7 a shown device, has further increased following structure:
Formation interaction triggers module 721, be used for adding up that refresh control judging module 711 judges in the data volume of writing buffer memory greater than the band of A shared ratio in all bands at every turn, and less than predetermined value (for example 1: 5,1: 10 etc.) time-division safety pin the band of each data channel triggered the mutual judging module 722 of formation in this ratio.
The mutual judging module 722 of formation, be used for judging current band the corresponding data that write order comprised of command queue with whether write the total amount of the data in the buffer memory greater than B.In the practical application, in order to ensure the accuracy of the judged result of the mutual judging module 722 of formation, preferably should by formation interaction triggers module 721 the ratio of its statistics during less than predetermined value the data that write order comprised in the decretum inhibitorium formation normally transfer to writing buffer memory.
The mutual Executive Module 723 of formation, the described total amount that is used for judging current band in the mutual judging module 722 of formation is during greater than B, transfer current band in command queue corresponding data that write order comprised and with the data transferred with write the data that belong to current band in the buffer memory and refresh simultaneously; The described total amount of judging current band in the mutual judging module 722 of formation is not during greater than B, if command queue is current when having expired, then transfer current band in command queue corresponding data that write order comprised and with the data transferred with write the data that belong to current band in the buffer memory and refresh simultaneously, if command queue current less than do not process.Wherein, the value of B is as described in the method part.
Promptly, in the described total amount of current band during not greater than B, the mutual Executive Module 723 of formation is only in that command queue is current when having expired, transfer current band in command queue corresponding data that write order comprised and with the data transferred with write the data that belong to current band in the buffer memory and refresh simultaneously.
Wherein, the triggering of the mutual Executive Module 723 of formation is not owing to refresh constantly arrival, and therefore, mutual Executive Module 723 performed the refreshing of formation do not belong to refresh the normal refresh when constantly arriving but can be regarded as a kind of pressure and refresh.And, when current band occurring and in command queue, exist write address to be respectively many write orders of the tail address of same LUN and first address simultaneously, the data that the mutual Executive Module 723 of formation is transferred, only limiting to write address is the data that write order comprised of the tail address of corresponding LUN.
In addition, there are two kinds of situations for the current whether full condition of command queue: if whether full the LUN of all data channel correspondences shared unique formation in command queue judged then that command queue is current just to be meant whether this unique formation is current full; And if the LUN of each data channel correspondence has an independently corresponding subqueue respectively in command queue, judge that then command queue is meant then whether corresponding subqueue is current full current whether having expired.
As above as seen, the buffer scheduling device shown in Fig. 7 b can make and write the free space that occurs can supplying in a large number data accumulation in the buffer memory immediately by the mutual processing of formation.When the free space after the formation interaction process can make the strip data amount during greater than A that enough ratios occur of writing in the buffer memory, formation interaction triggers module 721 can be cancelled the triggering of the mutual judging module 722 of formation so that the mutual judging module 722 of formation quits work, correspondingly, along with the mutual judging module 722 of formation quits work, the mutual Executive Module of formation just can not be triggered and quit work yet again.
In the practical application, mutual judging module 722 of formation and the mutual Executive Module 723 of formation at the band of each circuit-switched data passage (being LUN) the processing procedure carried out respectively can carry out simultaneously, also can be that order is carried out.Under preceding a kind of situation about carrying out simultaneously, need to be provided with mutual judging module 722 of many covers formation and the mutual Executive Module 723 of formation that equates with data channel quantity, the expense of this moment can be bigger, therefore, preferably the latter event of preferred order execution only needs the mutual judging module 722 of a cover formation, the mutual Executive Module 723 of formation this moment.
Except above two kinds of buffer scheduling devices shown in Fig. 7 a and Fig. 7 b, present embodiment also provides another buffer scheduling device shown in Fig. 7 c.Buffer scheduling device shown in Fig. 7 c has further increased following structure based on as Fig. 7 b shown device:
Whether passage packet loss monitoring modular 741, being used to monitor each data channel has packet loss information.
Packet loss is handled judging module 742, is used for when passage packet loss monitoring modular 741 monitors the packet loss information of data channel, judge this data channel packet loss whether be since network take place congested due to.In the practical application, whether packet loss is handled judging module 742 can be provided with congestion marking by the switching equipment in the network according to the data message that is used for carrying write order from the arbitrary data passage, the packet loss of judging this data channel whether be because network takes place congested network take place congested due to.
Packet loss processing execution module 743, be used for packet loss handle judging module 742 judge this data channel packet loss be not since network take place congested due to the time, trigger the mutual judging module 722 of formation at the band of the LUN of this data channel correspondence.
As seen, the buffer scheduling device shown in Fig. 7 c can further carry out high preferential emergency treatment at the arbitrary data passage that packet loss takes place in the present embodiment.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to and replace and improvement etc., all should be included within protection scope of the present invention.