CN101630288B - Method and device for processing and controlling buffer cache and storage device thereof - Google Patents

Method and device for processing and controlling buffer cache and storage device thereof Download PDF

Info

Publication number
CN101630288B
CN101630288B CN200910091504.8A CN200910091504A CN101630288B CN 101630288 B CN101630288 B CN 101630288B CN 200910091504 A CN200910091504 A CN 200910091504A CN 101630288 B CN101630288 B CN 101630288B
Authority
CN
China
Prior art keywords
buffer size
buffer
information
input
output operation
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.)
Active
Application number
CN200910091504.8A
Other languages
Chinese (zh)
Other versions
CN101630288A (en
Inventor
孙波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Huawei Technology Co Ltd
Original Assignee
Huawei Symantec Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Symantec Technologies Co Ltd filed Critical Huawei Symantec Technologies Co Ltd
Priority to CN200910091504.8A priority Critical patent/CN101630288B/en
Publication of CN101630288A publication Critical patent/CN101630288A/en
Application granted granted Critical
Publication of CN101630288B publication Critical patent/CN101630288B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a method and a device for processing and controlling a buffer cache and a storage device thereof, wherein the method for processing the buffer cache comprises the following steps: sending a request for calculating the size of the buffer cache to the device for controlling the buffer cache, wherein operation and record information related to current input and input operation is carried in the request for calculating the size of the buffer cache; receiving size information of the buffer cache acquired and fed back by the device for controlling the buffer cache according to operation record information; adjusting the size of the buffer cache according to the information on the size of the buffer cache. The embodiment of the invention can realize the dynamic adjustment of the size of the buffer cache, and has better commonality and higher accuracy.

Description

Buffer area processing and control method, equipment and memory device
Technical field
The embodiment of the invention relates to field of computer technology, relates in particular to a kind of buffer area processing and control method, equipment and memory device.
Background technology
Input and output (Input and Output, hereinafter to be referred as: IO) the technology critical role in the program development technology always.For example file read-write is handled and is a kind of IO technology, when byte of every read-write, all need operate disk I.Because memory access chronomere is a nanosecond, and disk address time unit is a Millisecond, so disk I is operated with respect to internal memory operation inefficiency.
In order to address this problem, prior art is opened up buffer area in internal memory, and in buffer area, completely the back is disposable that data are write disk at buffer area, thereby has promoted the speed that disk I is handled greatly with the deposit data of needs read-writes.The size of buffer area generally by the programmer rule of thumb or test value directly set, in program operation process, do not allow to revise the size of buffer area yet, in all same generic operations, all use this same buffer area.Yet buffer area too conference causes memory consumption to increase, and the IO operation of transmission Network Based is also failed easily and caused program exception; Buffer area is too little can't to reach the frequency that reduces the disk I operation again, can't play the effect that promotes the IO treatment effeciency, so how the size of buffer area is set and become problem demanding prompt solution.
Be that a buffer size is set in advance in the prior art,, make the user can revise the size of buffer area as required simultaneously for this buffer size provides the user's modification interface.Yet although the inventor finds that in realizing process of the present invention buffer size is adjustable in the prior art, owing to be manual operation, degree of regulation is low, can't confirm best buffer size.
Summary of the invention
The embodiment of the invention provides a kind of buffer area processing and control method, equipment and memory device; Can realize buffer size is carried out dynamic adjustments; Thereby can under the situation that lowers memory consumption, effectively promote the IO treatment effeciency, and versatility is better, precision is higher.
The embodiment of the invention provides a kind of buffer area disposal route, comprising:
Send the buffer size computation requests to the buffer area opertaing device, carry the operation note information relevant in the said buffer size computation requests with this input-output operation;
Receive the buffer size information of said buffer area opertaing device according to said operation note information acquisition and feedback;
Regulate the size of buffer area according to said buffer size information.
The embodiment of the invention provides a kind of buffer area control method, comprising:
Receive the buffer size computation requests that the buffer area treatment facility sends, carry the operation note information relevant in the said buffer size computation requests with this input-output operation;
According to said operation note information acquisition buffer size information, and said buffer size information sent to said buffer area treatment facility, so that said buffer area treatment facility is regulated the size of buffer area according to said buffer size information.
The embodiment of the invention provides a kind of buffer area treatment facility, comprising:
First sending module is used for sending the buffer size computation requests to the buffer area opertaing device, carries the operation note information relevant with this input-output operation in the said buffer size computation requests;
First receiver module is used to receive the buffer size information of said buffer area opertaing device according to said operation note information acquisition and feedback;
First processing module is used for the size according to said buffer size information adjusting buffer area.
The embodiment of the invention provides a kind of buffer area opertaing device, comprising:
Second receiver module is used to receive the buffer size computation requests that the buffer area treatment facility sends, and carries the operation note information relevant with this input-output operation in the said buffer size computation requests;
Second processing module is used for according to said operation note information acquisition buffer size information;
Second sending module is used for said buffer size information is sent to said buffer area treatment facility, so that said buffer area treatment facility is regulated the size of buffer area according to said buffer size information.
The embodiment of the invention also provides a kind of memory device, comprises above-mentioned buffer area treatment facility and buffer area opertaing device.
The embodiment of the invention; Through send the buffer size computation requests of carrying operation note information to the buffer area opertaing device; Make the buffer area opertaing device can be used to regulate the buffer size information of buffer size according to this operation note information acquisition; And give the buffer area treatment facility with this buffer size information feedback, make the buffer area treatment facility can regulate the size of buffer area according to this buffer size information.The embodiment of the invention does not need artificial the participation when regulating buffer size, can carry out dynamic adjustments to the size of buffer area, and degree of regulation is better, through repeatedly IO operation, thereby determines preferable buffer size.And; The described buffer area opertaing device of the embodiment of the invention is in the process that obtains buffer size information; Can make full use of the relevant various operation note information of operating with this IO, consider the different running environment of program comprehensively, the versatility when regulating buffer size is better.
Description of drawings
In order to be illustrated more clearly in the technical scheme of the embodiment of the invention; To do to introduce simply to the accompanying drawing of required use among the embodiment below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the process flow diagram of an embodiment of buffer area disposal route of the present invention;
Fig. 2 is the process flow diagram of an embodiment of buffer area control method of the present invention;
Fig. 3 is the signaling process figure of an embodiment of the inventive method;
Fig. 4 is the structural representation of an embodiment of buffer area treatment facility of the present invention;
Fig. 5 is the structural representation of an embodiment of buffer area opertaing device of the present invention;
Fig. 6 is the structural representation of another embodiment of buffer area opertaing device of the present invention;
Fig. 7 is the structural representation of an embodiment of memory device of the present invention.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Fig. 1 is the process flow diagram of an embodiment of buffer area disposal route of the present invention, and as shown in Figure 1, the method for present embodiment comprises:
Step 101, send the buffer size computation requests, carry the operation note information relevant in the said buffer size computation requests with this input-output operation to the buffer area opertaing device.
For instance, after accomplishing an IO operation, the buffer area treatment facility can send the buffer size computation requests to the buffer area opertaing device, has carried in this buffer size computation requests and the relevant operation note information of this IO operation.This operation note information can comprise and the relevant various record data of this IO operation; For instance; These record data can comprise the running environment parameter and the information etc. that expends time in of this IO operation, can reflect the performance of this IO operation through operation note information comprehensively.
The buffer size information that step 102, the said buffer area opertaing device of reception also feed back according to said operation note information acquisition.
Concrete, the buffer area opertaing device can obtain the operation note information of carrying in this buffer size computation requests after receiving this buffer size computation requests, thereby can be according to this operation note information acquisition buffer size information.
Obtain buffer size information principle can for: if the efficient of this IO operation is higher than the efficient of preceding IO operation; The data processing time that is this IO operation is less than the data processing time that a preceding IO operates; Then increase the size of buffer area; The best buffer size that is current acquisition is compared with the preceding best buffer size that once obtains, and can further increase, thereby can obtain higher IO operating efficiency; If the efficient of this IO operation is lower than the efficient of preceding IO operation; Be the data processing time of the data processing time of this IO operation more than preceding IO operation, then reduce the size of buffer area, i.e. the best buffer size of current acquisition is compared with the preceding best buffer size that once obtains; Need reduce; Thereby under the lower situation of IO operating efficiency, improve the efficient of IO operation, and then guarantee the success ratio of IO operation through the size that reduces buffer area; Otherwise remain unchanged, i.e. the best buffer size of current acquisition equates with the preceding best buffer size that once obtains.
In concrete implementation procedure; Process according to operation note information acquisition buffer size information can be accomplished through the computing technique parameter; Technical parameter according to calculating is obtained confirms how to regulate buffer size; Reaching the buffer size of current the best, thereby better improve the efficient of IO operation.
Step 103, the size of regulating buffer area according to said buffer size information.
Concrete, the buffer area opertaing device can be given the buffer area treatment facility with the buffer size information feedback that obtains, thereby makes the buffer area treatment facility can regulate the size of buffer area according to this buffer size information.
In system's operation a period of time; After carrying out repeatedly the IO operation, above-mentioned steps 101 can be carried out repeatedly with step 102 repeatedly, thereby repeatedly the size of buffer area is regulated; Thereby make the size of buffer area be adjusted to current optimum value gradually, fully adapt to the program run environment.
Present embodiment is through sending the buffer size computation requests of carrying operation note information to the buffer area opertaing device; Make the buffer area opertaing device can be used to regulate the buffer size information of buffer size according to this operation note information acquisition; And give the buffer area treatment facility with this buffer size information feedback, make the buffer area treatment facility can regulate the size of buffer area according to this buffer size information.The buffer area opertaing device is in the process that obtains buffer size information; Can make full use of relevant various operation note information with this IO operation; The different running environment of comprehensive consideration program, therefore, the versatility of present embodiment when regulating buffer size is good.And present embodiment does not need artificial the participation when regulating buffer size, can carry out dynamic adjustments to the size of buffer area, and degree of regulation is good, and through repeatedly IO operation, can determine preferable buffer size.
In another embodiment of buffer area disposal route of the present invention, this operation note information can comprise: the data total amount information of this input-output operation, last buffer size information and information consuming time.Need to prove; Present embodiment has only provided three kinds of operation note information, but it will be appreciated by persons skilled in the art that as required; Various required record data all can be included in this operation note information, to obtain more rationally accurate buffer size information.
In another embodiment of buffer area disposal route of the present invention, said in the step 101 sent the buffer size computation requests to the buffer area opertaing device, can comprise: adopt asynchronous system to send the buffer size computation requests to said buffer area opertaing device.Through adopting asynchronous system to send the buffer size computation requests, can not influence the original system flow process, thereby guarantee the normal operation of program in the system to the buffer area opertaing device.
Fig. 2 is the process flow diagram of an embodiment of buffer area control method of the present invention, and as shown in Figure 2, the method for present embodiment comprises:
The buffer size computation requests that step 201, reception buffer area treatment facility send carries in the said buffer size computation requests and the relevant operation note information of this IO operation;
For instance, after accomplishing an IO operation, the buffer area treatment facility can send the buffer size computation requests to the buffer area opertaing device, has carried in this buffer size computation requests and the relevant operation note information of this IO operation.This operation note information can comprise and the relevant various record data of this IO operation; For instance; These record data can comprise the running environment parameter and the information etc. that expends time in of this IO operation, can reflect the performance of this IO operation through operation note information comprehensively.
Step 202, according to said operation note information acquisition buffer size information, and said buffer size information sent to said buffer area treatment facility, so that said buffer area treatment facility is regulated the size of buffer area according to said buffer size information.
The buffer area opertaing device can obtain the operation note information of carrying in this buffer size computation requests after receiving this buffer size computation requests, thereby can be according to this operation note information acquisition buffer size information.Obtain buffer size information principle can for: if the efficient of this IO operation is higher than the efficient of preceding IO operation; Then increase the size of buffer area; The best buffer size that is current acquisition is compared with the preceding best buffer size that once obtains; Can further increase, thereby can obtain higher IO operating efficiency; If the efficient of this IO operation is lower than the efficient of preceding IO operation; Then reduce the size of buffer area; The best buffer size that is current acquisition is compared with the preceding best buffer size that once obtains, need reduce, thereby under the lower situation of IO operating efficiency; Size through reducing buffer area improves the IO operating efficiency, and then guarantees the success ratio of IO operation; Otherwise remain unchanged, i.e. the best buffer size of current acquisition equates with the preceding best buffer size that once obtains.
In concrete implementation procedure, can accomplish through the computing technique parameter according to the process of operation note information acquisition buffer size information.For example can preestablish some technical indicators,, confirm to be used to regulate the buffer size information of buffer size again according to this technical indicator then according to operation note information calculations corresponding techniques index.
Then, the buffer area opertaing device can be given the buffer area treatment facility with the buffer size information feedback that obtains, thereby makes the buffer area treatment facility can regulate the size of buffer area according to this buffer size information.
In system's operation a period of time; After carrying out repeatedly the IO operation, above-mentioned steps 201 can be carried out repeatedly with step 202 repeatedly, thereby repeatedly the size of buffer area is regulated; Thereby make the size of buffer area be adjusted to optimum value gradually, fully adapt to the program run environment.
Present embodiment carries the buffer size computation requests of operation note information through reception; Make the buffer area opertaing device can be used to regulate the buffer size information of buffer size according to this operation note information acquisition; And give the buffer area treatment facility with this buffer size information feedback, make the buffer area treatment facility can regulate the size of buffer area according to this buffer size information.The buffer area opertaing device is in the process that obtains buffer size information; Can make full use of relevant various operation note information with this IO operation; The different running environment of comprehensive consideration program, therefore, the versatility of present embodiment when regulating buffer size is good.And present embodiment does not need artificial the participation when regulating buffer size, can carry out dynamic adjustments to the size of buffer area, and degree of regulation is good, and through repeatedly IO operation, can determine preferable buffer size.
In another embodiment of buffer area control method of the present invention, said operation note information can comprise: the data total amount information of this input-output operation, last buffer size information and information consuming time; Described in the step 201 according to said operation note information acquisition buffer size information; Can comprise: according to the data processing time information of said this input-output operation of operation note information acquisition, and according to the said buffer size information of said data processing time information acquisition.
Further; Said according to the said buffer size information of said data processing time information acquisition; Can comprise: if said data processing time is longer than the last secondary data processing time, then reduce buffer size, the buffer size after will reducing is as said buffer size information; If said data processing time is shorter than the last secondary data processing time, then increase buffer size, with the buffer size after increasing as said buffer size information; If said data processing time information equates with the last secondary data processing time, then with previous buffer size as said buffer size information.
In concrete implementation procedure, obtain buffer size information computation process can for:
At first calculate the data processing time of this IO operation through following method:
The data processing time of this IO operation equals the ratio of data quantity stored in information consuming time and the unit buffer area.Wherein, data quantity stored equals the data total amount information of this IO operation and the ratio of last buffer size information in the unit buffer area.
Carry out judgment processing according to the data processing time of this IO operation then:
If the data processing time of this IO operation is greater than the data processing time of preceding IO operation, then
Buffer size information equals the difference of preceding buffer size information and stepping amount, and wherein stepping amount can be selected according to the needs to the adjustment precision of buffer size information;
If the data processing time of this IO operation equals the data processing time of preceding IO operation, then
Buffer size information equals a preceding buffer size information;
If the data processing time of this IO operation is less than the data processing time of preceding IO operation, then
Buffer size information equal preceding buffer size information and stepping amount with.
In the present embodiment; The buffer area opertaing device can be used to regulate the buffer size information of buffer size according to data total amount information, buffer size information and the information acquisition consuming time of this IO operation; And give the buffer area treatment facility with this buffer size information feedback, make the buffer area treatment facility can regulate the size of buffer area according to this buffer size information.Present embodiment does not need artificial the participation, can carry out dynamic adjustments to the size of buffer area, and degree of regulation is good, and through repeatedly IO operation, can determine best buffer size.And present embodiment can make full use of the relevant various operation note information with this IO operation, considers the different running environment of program comprehensively, and therefore, the versatility when regulating buffer size is good.
Fig. 3 is the signaling process figure of an embodiment of the inventive method embodiment, and is as shown in Figure 3, and the method for present embodiment comprises:
Step 301, IO equipment send the request message that obtains the required buffer size information of this IO operation to the buffer area treatment facility.
Step 302, buffer area treatment facility send to IO equipment with current cache district size information.
Step 303, IO equipment carry out this IO operation according to current cache district size information;
IO equipment can be arranged to this buffer size information with the size of buffer area after this current buffer size information of acquisition, carry out this IO operation then.
Step 304, IO equipment report and the relevant operation note information of this IO operation to the buffer area treatment facility.
Operation note information in this step is described in detail in the aforementioned embodiment, repeats no more.
Step 305, buffer area treatment facility send the buffer size computation requests through asynchronous system to said buffer area opertaing device, carry in the said buffer size computation requests and the relevant operation note information of this IO operation.
Through adopting asynchronous system to send the buffer size computation requests, can not influence the original system flow process, thereby guarantee the normal operation of program in the system to the buffer area opertaing device.
Step 306, buffer area opertaing device are operated the relevant new buffer size information of operation note information acquisition according to said with this IO.
The buffer area opertaing device can be used preset algorithm operation note information is calculated, thereby obtains the buffer size information after this IO operation.
Step 307, buffer area opertaing device are given the buffer area treatment facility with the buffer size information feedback that obtains in the step 306.
The buffer area opertaing device can be given the buffer area treatment facility with the buffer size information feedback that obtains; Thereby make the buffer area treatment facility can regulate the size of buffer area, promptly make things convenient for IO equipment when IO operation next time, to obtain this buffer size information according to this buffer size information.
In system's operation a period of time; After carrying out repeatedly the IO operation, above-mentioned steps 301 can be carried out repeatedly with step 307 repeatedly, thereby repeatedly the size of buffer area is regulated; Thereby make the size of buffer area be adjusted to preferred values gradually, fully adapt to the program run environment.
Present embodiment is through sending the buffer size computation requests of carrying operation note information to the buffer area opertaing device; Make the buffer area opertaing device can be used to regulate the buffer size information of buffer size according to this operation note information acquisition; And give the buffer area treatment facility with this buffer size information feedback, make the buffer area treatment facility can regulate the size of buffer area according to this buffer size information.The buffer area opertaing device is in the process that obtains buffer size information; Can make full use of relevant various operation note information with this IO operation; The different running environment of comprehensive consideration program, therefore, the versatility of present embodiment when regulating buffer size is good.And present embodiment does not need artificial the participation when regulating buffer size, can carry out dynamic adjustments to the size of buffer area, and degree of regulation is good, and through repeatedly IO operation, can determine best buffer size.
Fig. 4 is the structural representation of an embodiment of buffer area treatment facility of the present invention, and as shown in Figure 4, the equipment of present embodiment comprises: first sending module 11, first receiver module 12 and first processing module 13, wherein:
First sending module 11 is used for sending the buffer size computation requests to the buffer area opertaing device, carries the operation note information relevant with this input-output operation in the said buffer size computation requests;
First receiver module 12 is used to receive the buffer size information of said buffer area opertaing device according to said operation note information acquisition and feedback;
First processing module 13 is used for the size according to said buffer size information adjusting buffer area.
The equipment of present embodiment is corresponding with the realization principle of buffer area disposal route embodiment of the present invention shown in Figure 1, repeats no more here.
Present embodiment is through sending the buffer size computation requests of carrying operation note information to the buffer area opertaing device; Make the buffer area opertaing device can be used to regulate the buffer size information of buffer size according to this operation note information acquisition; And give the buffer area treatment facility with this buffer size information feedback, make the buffer area treatment facility can regulate the size of buffer area according to this buffer size information.Present embodiment does not need artificial the participation when regulating buffer size, can carry out dynamic adjustments to the size of buffer area, and degree of regulation is good, and through repeatedly IO operation, can determine preferable buffer size.And; The buffer area opertaing device can make full use of the relevant various operation note information of operating with this IO in the process that obtains buffer size information, consider the different running environment of program comprehensively; Therefore, the versatility of present embodiment when regulating buffer size is good.
Fig. 5 is the structural representation of an embodiment of buffer area opertaing device of the present invention, and as shown in Figure 5, the equipment of present embodiment comprises: second receiver module 21, second processing module 22 and second sending module 23, wherein:
Second receiver module 21 is used to receive the buffer size computation requests that the buffer area treatment facility sends, and carries the operation note information relevant with this input-output operation in the said buffer size computation requests;
Second processing module 22 is used for according to said operation note information acquisition buffer size information;
Second sending module 23 is used for said buffer size information is sent to said buffer area treatment facility, so that said buffer area treatment facility is regulated the size of buffer area according to said buffer size information.
The equipment of present embodiment is corresponding with the realization principle of buffer area control method embodiment of the present invention shown in Figure 2, repeats no more here.
Fig. 6 is the structural representation of another embodiment of buffer area opertaing device of the present invention, and as shown in Figure 6, the equipment of present embodiment comprises: second receiver module 21, second processing module 22 and second sending module 23, wherein:
Second receiver module 21 is used to receive the buffer size computation requests that the buffer area treatment facility sends, and carries the operation note information relevant with this input-output operation in this buffer size computation requests;
Second processing module 22 is used for according to said operation note information acquisition buffer size information;
Second sending module 23 is used for said buffer size information is sent to said buffer area treatment facility, so that said buffer area treatment facility is regulated the size of buffer area according to said buffer size information.
Further, second processing module 22 can comprise: first processing unit 221 and second processing unit 222, wherein:
First processing unit 221 is used for the data processing time information according to said this input-output operation of operation note information acquisition;
Second processing unit 222 is used for according to the said buffer size information of said data processing time information acquisition.
Concrete, if the data processing time of this IO operation is greater than the data processing time of preceding IO operation, then
Buffer size information equals the difference of preceding buffer size information and stepping amount, and wherein stepping amount can be selected according to the needs to the adjustment precision of buffer size information;
If the data processing time of this IO operation equals the data processing time of preceding IO operation, then
Buffer size information equals a preceding buffer size information;
If the data processing time of this IO operation is less than the data processing time of preceding IO operation, then
Buffer size information equal preceding buffer size information and stepping amount with.
Buffer area opertaing device the foregoing description of the present invention carries the buffer size computation requests of operation note information through reception; Make the buffer area opertaing device can be used to regulate the buffer size information of buffer size according to this operation note information acquisition; And give the buffer area treatment facility with this buffer size information feedback, make the buffer area treatment facility can regulate the size of buffer area according to this buffer size information.Present embodiment does not need artificial the participation when regulating buffer size, can carry out dynamic adjustments to the size of buffer area, and degree of regulation is good, and through repeatedly IO operation, can determine preferable buffer size, improves the efficient of IO operation.And; The buffer area opertaing device can make full use of the relevant various operation note information of operating with this IO in the process that obtains buffer size information, consider the different running environment of program comprehensively; Therefore, the versatility of present embodiment when regulating buffer size is good.
Fig. 7 is the structural representation of an embodiment of memory device of the present invention; As shown in Figure 7; The memory device of present embodiment comprises: buffer area treatment facility 1 and buffer area opertaing device 2; Wherein, buffer area treatment facility 1 is used for sending the buffer size computation requests to said buffer area opertaing device 2, carries the operation note information relevant with this input-output operation in the said buffer size computation requests; Receive the buffer size information of said buffer area opertaing device 2, to regulate the size of buffer area according to said buffer size information according to said operation note information acquisition and feedback; Said buffer area opertaing device 2 is used to receive the buffer size computation requests that said buffer area treatment facility 1 sends; According to said operation note information acquisition buffer size information; And said buffer size information sent to said buffer area treatment facility 1, so that said buffer area treatment facility 1 is regulated the size of buffer area according to said buffer size information.
In the memory device of present embodiment; Buffer area treatment facility 1 is corresponding with the realization principle of buffer area disposal route embodiment of the present invention shown in Figure 1; Buffer area opertaing device 2 is corresponding with the realization principle of buffer area control method embodiment of the present invention shown in Figure 2; The realization principle of the concrete reciprocal process of buffer area treatment facility 1 and buffer area opertaing device 2 and the inventive method embodiment shown in Figure 3 is corresponding, repeats no more here.
Present embodiment is through sending the buffer size computation requests of carrying operation note information to the buffer area opertaing device; Make the buffer area opertaing device can be used to regulate the buffer size information of buffer size according to this operation note information acquisition; And give the buffer area treatment facility with this buffer size information feedback, make the buffer area treatment facility can regulate the size of buffer area according to this buffer size information.The buffer area opertaing device is in the process that obtains buffer size information; Can make full use of and the relevant various operation note information of this IO operation; The different running environment of comprehensive consideration program, therefore, the versatility of present embodiment when regulating buffer size is good.And present embodiment does not need artificial the participation when regulating buffer size, can carry out dynamic adjustments to the size of buffer area, and degree of regulation is good, and through repeatedly IO operation, can determine preferable buffer size.
What should explain at last is: above embodiment is only in order to technical scheme of the present invention to be described but not limit it; Although the present invention has been carried out detailed explanation with reference to preferred embodiment; Those of ordinary skill in the art is to be understood that: it still can make amendment or be equal to replacement technical scheme of the present invention, also can not make amended technical scheme break away from the spirit and the scope of technical scheme of the present invention and these are revised or be equal to replacement.

Claims (10)

1. a buffer area disposal route is characterized in that, comprising:
After input-output operation of completion, send the buffer size computation requests to the buffer area opertaing device, carry the operation note information relevant in the said buffer size computation requests with this input-output operation;
Receive the buffer size information of said buffer area opertaing device according to said operation note information acquisition and feedback; Wherein, If the efficient of this input-output operation is higher than the efficient of a preceding input-output operation; Then the buffer size of this acquisition is greater than the preceding buffer size that once obtains, if the efficient of this input-output operation is lower than the efficient of a preceding input-output operation, then the buffer size of this acquisition is less than the preceding buffer size that once obtains; If the efficient of this input-output operation equals the efficient of a preceding input-output operation, the buffer size that once obtains before then the buffer size of this acquisition equals;
Regulate the size of buffer area according to said buffer size information.
2. buffer area disposal route according to claim 1 is characterized in that, said operation note information comprises:
The information consuming time of the data total amount information of this input-output operation, a preceding buffer size information and this input-output operation.
3. 1 or 2 described buffer area disposal routes as requested is characterized in that, saidly send the buffer size computation requests to the buffer area opertaing device, comprising:
Adopt asynchronous system to send the buffer size computation requests to said buffer area opertaing device.
4. a buffer area control method is characterized in that, comprising:
Receive the buffer size computation requests that the buffer area treatment facility sends after input-output operation of completion, carry the operation note information relevant in the said buffer size computation requests with this input-output operation;
According to said operation note information acquisition buffer size information; And said buffer size information sent to said buffer area treatment facility; So that said buffer area treatment facility is regulated the size of buffer area according to said buffer size information; Wherein, if the efficient of this input-output operation is higher than the efficient of a preceding input-output operation, then the buffer size of this acquisition is greater than the preceding buffer size that once obtains; If the efficient of this input-output operation is lower than the efficient of a preceding input-output operation; Then the buffer size of this acquisition is less than the preceding buffer size that once obtains, if the efficient of this input-output operation equals the efficient of a preceding input-output operation, and the buffer size that once obtains before then the buffer size of this acquisition equals.
5. buffer area control method according to claim 4 is characterized in that, said operation note information comprises: the information consuming time of the data total amount information of this input-output operation, last buffer size information and this input-output operation;
Said according to said operation note information acquisition buffer size information, comprising:
Ratio according to the data total amount information of the product of said information consuming time and said last buffer size information and said this input-output operation; Obtain the data processing time information of this input-output operation, and according to the said buffer size information of said data processing time information acquisition.
6. buffer area control method according to claim 5 is characterized in that, and is said according to the said buffer size information of said data processing time information acquisition, comprising:
If said this data processing time is longer than the last secondary data processing time, then reduce current cache district size, the buffer size after will reducing is as said buffer size information;
If said this data processing time is shorter than the last secondary data processing time, then increase current cache district size, with the buffer size after increasing as said buffer size information;
If said this data processing time equates with the last secondary data processing time, then with current cache district size as said buffer size information.
7. a buffer area treatment facility is characterized in that, comprising:
First sending module is used for after input-output operation of completion, sending the buffer size computation requests to the buffer area opertaing device, carries the operation note information relevant with this input-output operation in the said buffer size computation requests;
First receiver module; Be used to receive the buffer size information of said buffer area opertaing device according to said operation note information acquisition and feedback; Wherein, If the efficient of this input-output operation is higher than the efficient of a preceding input-output operation; Then the buffer size of this acquisition is greater than the preceding buffer size that once obtains, if the efficient of this input-output operation is lower than the efficient of a preceding input-output operation, then the buffer size of this acquisition is less than the preceding buffer size that once obtains; If the efficient of this input-output operation equals the efficient of a preceding input-output operation, the buffer size that once obtains before then the buffer size of this acquisition equals;
First processing module is used for the size according to said buffer size information adjusting buffer area.
8. a buffer area opertaing device is characterized in that, comprising:
Second receiver module is used to receive the buffer size computation requests that the buffer area treatment facility sends after input-output operation of completion, carries the operation note information relevant with this input-output operation in the said buffer size computation requests;
Second processing module; Be used for according to said operation note information acquisition buffer size information; Wherein, if the efficient of this input-output operation is higher than the efficient of a preceding input-output operation, then the buffer size of this acquisition is greater than the preceding buffer size that once obtains; If the efficient of this input-output operation is lower than the efficient of a preceding input-output operation; Then the buffer size of this acquisition is less than the preceding buffer size that once obtains, if the efficient of this input-output operation equals the efficient of a preceding input-output operation, and the buffer size that once obtains before then the buffer size of this acquisition equals;
Second sending module is used for said buffer size information is sent to said buffer area treatment facility, so that said buffer area treatment facility is regulated the size of buffer area according to said buffer size information.
9. buffer area opertaing device according to claim 8 is characterized in that, said second processing module comprises:
First processing unit is used for the ratio according to the data total amount information of the product of information consuming time and last buffer size information and said this input-output operation, obtains the data processing time information of this input-output operation;
Second processing unit is used for according to the said buffer size information of said data processing time information acquisition.
10. a memory device is characterized in that, comprising: buffer area treatment facility as claimed in claim 7 and like claim 8 or 9 described buffer area opertaing devices.
CN200910091504.8A 2009-08-24 2009-08-24 Method and device for processing and controlling buffer cache and storage device thereof Active CN101630288B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910091504.8A CN101630288B (en) 2009-08-24 2009-08-24 Method and device for processing and controlling buffer cache and storage device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910091504.8A CN101630288B (en) 2009-08-24 2009-08-24 Method and device for processing and controlling buffer cache and storage device thereof

Publications (2)

Publication Number Publication Date
CN101630288A CN101630288A (en) 2010-01-20
CN101630288B true CN101630288B (en) 2012-12-26

Family

ID=41575404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910091504.8A Active CN101630288B (en) 2009-08-24 2009-08-24 Method and device for processing and controlling buffer cache and storage device thereof

Country Status (1)

Country Link
CN (1) CN101630288B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104281549B (en) * 2013-07-08 2017-07-21 联想(北京)有限公司 The method and device in Write post area is adjusted in a kind of UMS
CN107396342A (en) * 2017-07-31 2017-11-24 努比亚技术有限公司 Data transmission system, method, external equipment and mobile terminal
CN107318107A (en) * 2017-07-31 2017-11-03 努比亚技术有限公司 Data transmission system, method, external equipment and mobile terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1346198A (en) * 2000-09-30 2002-04-24 华为技术有限公司 Anti-loss treating method for IP speech sound data package
CN1671124A (en) * 2004-03-19 2005-09-21 清华大学 Communication terminal device, communication terminal receiving method, communication system, and gateway

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1346198A (en) * 2000-09-30 2002-04-24 华为技术有限公司 Anti-loss treating method for IP speech sound data package
CN1671124A (en) * 2004-03-19 2005-09-21 清华大学 Communication terminal device, communication terminal receiving method, communication system, and gateway

Also Published As

Publication number Publication date
CN101630288A (en) 2010-01-20

Similar Documents

Publication Publication Date Title
CN101201640B (en) Integrated circuit logic block operated by independent voltage supplied using single voltage
CN103049330B (en) A kind of trustship type distributed task dispatching method and system
CN103929366A (en) Flow control method and device and equipment
CN109150935A (en) A kind of document transmission method, device and mobile terminal
CN104102693A (en) Object processing method and device
CN101630288B (en) Method and device for processing and controlling buffer cache and storage device thereof
EP4113299A2 (en) Task processing method and device, and electronic device
CN102546207A (en) Distributed centralized scheduling upgrading method and system for network element software version
CN106406821A (en) Data processing request sorting method and device
CN105138679A (en) Data processing system and method based on distributed caching
CN102750364A (en) Method, compiler and system for distributing memory address space for image files
CN110300188A (en) Data transmission system, method and apparatus
CN109919826B (en) Graph data compression method for graph computation accelerator and graph computation accelerator
CN115827250A (en) Data storage method, device and equipment
TW201527912A (en) Control device, development device, and development program
CN101118524A (en) Dma transfer control apparatus
CN103840910A (en) Data transmission control method and apparatus
CN108647780B (en) Reconfigurable pooling operation module structure facing neural network and implementation method thereof
CN110287023A (en) Message treatment method, device, computer equipment and readable storage medium storing program for executing
CN105407059A (en) QoS scheduler and scheduling method for SCSI target device
CN113010786A (en) Information pushing method, device, equipment and storage medium
CN112667368A (en) Task data processing method and device
CN108121507B (en) Data processing method and device and electronic equipment
CN115271318A (en) Energy recovery scheduling method and device
CN109189581A (en) A kind of job scheduling method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: HUAWEI DIGITAL TECHNOLOGY (CHENGDU) CO., LTD.

Free format text: FORMER NAME: CHENGDU HUAWEI SYMANTEC TECHNOLOGIES CO., LTD.

CP01 Change in the name or title of a patent holder

Address after: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee after: HUAWEI DIGITAL TECHNOLOGIES (CHENG DU) Co.,Ltd.

Address before: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee before: CHENGDU HUAWEI SYMANTEC TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220905

Address after: No. 1899 Xiyuan Avenue, high tech Zone (West District), Chengdu, Sichuan 610041

Patentee after: Chengdu Huawei Technologies Co.,Ltd.

Address before: 611731 Qingshui River District, Chengdu hi tech Zone, Sichuan, China

Patentee before: HUAWEI DIGITAL TECHNOLOGIES (CHENG DU) Co.,Ltd.