CN112559390B - Data writing control method and storage device - Google Patents
Data writing control method and storage device Download PDFInfo
- Publication number
- CN112559390B CN112559390B CN202011436741.6A CN202011436741A CN112559390B CN 112559390 B CN112559390 B CN 112559390B CN 202011436741 A CN202011436741 A CN 202011436741A CN 112559390 B CN112559390 B CN 112559390B
- Authority
- CN
- China
- Prior art keywords
- cache
- water line
- storage device
- space
- storage space
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims abstract description 129
- 238000012545 processing Methods 0.000 claims description 26
- 238000004891 communication Methods 0.000 claims description 20
- 230000001934 delay Effects 0.000 claims description 3
- 230000006870 function Effects 0.000 description 22
- 238000010586 diagram Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 8
- 238000007726 management method Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000001680 brushing effect Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000013468 resource allocation Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0866—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
- G06F12/0871—Allocation or management of cache space
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0877—Cache access modes
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A data writing control method and a storage device, wherein the data writing control method comprises the following steps: when a data writing request for writing target data into a target storage space is detected, acquiring the lowest quota of page resources in a Cache corresponding to the target storage space; when the size of the page required to be occupied by the target data is larger than or equal to the lowest quota of the page resource, acquiring a reference water line corresponding to the target storage space and an actual water line of the Cache; when the actual water line is greater than or equal to the reference water line, determining a reference waiting time according to the reference water line, and after delaying the reference waiting time, distributing pages in the Cache for the target data. By adopting the embodiment of the invention, the stability of the data writing performance of the storage device is improved.
Description
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a data writing control method and a storage device.
Background
The ultimate goal of storage is to write data to the disk array; however, since the disk array response speed is generally not in line with the demands of the upper layer service, it is generally necessary to increase the write buffer. In addition, in the current general-purpose storage products, cache (Cache memory, located between CPU and memory, has a small size but a high speed, and is typically composed of SRAM) is generally used to improve the write performance of the disk array. Taking RAID5 as an example, after service data is written into the Cache, if the data in the Cache can be integrated into the whole data, the data is flushed down to the disk array. However, under the condition of more random write commands, the probability of brushing the whole data is reduced, so that the data in the Cache is increased; at this time, if the data in the Cache is not written into the disk array all the time, the Cache space is fully written, and the available page resources are reduced. Therefore, the common Cache space is provided with a high water level line and a low water level line. The so-called water line is an vivid concept; imagine the storage space of the Cache as a reservoir, the written data is equivalent to the water injected into the reservoir, and the water level of the reservoir gradually rises along with the increase of the written data; the high and low water lines are two preset values for indicating the occupied degree of the storage space of the Cache. When the occupied block number (the minimum allocation unit of the write Cache) in the Cache is higher than the high-level line, starting to brush the disk, and when the occupied block number is lower than the low-level line, stopping to brush the disk, so that service data continues to be accumulated in the write Cache until the high-level line is reached again.
At present, the storage device often has the problems of unstable performance and low performance, which seriously affects the practical application of clients. As the performance requirements of clients on storage devices are getting higher, how to ensure stable and reliable operation of the storage devices in various application environments is a problem to be solved in the art.
Disclosure of Invention
The invention provides a data writing control method and storage equipment, which are used for distributing page resources of a Cache through time delay of an actual water line higher than a reference water line, reducing fluctuation of data writing performance of the storage equipment and improving stability of the data writing performance of the storage equipment.
In a first aspect, an embodiment of the present invention provides a data writing control method, including:
when a data writing request for writing target data into a target storage space is detected, acquiring the lowest quota of page resources in a Cache corresponding to the target storage space;
when the size of the page required to be occupied by the target data is larger than or equal to the minimum quota, distributing page resources of the minimum quota for part of data in the target data;
acquiring a reference water line corresponding to the target storage space and an actual water line of the Cache;
and when the actual water line is greater than or equal to the reference water line, determining a reference waiting time according to the reference water line, and after delaying the reference waiting time, distributing pages in the Cache for unallocated data in the target data.
Therefore, in the embodiment of the invention, the storage device allocates the page resource of the lowest quota in the Cache for part of the data in the target data aiming at the target data which is to be written into the target storage space and occupies the page size larger than the lowest quota, and then delays to allocate the page in the Cache for the unallocated data of the target data when detecting that the actual water line in the Cache is higher than the reference water line corresponding to the target storage space.
With reference to the first aspect, in some possible implementations, the method further includes:
and when the actual water line is smaller than the reference water line, distributing pages in the Cache for unallocated data in the target data.
It can be seen that in an alternative embodiment of the present invention, when the actual water line is smaller than the reference water line, that is, when the available page resources of the Cache are still relatively abundant, the storage device allows the Cache to immediately Cache unallocated data in the target data, which is beneficial to ensuring the processing efficiency of the Cache.
With reference to the first aspect, in some possible implementations, after the allocating the pages in the page resources for unallocated data in the target data, the method further includes:
acquiring at least one historical actual water line of the Cache corresponding to the target storage space in a preset period;
when the water level line is larger than or equal to the historical actual water level line of the reference water level line in the at least one historical actual water level line, reducing the reference water level line to update the reference water level line corresponding to the target storage space;
and when the water level line existing in the at least one historical actual water level line is smaller than the historical actual water level line of the reference water level line, increasing the reference water level line to update the reference water level line corresponding to the target storage space.
It can be seen that in the alternative embodiment of the present invention, the reference water line corresponding to the target storage space is dynamically adjusted according to the historical actual water line of the Cache, which is favorable for improving the accuracy of data writing control.
With reference to the first aspect, in some possible implementations, the allocating a page in the Cache for unallocated data in the target data includes:
acquiring the size of an idle page in the Cache;
when the size of the free page is larger than or equal to the size of the page which is required to be occupied by unallocated data in the target data, distributing the page in the Cache for the unallocated data in the target data;
and when the size of the free page is smaller than the size of the page which is occupied by unallocated data in the target data, placing the data writing request into a waiting queue, and when the size of the free page in the Cache is detected to be larger than or equal to the size of the page which is occupied by the target data, allocating the page in the Cache for the unallocated data in the target data.
With reference to the first aspect, in some possible implementations, the reference water line is in a proportional relationship with the waiting duration;
the target storage space comprises any one of the following:
logical unit number LUN, volume and file system corresponding to the disk array.
In a second aspect, an embodiment of the present invention provides a storage device, where the apparatus has a function of implementing the behavior of the storage device in the method design described above. The functions may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
In one possible design, a storage device includes a processor configured to support the storage device to perform corresponding functions in the above-described methods, and a communication interface. Further, the storage device may also include a memory including a Cache memory and a disk array for coupling with the processor, which holds the program instructions and data necessary for the storage device.
In a third aspect, embodiments of the present invention provide a computer-readable storage medium storing program code. The program code described above includes instructions for performing some or all of the steps described in any of the methods of the first aspect of the embodiments of the present invention.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a process of writing data into a Cache by a storage device disclosed in a prior art solution;
FIG. 2 is a schematic diagram of a fluctuation in service performance of a data write service of a storage device disclosed in a prior art solution;
FIG. 3A is a schematic flow chart of a data write control method according to an embodiment of the present invention;
FIG. 3B is a schematic diagram illustrating a data write control method according to an embodiment of the present invention;
FIG. 4A is a block diagram of a unit constitution of a memory device according to an embodiment of the present invention;
FIG. 4B is a schematic diagram of a memory device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another storage device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The following describes a scheme for unified level control for Cache in the prior art. In the existing scheme, page resources of the Cache (a Cache space in the Cache is embodied in a page unit) are allocated according to the high water level and the low water level, and the strategy of page resource allocation is applicable to storage spaces of the types of logical unit numbers (Logical Unit Number, LUNs), volume, file systems and the like in storage equipment. Referring to fig. 1, fig. 1 is a schematic diagram of a process of writing data into a Cache by a storage device in the prior art, when the storage device detects a write request for target data, firstly, a free page resource in the Cache is obtained, secondly, whether the free page resource is larger than a reference page resource of the target data is judged, if yes, a page resource in the free page resource is allocated for the target data, and if not, the write request is put into a waiting queue.
Therefore, in the prior art, all page resources of the Cache are allocated according to the rule of on-the-fly allocation and on-the-fly allocation, and when part of services (such as data storage services of the LUN, but not limited to the LUN) of the storage device cannot acquire the page resources, performance fluctuation occurs. If a network delay or a disk performance drop occurs in a back end IO path (below a Cache) of a certain LUN in a certain period of time, the write page data cannot be quickly downloaded, and the Cache continues to allocate according to a unified rule, and no rule is waited to allocate resources, so that an actual water line of the Cache is quickly raised, each LUN cannot acquire write page resources in real time and the performance drops, when the high water line of the Cache is reached, the storage device starts to quickly brush all page data in the Cache, after the quick brush, the actual water line in the Cache quickly drops to a low water line, each LUN can acquire write page resources and the performance quickly rises, so that service performance severely fluctuates, an example diagram of service performance fluctuation is shown in fig. 2, wherein the IOPS is the number of read/write operations per second (Input/Output Operations Per Second).
Based on the above prior art, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
Referring to fig. 3A and fig. 3B, fig. 3A is a flow chart of a data writing control method according to an embodiment of the present invention, and fig. 3B is a process chart of a data writing control method according to an embodiment of the present invention. As shown in the figure, the data writing control method comprises the following steps:
s301, when a storage device detects a data writing request for writing target data into a target storage space, acquiring the lowest quota of page resources in a Cache corresponding to the target storage space;
the storage device may be, for example, a computer device with a Cache, a storage device, a base station, a wearable device, or other electronic devices.
Wherein the target storage space comprises any one of the following:
logical unit number LUN, volume and file system corresponding to the disk array.
S302, when the size of a page required to be occupied by the target data is larger than the lowest quota, the storage device allocates page resources of the lowest quota for part of data in the target data;
s303, the storage device acquires a reference water line corresponding to the target storage space and an actual water line of the Cache;
s304, when the actual water line is greater than or equal to the reference water line, the storage device determines a reference waiting time according to the reference water line, and after delaying the reference waiting time, allocates pages in the Cache for unallocated data in the target data.
Wherein the reference water line and the waiting time length are in a proportional relation; when the reference water line is larger, a larger waiting time is set, so that the service pressure of the Cache can be relieved, the severe fluctuation of performance caused by the fact that the actual water line of the Cache exceeds the high water line for brushing is avoided, when the reference water line is smaller, a smaller waiting time is set, the service processing efficiency of the Cache is considered, and the service processing instantaneity of the Cache is prevented from being excessively influenced due to the waiting time process.
Therefore, in the embodiment of the invention, the storage device allocates the page resource of the lowest quota in the Cache for part of the data in the target data aiming at the target data which is to be written into the target storage space and occupies the page size larger than the lowest quota, and then delays to allocate the page in the Cache for the unallocated data of the target data when detecting that the actual water line in the Cache is higher than the reference water line corresponding to the target storage space.
In one example, the storage device further performs the following operations:
and when the actual water line is smaller than the reference water line, the storage equipment allocates pages in the Cache for unallocated data in the target data.
In this example, when the actual water line is smaller than the reference water line, that is, the available page resources of the Cache are still relatively abundant, the storage device allows the Cache to immediately Cache unallocated data in the target data, which is beneficial to ensuring the processing efficiency of the Cache.
In one example, after the allocating the pages in the page resources for unallocated data in the target data, the storage device further performs:
acquiring at least one historical actual water line of the Cache corresponding to the target storage space in a preset period;
when the water level line is larger than or equal to the historical actual water level line of the reference water level line in the at least one historical actual water level line, reducing the reference water level line to update the reference water level line corresponding to the target storage space;
and when the water level line existing in the at least one historical actual water level line is smaller than the historical actual water level line of the reference water level line, increasing the reference water level line to update the reference water level line corresponding to the target storage space.
In this example, the reference water level corresponding to the target storage space is dynamically adjusted according to the historical actual water level of the Cache, that is, when the historical actual water level is greater than the reference water level, the reference water level is reduced to write the service with as much delay data as possible, the performance burden of the Cache is relieved, and when the historical actual water level is smaller than the reference water level, the reference water level is increased to buffer the data of most data writing services in real time, so that the service efficiency of the Cache is maintained, and therefore, the accuracy and the intelligence of the data writing control of the storage device are improved by dynamically adjusting the reference water level based on the actual service pressure of the Cache.
In one example, the specific implementation manner of the storage device to allocate the page in the Cache for the unallocated data in the target data is:
acquiring the size of an idle page in the Cache;
when the size of the free page is larger than or equal to the size of the page which is required to be occupied by unallocated data in the target data, distributing the page in the Cache for the unallocated data in the target data;
and when the size of the free page is smaller than the size of the page which is occupied by unallocated data in the target data, placing the data writing request into a waiting queue, and when the size of the free page in the Cache is detected to be larger than or equal to the size of the page which is occupied by the target data, allocating the page in the Cache for the unallocated data in the target data.
In one example, the storage device further performs the following operations:
and when the size of the page occupied by the target data is smaller than or equal to the minimum quota, the storage device directly allocates the page resource in the Cache for the target data.
In this example, since different storage spaces in the storage device can be preset to correspond to different minimum quotas, the basic page resource requirement of each storage space can be ensured, and the problem that the storage space cannot acquire page resources in the Cache for a long time to influence service performance is avoided.
The foregoing description of the embodiments of the present invention has been presented primarily in terms of a memory device. It will be appreciated that the storage device, in order to carry out the functions described above, comprises corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The embodiment of the invention can divide the functional units of the storage device according to the method example, for example, each functional unit can be divided corresponding to each function, or two or more functions can be integrated in one processing unit. The integrated units may be implemented in hardware or in software functional units. It should be noted that, in the embodiment of the present invention, the division of the units is schematic, which is merely a logic function division, and other division manners may be implemented in actual practice.
In case of an integrated unit, fig. 4A shows a schematic diagram of one possible structure of the memory device involved in the above-described embodiment. The storage device 400 includes: a processing unit 402 and a communication unit 403. The processing unit 402 is configured to control and manage actions of the storage device, for example, the processing unit 402 is configured to support the storage device to perform steps S301 to S304 in fig. 3A and/or other processes for the techniques described herein. The communication unit 403 is used to support communication of the storage device with other devices. The storage device may further comprise a storage unit 401 for storing program code and data of the storage device.
The processing unit 402 may be a processor or a controller, such as a central processing unit (Central Processing Unit, CPU), a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an Application-specific integrated circuit (ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that performs the function of a computation, e.g., a combination comprising one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
The communication unit 403 may be a communication interface, a transceiver circuit, etc., where the communication interface is collectively referred to and may include one or more interfaces, for example, may include: an interface between the storage device and the slave server, and/or other interfaces. The storage unit 401 may be a memory.
When the processing unit 402 is a processor, the communication unit 403 is a communication interface, and the storage unit 401 is a memory, a storage device according to an embodiment of the present invention may be a storage device shown in fig. 4B.
Specifically, when detecting a data writing request for writing target data into a target storage space, the processing unit 402 is configured to obtain, by using the communication unit 403, a lowest quota of a page resource in a Cache corresponding to the target storage space; the method is also used for distributing page resources of the lowest quota for part of data in the target data when the size of the page required to be occupied by the target data is larger than or equal to the lowest quota; the method is also used for acquiring a reference water line corresponding to the target storage space and an actual water line of the Cache through the communication unit 403; and the method is also used for determining a reference waiting time according to the reference water line when the actual water line is larger than or equal to the reference water line, and distributing pages in the Cache for unallocated data in the target data after delaying the reference waiting time.
In one example, the processing unit 402 is further configured to allocate a page in the Cache for unallocated data in the target data when the actual water line is smaller than the reference water line.
In one example, after allocating a page in the page resource for unallocated data in the target data, the processing unit 402 is further configured to obtain at least one historical actual water line of the Cache corresponding to the target storage space in a preset period; the method is also used for reducing the reference water level line to update the reference water level line corresponding to the target storage space when the water level line is greater than or equal to the historical actual water level line of the reference water level line in the at least one historical actual water level line; and the method is also used for increasing the reference water level line to update the reference water level line corresponding to the target storage space when the water level line existing in the at least one historical actual water level line is smaller than the historical actual water level line of the reference water level line.
In one example, in the aspect of allocating pages in the Cache for unallocated data in the target data, the processing unit 402 is specifically configured to: acquiring the size of an idle page in the Cache; and when the size of the free page is larger than or equal to the size of the page required to be occupied by unallocated data in the target data, allocating the page in the Cache for the unallocated data in the target data; and when the size of the free page is smaller than the size of the page occupied by unallocated data in the target data, placing the data writing request into a waiting queue, and when the size of the free page in the Cache is detected to be larger than or equal to the size of the page occupied by the target data, allocating the page in the Cache for the unallocated data in the target data.
In one example, the reference water line is in a proportional relationship with the waiting period;
the target storage space comprises any one of the following: logical unit number LUN, volume and file system corresponding to the disk array.
Referring to fig. 4B, the storage device 410 includes: processor 412, communication interface 413, memory 411. Optionally, the memory device 410 may also include a bus 414. Wherein, the communication interface 413, the processor 412 and the memory 411 may be connected to each other through the bus 414, the memory 411 includes a Cache and a Disk array, and the Disk array may include, for example, a serial connection small computer system interface (Serial Attached Small Computer System Interface, SAS) hard Disk, a Solid State Disk (SSD), and the like; bus 414 may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus 414 may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in FIG. 4B, but not only one bus or one type of bus.
The storage device shown in fig. 4A or fig. 4B may also be understood as an apparatus for a storage device, which is not limited by the embodiment of the present invention.
The embodiment of the present invention further provides another storage device, as shown in fig. 5, for convenience of explanation, only the portion relevant to the embodiment of the present invention is shown, and specific technical details are not disclosed, please refer to the method portion of the embodiment of the present invention. The storage device may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant ), a POS (Point of Sales), a vehicle-mounted computer, and the like, taking the storage device as an example of the mobile phone:
fig. 5 is a block diagram showing a part of the structure of a mobile phone related to a storage device provided by an embodiment of the present invention. Referring to fig. 5, the mobile phone includes: radio Frequency (RF) circuitry 510, memory 520, input unit 530, display unit 540, sensor 550, audio circuitry 560, wireless fidelity (Wireless Fidelity, wiFi) module 570, processor 580, power supply 550, and the like. Those skilled in the art will appreciate that the handset configuration shown in fig. 5 is not limiting of the handset and may include more or fewer components than shown, or may combine certain components, or may be arranged in a different arrangement of components.
The following describes the components of the mobile phone in detail with reference to fig. 5:
the RF circuitry 510 may be used for the reception and transmission of information. Typically, the RF circuitry 510 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, the RF circuitry 510 may also communicate with networks and other devices via wireless communications. The wireless communications may use any communication standard or protocol including, but not limited to, global system for mobile communications (Global System of Mobile communication, GSM), general packet radio service (General Packet Radio Service, GPRS), code division multiple access (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE), email, short message service (Short Messaging Service, SMS), and the like.
The memory 520 may be used to store software programs and modules, and the processor 580 performs various functional applications and data processing of the cellular phone by executing the software programs and modules stored in the memory 520. The memory 520 may mainly include a Cache memory and a disk array, where the disk array includes a storage program area and a storage data area, where the storage program area may store an operating system, an application program required by at least one function (determination of an average playing duration, etc.), and so on; the storage data area may store data created according to the use of the cellular phone (such as a historical play time period, etc.), and the like. In addition, memory 520 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the handset. Specifically, the input unit 530 may include a fingerprint recognition module 531 and other input devices 532. The fingerprint recognition module 531 can collect fingerprint data of a user thereon. The input unit 530 may include other input devices 532 in addition to the fingerprint recognition module 531. In particular, other input devices 532 may include, but are not limited to, one or more of a touch screen, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
The display unit 540 may be used to display information input by a user or information provided to the user and various menus of the mobile phone. The display unit 540 may include a display 541, and the display 541 may be optionally configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like. Although in fig. 5, the fingerprint recognition module 531 and the display 541 are two independent components for implementing the input and output functions of the mobile phone, in some embodiments, the fingerprint recognition module 531 and the display 541 may be integrated to implement the input and display functions of the mobile phone.
The handset may also include at least one sensor 550, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display 541 according to the brightness of ambient light, and a proximity sensor that may turn off the display 541 and/or the backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with the handset are not described in detail herein.
WiFi belongs to a short-distance wireless transmission technology, and a mobile phone can help a user to send and receive emails, browse webpages, access streaming media and the like through a WiFi module 570, so that wireless broadband Internet access is provided for the user. Although fig. 5 shows a WiFi module 570, it is understood that it does not belong to the necessary constitution of the handset, and can be omitted entirely as required within the scope of not changing the essence of the invention.
The handset further includes a power supply 550 (e.g., a battery) for powering the various components, which may be logically connected to the processor 580 via a power management system, such as a power management system for performing functions such as charge, discharge, and power consumption management.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which will not be described herein.
In the embodiment shown in fig. 3, the flow of the method of each step may be implemented based on the structure of the mobile phone.
In the foregoing embodiment shown in fig. 4A, the functions of each unit may be implemented based on the structure of the mobile phone.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, or may be embodied in software instructions executed by a processor. The software instructions may be comprised of corresponding software modules that may be stored in random access Memory (Random Access Memory, RAM), flash Memory, read Only Memory (ROM), erasable programmable Read Only Memory (Erasable Programmable ROM), electrically Erasable Programmable Read Only Memory (EEPROM), registers, hard disk, a removable disk, a compact disc Read Only Memory (CD-ROM), or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. In addition, the ASIC may be located in a gateway device or mobility management network element. The processor and the storage medium may reside as discrete components in a gateway device or mobility management network element.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the embodiments of the present invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The foregoing detailed description of the embodiments of the present invention further illustrates the purposes, technical solutions and advantageous effects of the embodiments of the present invention, and it should be understood that the foregoing description is only a specific implementation of the embodiments of the present invention, and is not intended to limit the scope of the embodiments of the present invention, and any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the embodiments of the present invention should be included in the scope of the embodiments of the present invention.
Claims (21)
1. A data writing control method, the method comprising:
the storage device receives a write-in request for accessing a target storage space, wherein the target storage space is a storage space in the storage device;
the storage device acquires a reference water line corresponding to the target storage space and an actual water line of a Cache memory in the storage device;
and when the actual water line is larger than or equal to the reference water line, the storage equipment delays to allocate the space in the Cache for the write-in request.
2. The method according to claim 1, wherein the method further comprises:
and when the actual water line is smaller than the reference water line, distributing the space in the Cache for the write-in request.
3. The method according to claim 1 or 2, wherein the obtaining the reference water line corresponding to the target storage space and the actual water line of the Cache in the storage device includes:
when the target data written by the writing request is determined to be larger than the residual space of the Cache space pre-allocated for the target storage space, a reference water line corresponding to the target storage space and an actual water line of the Cache in the storage device are obtained.
4. The method of claim 1 or 2, wherein the delaying the allocation of space in the Cache for the write request comprises:
and after delaying for a preset time length, distributing the space in the Cache for the write-in request.
5. The method of claim 4, wherein the reference water line is in a proportional relationship with the predetermined time period.
6. The method of claim 3, wherein the delaying the allocation of space in the Cache for the write request comprises:
and after delaying for a preset time length, distributing the space in the Cache for the write-in request.
7. The method of claim 6, wherein the reference water line is in a proportional relationship to the predetermined time period.
8. A method according to claim 3, wherein the target storage space comprises any one of:
logical unit number LUN, volume and file system corresponding to the disk array.
9. The method of claim 4, wherein the target storage space comprises any one of:
logical unit number LUN, volume and file system corresponding to the disk array.
10. The method of any one of claims 1, 2, and 5-7, wherein the target storage space comprises any one of:
logical unit number LUN, volume and file system corresponding to the disk array.
11. A memory device, comprising: a processing unit and a communication unit,
the communication unit is used for receiving a write-in request for accessing a target storage space, wherein the target storage space is a storage space in the storage device;
the processing unit is used for acquiring a reference water line corresponding to the target storage space and an actual water line of a Cache memory in the storage device; and when the actual water line is larger than or equal to the reference water line, delaying to allocate the space in the Cache for the write-in request.
12. The storage device of claim 11, wherein the processing unit is further configured to:
and when the actual water line is smaller than the reference water line, distributing the space in the Cache for the write-in request.
13. The storage device according to claim 11 or 12, wherein, when the processing unit is configured to obtain the reference water line corresponding to the target storage space and the actual water line of the Cache in the storage device, the processing unit is specifically configured to determine that the target data written by the write request is greater than the remaining space of the Cache space pre-allocated for the target storage space, obtain the reference water line corresponding to the target storage space and the actual water line of the Cache in the storage device.
14. The storage device according to claim 11 or 12, wherein, in the method for delaying the allocation of space in the Cache for the write request, the processing unit is specifically configured to:
and after delaying for a preset time length, distributing the space in the Cache for the write-in request.
15. The storage device of claim 14, wherein the reference water line is in a proportional relationship to the predetermined time period.
16. The storage device according to claim 13, wherein, in the method for delaying allocation of space in the Cache for the write request, the processing unit is specifically configured to:
and after delaying for a preset time length, distributing the space in the Cache for the write-in request.
17. The storage device of claim 16, wherein the reference water line is in a proportional relationship to the predetermined time period.
18. The storage device of claim 13, wherein the target storage space comprises any one of:
logical unit number LUN, volume and file system corresponding to the disk array.
19. The storage device of claim 14, wherein the target storage space comprises any one of:
logical unit number LUN, volume and file system corresponding to the disk array.
20. The storage device of any one of claims 11, 12 and 15-17, wherein the target storage space comprises any one of:
logical unit number LUN, volume and file system corresponding to the disk array.
21. A memory device, comprising: a processor and a memory;
the memory stores executable program code;
the processor is configured to invoke the executable program code in the memory to perform the method of any of claims 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011436741.6A CN112559390B (en) | 2016-09-23 | 2016-09-23 | Data writing control method and storage device |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011436741.6A CN112559390B (en) | 2016-09-23 | 2016-09-23 | Data writing control method and storage device |
CN201610844594.3A CN107870874B (en) | 2016-09-23 | 2016-09-23 | Data write-in control method and storage device |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610844594.3A Division CN107870874B (en) | 2016-09-23 | 2016-09-23 | Data write-in control method and storage device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112559390A CN112559390A (en) | 2021-03-26 |
CN112559390B true CN112559390B (en) | 2023-06-06 |
Family
ID=61751096
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610844594.3A Active CN107870874B (en) | 2016-09-23 | 2016-09-23 | Data write-in control method and storage device |
CN202011436741.6A Active CN112559390B (en) | 2016-09-23 | 2016-09-23 | Data writing control method and storage device |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610844594.3A Active CN107870874B (en) | 2016-09-23 | 2016-09-23 | Data write-in control method and storage device |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN107870874B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110569203B (en) * | 2019-08-09 | 2021-11-30 | 华为技术有限公司 | Input control method and device and storage equipment |
CN110908604B (en) * | 2019-11-08 | 2021-06-29 | 浪潮电子信息产业股份有限公司 | A request processing delay adjustment method, device, electronic device and storage medium |
CN111680065B (en) * | 2020-05-25 | 2023-11-10 | 泰康保险集团股份有限公司 | Processing system, equipment and method for hysteresis data in stream type calculation |
CN112306904B (en) * | 2020-11-20 | 2022-03-29 | 新华三大数据技术有限公司 | Cache data disk refreshing method and device |
CN115562617B (en) * | 2022-11-30 | 2023-03-03 | 苏州浪潮智能科技有限公司 | Depth setting method, system and electronic equipment of a FIFO memory |
CN118981506B (en) * | 2024-10-21 | 2025-01-21 | 平凯星辰(北京)科技有限公司 | Data storage method, reading method, device and electronic device |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101957800A (en) * | 2010-06-12 | 2011-01-26 | 福建星网锐捷网络有限公司 | Multichannel cache distribution method and device |
CN102129876A (en) * | 2011-04-07 | 2011-07-20 | 杭州华三通信技术有限公司 | Data storage method and equipment for video monitoring system |
CN102693164A (en) * | 2012-05-03 | 2012-09-26 | 中国石油集团川庆钻探工程有限公司地球物理勘探公司 | Equipment and method for preventing buffer overflow |
CN103064639A (en) * | 2012-12-28 | 2013-04-24 | 华为技术有限公司 | Method and device for storing data |
CN103345368A (en) * | 2013-07-18 | 2013-10-09 | 四川九成信息技术有限公司 | Data caching method in buffer storage |
CN103823765A (en) * | 2014-02-26 | 2014-05-28 | 浙江宇视科技有限公司 | Method and device for dynamic regulation of cache refreshing strategy |
US8959305B1 (en) * | 2012-06-29 | 2015-02-17 | Emc Corporation | Space reclamation with virtually provisioned devices |
CN105159612A (en) * | 2015-09-06 | 2015-12-16 | 浪潮(北京)电子信息产业有限公司 | Distribution method of free space of disk |
CN105446888A (en) * | 2014-05-30 | 2016-03-30 | 华为技术有限公司 | Data transferring method between storage devices, controller, and storage system |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5210829A (en) * | 1990-12-12 | 1993-05-11 | Digital Equipment Corporation | Adjustable threshold for buffer management |
US6252849B1 (en) * | 1998-06-30 | 2001-06-26 | Sun Microsystems, Inc. | Flow control using output port buffer allocation |
CN100407696C (en) * | 2005-01-25 | 2008-07-30 | 华为技术有限公司 | Method for IP fax gateway to transmit message data |
CN100462940C (en) * | 2007-01-30 | 2009-02-18 | 金蝶软件(中国)有限公司 | Method and apparatus for cache data in memory |
CN101340358B (en) * | 2007-07-04 | 2011-04-20 | 鼎桥通信技术有限公司 | Flow control method, system and flow control entity |
CN102075436B (en) * | 2011-02-10 | 2014-09-17 | 华为数字技术(成都)有限公司 | Ethernet, and data transmitting method and device thereof |
CN102307224A (en) * | 2011-05-17 | 2012-01-04 | 华为软件技术有限公司 | Method and device for realizing service isolation in cloud computing system, and cloud server |
CN103136115B (en) * | 2011-11-23 | 2015-08-19 | 英业达集团(天津)电子技术有限公司 | The method and system of request access zero-copy high-speed cache |
CN102436356B (en) * | 2011-12-12 | 2014-12-24 | 华为数字技术(成都)有限公司 | Method and device for distributing writing page space |
US9292448B2 (en) * | 2013-09-19 | 2016-03-22 | Google Inc. | Dynamic sizing of memory caches |
CN104090731B (en) * | 2014-07-09 | 2017-08-15 | 浙江宇视科技有限公司 | A kind of method and apparatus of automatic carry out Cache refresh parameter regulations |
CN104182361B (en) * | 2014-08-20 | 2018-06-26 | 北京国双科技有限公司 | Data buffer storage processing method and processing device |
-
2016
- 2016-09-23 CN CN201610844594.3A patent/CN107870874B/en active Active
- 2016-09-23 CN CN202011436741.6A patent/CN112559390B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101957800A (en) * | 2010-06-12 | 2011-01-26 | 福建星网锐捷网络有限公司 | Multichannel cache distribution method and device |
CN102129876A (en) * | 2011-04-07 | 2011-07-20 | 杭州华三通信技术有限公司 | Data storage method and equipment for video monitoring system |
CN102693164A (en) * | 2012-05-03 | 2012-09-26 | 中国石油集团川庆钻探工程有限公司地球物理勘探公司 | Equipment and method for preventing buffer overflow |
US8959305B1 (en) * | 2012-06-29 | 2015-02-17 | Emc Corporation | Space reclamation with virtually provisioned devices |
CN103064639A (en) * | 2012-12-28 | 2013-04-24 | 华为技术有限公司 | Method and device for storing data |
CN103345368A (en) * | 2013-07-18 | 2013-10-09 | 四川九成信息技术有限公司 | Data caching method in buffer storage |
CN103823765A (en) * | 2014-02-26 | 2014-05-28 | 浙江宇视科技有限公司 | Method and device for dynamic regulation of cache refreshing strategy |
CN105446888A (en) * | 2014-05-30 | 2016-03-30 | 华为技术有限公司 | Data transferring method between storage devices, controller, and storage system |
CN105159612A (en) * | 2015-09-06 | 2015-12-16 | 浪潮(北京)电子信息产业有限公司 | Distribution method of free space of disk |
Non-Patent Citations (2)
Title |
---|
Tian Luo等.S-CAVE: Effective SSD caching to improve virtual machine storage performance.《IEEE》.2013,103-112. * |
王剑宇.以太网流控机制及其基于VSC7323的实现.《电子产品世界》.2008,97-100. * |
Also Published As
Publication number | Publication date |
---|---|
CN107870874A (en) | 2018-04-03 |
CN112559390A (en) | 2021-03-26 |
CN107870874B (en) | 2020-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112559390B (en) | Data writing control method and storage device | |
CN106055408B (en) | A kind of application control method and mobile terminal | |
CN107368400A (en) | CPU monitoring method, device, computer readable storage medium and mobile terminal | |
US11099898B2 (en) | Method for allocating memory resources and terminal device | |
WO2019041280A1 (en) | Application resource recommendation method and related device | |
WO2017206901A1 (en) | Process control method and related device | |
CN107766139A (en) | Application management method and device | |
KR20190101983A (en) | Data transmission method and equipment | |
CN106815079B (en) | Hot application control method and mobile terminal | |
WO2017206903A1 (en) | Application control method and related device | |
CN107220344B (en) | Document processing methods and related products | |
WO2019072179A1 (en) | Application running control method and apparatus | |
CN106095567B (en) | A method for allocating installation tasks and a mobile terminal | |
CN106776041B (en) | Data processing method and device | |
CN112261634B (en) | Bluetooth transmission control method and device, terminal equipment and storage medium | |
CN105302733B (en) | A kind of method and device of Memory Allocation | |
CN110045811A (en) | Applied program processing method and device, electronic equipment, computer readable storage medium | |
CN109992361B (en) | Application freezing method, device, terminal and computer-readable storage medium | |
CN106802828A (en) | Applied data processing method and device | |
CN106791152B (en) | Communication method and mobile terminal | |
CN106896896B (en) | Power saving method, device and electronic device | |
CN106790361B (en) | Data processing method and device | |
CN105302741A (en) | Cache control method and apparatus | |
CN114296641B (en) | Incremental file transmission method, device, electronic equipment and readable storage medium | |
CN106325994B (en) | A kind of method and terminal device for controlling write request |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20220906 Address after: 611731 No. 1899, Xiyuan Avenue, high tech Zone (West District), Chengdu, Sichuan Applicant after: Chengdu Huawei Technologies Co.,Ltd. Address before: 611731 Qingshui River District, Chengdu hi tech Zone, Sichuan, China Applicant before: HUAWEI DIGITAL TECHNOLOGIES (CHENG DU) Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |