CN107870874B - Data write-in control method and storage device - Google Patents

Data write-in control method and storage device Download PDF

Info

Publication number
CN107870874B
CN107870874B CN201610844594.3A CN201610844594A CN107870874B CN 107870874 B CN107870874 B CN 107870874B CN 201610844594 A CN201610844594 A CN 201610844594A CN 107870874 B CN107870874 B CN 107870874B
Authority
CN
China
Prior art keywords
water level
page
level line
data
cache
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
CN201610844594.3A
Other languages
Chinese (zh)
Other versions
CN107870874A (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 Digital Technologies Chengdu 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 Digital Technologies Chengdu Co Ltd filed Critical Huawei Digital Technologies Chengdu Co Ltd
Priority to CN201610844594.3A priority Critical patent/CN107870874B/en
Priority to CN202011436741.6A priority patent/CN112559390B/en
Publication of CN107870874A publication Critical patent/CN107870874A/en
Application granted granted Critical
Publication of CN107870874B publication Critical patent/CN107870874B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Abstract

A data write control method and a storage device, wherein the data write control method comprises the following steps: when a data write-in request for writing target data into a target storage space is detected, acquiring the lowest quota of page resources in a Cache of a Cache corresponding to the target storage space; when the size of a page occupied by target data is larger than or equal to the minimum quota of page resources, acquiring a reference water line corresponding to a target storage space and an actual water line of a Cache; and when the actual water level line is greater than or equal to the reference water level line, determining reference waiting time according to the reference water level line, and after delaying the reference waiting time, distributing a page in the Cache for the target data. By adopting the embodiment of the invention, the stability of the data writing performance of the storage equipment is favorably improved.

Description

Data write-in control method and storage device
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a data write control method and a storage device.
Background
The ultimate goal of storage is to write data to the disk array; however, since the response speed of the disk array cannot generally keep up with the requirements of upper-layer services, the write cache is generally required to be increased. In general storage products at present, Cache (a Cache memory, which is located between a CPU and a memory, has a small scale but a high speed; and is generally composed of an SRAM) is generally used to improve the write performance of a disk array. Taking RAID5 as an example, after the service data is written to the Cache, if the data in the Cache can be made into a whole piece of data, the data is printed to the disk array. Under the condition of more random write commands, the brushing opportunity of 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 full, and the available page resources are reduced. Therefore, the high and low water lines are arranged in the general Cache space. The so-called water line is a notion of image; the storage space of the Cache is imagined as a reservoir, the written data is equivalent to 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 bit lines are two preset values for indicating the occupied degree of the storage space of the Cache. Starting to brush the disk when the occupied block number (block, the minimum allocation unit of the write Cache) in the Cache is higher than the high water line, and stopping brushing the disk when the occupied block number is lower than the low water line so as to enable the service data to be continuously accumulated in the write Cache until the high water 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 customers. With the increasing performance requirements of clients on storage devices, how to ensure stable and reliable operation of storage devices in various application environments is an urgent problem to be solved in the field.
Disclosure of Invention
The invention provides a data write-in control method and storage equipment, which are used for distributing page resources of Cache when an actual water level line is higher than a reference water level line in time delay, reducing data write-in performance fluctuation of the storage equipment and improving the stability of the data write-in 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 write-in request for writing target data into a target storage space is detected, acquiring the lowest quota of page resources in a Cache of 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, allocating the page resource of the lowest quota for partial data in the target data;
acquiring a reference water level line corresponding to the target storage space and an actual water level line of the Cache;
and when the actual water level line is greater than or equal to the reference water level line, determining a reference waiting time length according to the reference water level line, and after delaying the reference waiting time length, distributing the page in the Cache for unallocated data in the target data.
Therefore, in the embodiment of the invention, for target data to be written into a target storage space and occupying a page size larger than the minimum quota, a storage device firstly allocates the lowest quota of page resources in a Cache to part of the data in the target data, and secondly, when detecting that an actual water line in the Cache is higher than a reference water line corresponding to the target storage space, allocates a page in the Cache to unallocated data of the target data in a delayed manner.
With reference to the first aspect, in some possible implementations, the method further includes:
and when the actual water level line is smaller than the reference water level line, distributing the page in the Cache for the unallocated data in the target data.
It can be seen that, in the optional embodiment of the present invention, when the actual water level line is smaller than the reference water level line, that is, under the condition that 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 page in the page resource to the 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 within a preset time period;
when a water level line is greater than or equal to the historical actual water level line of the reference 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 exists in the at least one historical actual water level line and 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 the optional embodiment of the invention, the reference water level line corresponding to the target storage space is dynamically adjusted according to the historical actual water level line of the Cache, which is favorable for improving the accuracy of data write-in control.
With reference to the first aspect, in some possible implementation manners, the allocating a page in the Cache to 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 a page occupied by unallocated data in the target data, allocating the page in the Cache to 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 the unallocated data in the target data, putting the data write-in 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.
With reference to the first aspect, in some possible implementations, the reference water level line is in a direct proportional relationship with the waiting time duration;
the target storage space comprises any one of the following:
the logical unit number LUN, the Volume and the 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 a behavior of the storage device in the above method design. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In one possible design, the storage device includes a processor and a communication interface, and the processor is configured to support the storage device to perform the corresponding functions of the above method. Further, the storage device may also include memory, including Cache memory and disk arrays, for coupling to the processor, which holds the necessary program instructions and data for the storage device.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium storing program codes. The program code comprises instructions for carrying out 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 present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a process of writing data into a Cache by a storage device disclosed in the prior art;
FIG. 2 is a schematic diagram of service performance fluctuation of a data write service of a storage device disclosed in the prior art solution;
fig. 3A is a flowchart illustrating a data writing control method according to an embodiment of the present invention;
FIG. 3B is a process diagram of a data write control method according to an embodiment of the present invention;
FIG. 4A is a block diagram of the components of a memory device according to an embodiment of the present invention;
fig. 4B is a schematic structural diagram of a storage 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 to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively 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 can be included in at least one embodiment of the invention. The appearances of the phrase 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. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The following is a description of a scheme for performing unified level control on Cache in the prior art. In the existing scheme, page resources of a Cache (a Cache space in the Cache is embodied by taking a page as a Unit) are allocated according to high and low water levels, and a policy of the allocation of the page resources is suitable for storage spaces of Logical Unit Numbers (LUNs), volumes, file systems and other types in a storage device. Referring to fig. 1, fig. 1 is a schematic diagram of a process in which a storage device writes data into a Cache in the prior art, when the storage device detects a write request for target data, first, obtaining free page resources in the Cache, then, determining whether the free page resources are greater than reference page resources of the target data, if so, allocating page resources in the free page resources for the target data, and if not, placing the write request into a waiting queue.
It can be seen that, in the prior art, since all page resources of the Cache are allocated according to the principle of allocation if any and allocation if no, performance fluctuation occurs when part of services (such as data storage services of LUNs, but not limited to LUNs) of the storage device cannot acquire the page resources. If in a certain time period, the write page data cannot be downloaded quickly due to the fact that network delay or disk performance degradation occurs in the rear-end IO path (below the Cache) of a certain LUN, the Cache continues to allocate resources according to the unified rule of presence, and the rule of waiting if not, so that the actual water line of the Cache goes high quickly, each LUN cannot acquire the write page resource in real time, and performance degrades, when the high water line of the Cache is reached, the storage device starts to fast flush all the page data in the Cache, after the fast flush, the actual water line in the Cache drops to the low water line quickly, each LUN can acquire the write page resource, performance rises quickly, and thus service performance fluctuates severely, and examples of the service performance fluctuation are shown in fig. 2, where IOPS is the number of read/write Operations Per Second (Input/Output Operations Per Second).
Based on the above prior art, the technical solution in the embodiment of the present invention will be described below with reference to the drawings in the embodiment of the present invention.
Referring to fig. 3A and fig. 3B, fig. 3A is a schematic flowchart of a data write-in control method according to an embodiment of the present invention, and fig. 3B is a schematic process diagram of a data write-in control method according to an embodiment of the present invention. As shown in the figure, the data write control method includes the following steps:
s301, when a storage device detects a data write request for writing target data into a target storage space, acquiring the lowest quota of page resources in a Cache of a Cache memory corresponding to the target storage space;
the storage device may be, for example, a computer device with a Cache memory, a storage device, a base station, a wearable device, or other various electronic devices.
Wherein the target storage space comprises any one of:
the logical unit number LUN, the Volume and the file system corresponding to the disk array.
S302, when the size of the page occupied by the target data is larger than the lowest quota, the storage device allocates the page resource with the lowest quota to part of the data in the target data;
s303, the storage equipment acquires a reference water level line corresponding to the target storage space and an actual water level line of the Cache;
s304, when the actual water level line is larger than or equal to the reference water level line, the storage device determines a reference waiting time length according to the reference water level line, and after delaying the reference waiting time length, allocates a page in the Cache for unallocated data in the target data.
Wherein the reference water level line is in a direct proportional relation with the waiting time; when the reference water line is small, the small waiting time is set, the service processing efficiency of the Cache is considered, and the service processing real-time performance of the Cache is prevented from being excessively influenced by the waiting time process.
Therefore, in the embodiment of the invention, for target data to be written into a target storage space and occupying a page size larger than the minimum quota, a storage device firstly allocates the lowest quota of page resources in a Cache to part of the data in the target data, and secondly, when detecting that an actual water line in the Cache is higher than a reference water line corresponding to the target storage space, allocates a page in the Cache to unallocated data of the target data in a delayed manner.
In one example, the storage device further performs the following:
and when the actual water level line is smaller than the reference water level line, the storage equipment allocates a page in the Cache for unallocated data in the target data.
In this example, when the actual water level line is smaller than the reference water level line, that is, when 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 allocating the page in the page resource for the unallocated data in the target data, the storage device further performs the following operations:
acquiring at least one historical actual water line of the Cache corresponding to the target storage space within a preset time period;
when a water level line is greater than or equal to the historical actual water level line of the reference 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 exists in the at least one historical actual water level line and 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 line corresponding to the target storage space is dynamically adjusted according to the historical actual water line of the Cache, that is, when the historical actual water line is larger than the reference water line, the reference water line is reduced to write the service with delay data as much as possible, the performance burden of the Cache is relieved, when the historical actual water line is smaller than the reference water line, the reference water line is increased to Cache data of most data write-in services in real time, and the service efficiency of the Cache is maintained.
In an example, a specific implementation manner of the storage device allocating the page in the Cache to the unallocated data in the target data is as follows:
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 a page occupied by unallocated data in the target data, allocating the page in the Cache to 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 the unallocated data in the target data, putting the data write-in 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 storage device further performs the following:
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 resources in the Cache to the target data.
In this example, different storage spaces in the storage device may be preset to correspond to different minimum quotas, so that the basic page resource requirement of each storage space can be ensured, and the service performance is prevented from being affected by the fact that the storage spaces cannot acquire page resources in the Cache for a long time.
The above description has mainly described the solution of the embodiment of the present invention from the perspective of a storage device. It will be appreciated that the memory device, in order to carry out the above-described functions, may comprise corresponding hardware structures and/or software modules for performing the respective functions. Those of skill in the art will readily appreciate that the present invention can be implemented in hardware or a combination of hardware and computer software, with the exemplary elements and algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives 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 present invention may perform the division of the functional units on the storage device according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In the case of an integrated unit, fig. 4A shows a schematic diagram of a 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 used to control and manage the actions of the storage device, e.g., the processing unit 402 is used 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 between the storage device and other devices. The memory device may also include a storage unit 401 for storing program codes and data of the memory device.
The Processing Unit 402 may be a Processor or a controller, such as a Central Processing Unit (CPU), a general-purpose Processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a 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 illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others.
The communication unit 403 may be a communication interface, a transceiver circuit, etc., wherein the communication interface is a generic term, and may include one or more interfaces, such as 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, the storage device according to the embodiment of the present invention may be the storage device shown in fig. 4B.
Specifically, the processing unit 402 is configured to, when a data write request for writing target data into a target storage space is detected, obtain, through the communication unit 403, a lowest quota of a page resource in a Cache of a Cache memory corresponding to the target storage space; the system is further configured to allocate the page resource of the lowest quota to part of the data in the target data when the page size required to be occupied by the target data is greater than or equal to the lowest quota; the communication unit 403 is further configured to obtain a reference water level line corresponding to the target storage space and an actual water level line of the Cache; and the Cache is further used for determining a reference waiting time according to the reference water level line when the actual water level line is greater than or equal to the reference water level line, and allocating a page in the Cache for unallocated data in the target data after delaying the reference waiting time.
In an example, the processing unit 402 is further configured to allocate a page in the Cache to unallocated data in the target data when the actual water level line is smaller than the reference water level line.
In an example, after allocating a page in the page resource to unallocated data in the target data, the processing unit 402 is further configured to obtain at least one historical actual water level line of the Cache corresponding to the target storage space in a preset time period; the reference water level line 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 reference water level line in the at least one historical actual water level line; and the reference water level line is increased to update the reference water level line corresponding to the target storage space when the water level line is smaller than the historical actual water level line of the reference water level line in the at least one historical actual water level line.
In an example, in terms of allocating a page in the Cache to unallocated data in the target data, the processing unit 402 is specifically configured to: acquiring the size of an idle page in the Cache; when the size of the idle page is larger than or equal to the size of a page occupied by unallocated data in the target data, allocating the page in the Cache to 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 the unallocated data in the target data, putting 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 level line is in a direct proportional relationship with the wait time period;
the target storage space comprises any one of the following: the logical unit number LUN, the Volume and the file system corresponding to the disk array.
Referring to fig. 4B, the storage device 410 includes: processor 412, communication interface 413, memory 411. Optionally, memory device 410 may also include a bus 414. The communication Interface 413, the processor 412, and the memory 411 may be connected to each other through a bus 414, and the memory 411 includes a Cache and a Disk array, where the Disk array may include, for example, a Serial Attached Small Computer System Interface (SAS) hard Disk and a Solid State Disk (SSD); the bus 414 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 414 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 4B, but this does not indicate 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, and the embodiment of the present invention is not limited thereto.
As shown in fig. 5, for convenience of description, only the portions related to the embodiments of the present invention are shown, and details of the specific technology are not disclosed, please refer to the method portion of the embodiments 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 the mobile phone as an example:
fig. 5 is a block diagram showing a partial structure of a cellular phone related to a storage device provided by an embodiment of the present invention. Referring to fig. 5, the handset includes: a Radio Frequency (RF) circuit 510, a memory 520, an input unit 530, a display unit 540, a sensor 550, an audio circuit 560, a Wireless Fidelity (WiFi) module 570, a processor 580, and a power supply 550. Those skilled in the art will appreciate that the handset configuration shown in fig. 5 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 5:
RF circuitry 510 may be used for the reception and transmission of information. In general, RF circuit 510 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 510 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The memory 520 may be used to store software programs and modules, and the processor 580 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 520. The memory 520 may mainly include a Cache memory Cache and a disk array, where the disk array includes a program storage area and a data storage area, where the program storage area may store an operating system, an application program (such as determination of average playing time length) required by at least one function, and the like; the storage data area may store data created according to the use of the cellular phone (such as a history play time period, etc.), and the like. Further, the 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 cellular phone. Specifically, the input unit 530 may include a fingerprint recognition module 531 and other input devices 532. Fingerprint identification module 531, can gather the fingerprint data of user above that. 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, and the like.
The display unit 540 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The Display unit 540 may include a Display screen 541, and optionally, the Display screen 541 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Although in fig. 5, the fingerprint identification module 531 and the display 541 are shown as two separate components to implement the input and output functions of the mobile phone, in some embodiments, the fingerprint identification module 531 and the display 541 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 550, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display 541 according to the brightness of ambient light, and the proximity sensor 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 magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 560, speaker 561, and microphone 562 may provide an audio interface between a user and a cell phone. The audio circuit 560 can transmit the electrical signal converted from the received audio data to the speaker 561, and the electrical signal is converted into a sound signal by the speaker 561 for playing; on the other hand, the microphone 562 converts the collected sound signal into an electrical signal, which is received by the audio circuit 560 and converted into audio data, which is processed by the audio data playing processor 580, and then transmitted to, for example, another cellular phone via the RF circuit 510, or played to the memory 520 for further processing.
WiFi belongs to short distance wireless transmission technology, and the mobile phone can help the user to send and receive e-mail, browse web pages, access streaming media, etc. through the WiFi module 570, which provides wireless broadband internet access for the user. Although fig. 5 shows the WiFi module 570, it is understood that it does not belong to the essential constitution of the handset, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 580 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 520 and calling data stored in the memory 520, thereby performing overall monitoring of the mobile phone. Alternatively, processor 580 may include one or more processing units; preferably, the processor 580 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 580.
The handset also includes a power supply 550 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 580 via a power management system that may be used to manage charging, discharging, and power consumption.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
In the embodiment shown in fig. 3, the method flow of each step may be implemented based on the structure of the mobile phone.
In the embodiment shown in fig. 4A, the functions of the units can 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 (RAM), flash Memory, Read Only Memory (ROM), Erasable Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), registers, a 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. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC. In addition, the ASIC may reside in a gateway device or a mobility management network element. Of course, the processor and the storage medium may reside as discrete components in a gateway device or a mobility management network element.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in connection with the embodiments of the invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the 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 above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the embodiments of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only specific embodiments of the present invention, and are not intended to limit the scope of the embodiments of the present invention.

Claims (16)

1. A data write control method, comprising:
when a data write-in request for writing target data into a target storage space is detected, acquiring the lowest quota of page resources in a Cache of 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 the minimum quota, allocating the page resource of the minimum quota to partial data in the target data;
acquiring a reference water line of a Cache corresponding to the target storage space and an actual water line of the Cache;
and when the actual water level line is greater than or equal to the reference water level line, determining a reference waiting time length according to the reference water level line, and after delaying the reference waiting time length, distributing the page in the Cache for unallocated data in the target data.
2. The method of claim 1, further comprising:
and when the actual water level line is smaller than the reference water level line, distributing the page in the Cache for the unallocated data in the target data.
3. The method of claim 1, wherein after allocating the page of the page resource for the unallocated data of the target data, the method further comprises:
acquiring at least one historical actual water line of the Cache corresponding to the target storage space within a preset time period;
when a water level line is greater than or equal to the historical actual water level line of the reference 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 exists in the at least one historical actual water level line and 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.
4. The method of claim 2, wherein after allocating the page of the page resource for the unallocated data of the target data, the method further comprises:
acquiring at least one historical actual water line of the Cache corresponding to the target storage space within a preset time period;
when a water level line is greater than or equal to the historical actual water level line of the reference 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 exists in the at least one historical actual water level line and 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.
5. The method of claim 3, wherein the allocating the page in the Cache for the unallocated data in the target data comprises:
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 a page occupied by unallocated data in the target data, allocating the page in the Cache to 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 the unallocated data in the target data, putting the data write-in 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.
6. The method of claim 4, wherein the allocating the page in the Cache for the unallocated data in the target data comprises:
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 a page occupied by unallocated data in the target data, allocating the page in the Cache to 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 the unallocated data in the target data, putting the data write-in 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.
7. The method of any one of claims 1-6, wherein the reference water line is directly proportional to the wait period;
the target storage space comprises any one of the following:
the logical unit number LUN, the Volume and the file system corresponding to the disk array.
8. A storage device, comprising: a processing unit and a communication unit, wherein,
the processing unit is used for acquiring the lowest quota of page resources in a Cache of a Cache corresponding to a target storage space through the communication unit when a data write-in request for writing target data into the target storage space is detected; the system is further configured to allocate the page resource of the lowest quota to part of the data in the target data when the page size required to be occupied by the target data is greater than or equal to the lowest quota; the communication unit is further used for acquiring a reference water line of the Cache corresponding to the target storage space and an actual water line of the Cache; and the Cache is further used for determining a reference waiting time according to the reference water level line when the actual water level line is greater than or equal to the reference water level line, and allocating a page in the Cache for unallocated data in the target data after delaying the reference waiting time.
9. The storage device according to claim 8, wherein the processing unit is further configured to allocate a page in the Cache to unallocated data in the target data when the actual water level line is smaller than the reference water level line.
10. The storage device according to claim 8, wherein the processing unit is further configured to, after allocating a page in the page resource to unallocated data in the target data, obtain at least one historical actual water level line of the Cache corresponding to the target storage space within a preset time period; the reference water level line 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 reference water level line in the at least one historical actual water level line; and the reference water level line is increased to update the reference water level line corresponding to the target storage space when the water level line is smaller than the historical actual water level line of the reference water level line in the at least one historical actual water level line.
11. The storage device according to claim 9, wherein the processing unit is further configured to, after allocating a page in the page resource to unallocated data in the target data, obtain at least one historical actual water level line of the Cache corresponding to the target storage space within a preset time period; the reference water level line 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 reference water level line in the at least one historical actual water level line; and the reference water level line is increased to update the reference water level line corresponding to the target storage space when the water level line is smaller than the historical actual water level line of the reference water level line in the at least one historical actual water level line.
12. The storage device according to claim 10, wherein, in allocating a page in the Cache to unallocated data in the target data, the processing unit is specifically configured to: acquiring the size of an idle page in the Cache; when the size of the idle page is larger than or equal to the size of a page occupied by unallocated data in the target data, allocating the page in the Cache to 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 the unallocated data in the target data, putting 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.
13. The storage device according to claim 11, wherein, in said allocating a page in the Cache to unallocated data in the target data, the processing unit is specifically configured to: acquiring the size of an idle page in the Cache; when the size of the idle page is larger than or equal to the size of a page occupied by unallocated data in the target data, allocating the page in the Cache to 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 the unallocated data in the target data, putting 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.
14. The storage device of any one of claims 8-13, wherein the reference water line is directly proportional to the wait period;
the target storage space comprises any one of the following:
the logical unit number LUN, the Volume and the file system corresponding to the disk array.
15. A storage device, comprising: the system comprises a processor, a memory and a communication interface, wherein the processor is respectively connected with the memory and the communication interface;
the memory stores executable program code, the communication interface is for wireless communication;
the processor is configured to call the executable program code in the memory to perform the method as described in any of claims 1-7.
16. A computer storage medium, characterized in that it stores a computer program which, when executed by a processor, is capable of implementing the method of any one of claims 1 to 7.
CN201610844594.3A 2016-09-23 2016-09-23 Data write-in control method and storage device Active CN107870874B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610844594.3A CN107870874B (en) 2016-09-23 2016-09-23 Data write-in control method and storage device
CN202011436741.6A CN112559390B (en) 2016-09-23 2016-09-23 Data writing control method and storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610844594.3A CN107870874B (en) 2016-09-23 2016-09-23 Data write-in control method and storage device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202011436741.6A Division CN112559390B (en) 2016-09-23 2016-09-23 Data writing control method and storage device

Publications (2)

Publication Number Publication Date
CN107870874A CN107870874A (en) 2018-04-03
CN107870874B true CN107870874B (en) 2020-12-15

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 After (1)

Application Number Title Priority Date Filing Date
CN202011436741.6A Active CN112559390B (en) 2016-09-23 2016-09-23 Data writing control method and storage device

Country Status (1)

Country Link
CN (2) CN107870874B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
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 浪潮电子信息产业股份有限公司 Request processing delay adjusting method and device, electronic equipment 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 and system of FIFO memory and electronic equipment

Family Cites Families (21)

* Cited by examiner, † Cited by third party
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 transmitting message data by IP facsimile gateway
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
CN101957800A (en) * 2010-06-12 2011-01-26 福建星网锐捷网络有限公司 Multichannel cache distribution method and device
CN102075436B (en) * 2011-02-10 2014-09-17 华为数字技术(成都)有限公司 Ethernet, and data transmitting method and device thereof
CN102129876B (en) * 2011-04-07 2014-12-03 浙江宇视科技有限公司 Data storage method and equipment for video monitoring system
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
CN102693164B (en) * 2012-05-03 2014-09-17 中国石油集团川庆钻探工程有限公司地球物理勘探公司 Equipment and method for preventing buffer overflow
US8959305B1 (en) * 2012-06-29 2015-02-17 Emc Corporation Space reclamation with virtually provisioned devices
CN103064639B (en) * 2012-12-28 2016-08-03 华为技术有限公司 Date storage method and device
CN103345368B (en) * 2013-07-18 2015-05-06 内蒙古科技大学 Data caching method in buffer storage
US9292448B2 (en) * 2013-09-19 2016-03-22 Google Inc. Dynamic sizing of memory caches
CN103823765B (en) * 2014-02-26 2017-02-01 浙江宇视科技有限公司 Method and device for dynamic regulation of cache refreshing strategy
CN105446888B (en) * 2014-05-30 2018-10-12 华为技术有限公司 The method of mobile data, controller and storage system between storage device
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
CN105159612A (en) * 2015-09-06 2015-12-16 浪潮(北京)电子信息产业有限公司 Distribution method of free space of disk

Also Published As

Publication number Publication date
CN112559390B (en) 2023-06-06
CN112559390A (en) 2021-03-26
CN107870874A (en) 2018-04-03

Similar Documents

Publication Publication Date Title
CN107870874B (en) Data write-in control method and storage device
CN107391259B (en) Resource processing method and device, computer readable storage medium and mobile terminal
US10444822B2 (en) Method for managing central processing unit and related products
CN107368400B (en) CPU monitoring method and device, computer readable storage medium and mobile terminal
WO2019041280A1 (en) Application resource recommendation method and related device
US11099898B2 (en) Method for allocating memory resources and terminal device
JP5871075B2 (en) Method and apparatus for controlling a central processing unit
US20160316312A1 (en) Interface display method, device, terminal, server and system
US10324134B2 (en) Method and device for ascertaining required charging time
KR20190101983A (en) Data transmission method and equipment
US11520841B2 (en) Information recommendation method, terminal device, and server
CN115668123A (en) Audio resource allocation method and device and electronic equipment
JP7272694B2 (en) Method and terminal for reducing power consumption of terminal
WO2017206901A1 (en) Process control method and related device
CN108965042B (en) Network delay obtaining method and device, terminal equipment and storage medium
WO2019072179A1 (en) Application running control method and apparatus
CN106815078B (en) Memory control method and equipment
WO2017206851A1 (en) Method for assigning installation task and mobile terminal
WO2017206903A1 (en) Application control method and related device
CN110602766B (en) Personal hotspot identification method and method for determining association relationship between terminals
CN110489177B (en) Application control method and device, storage medium and terminal equipment
CN107894958B (en) Junk information cleaning method, terminal, server and computer readable storage medium
CN106776041B (en) Data processing method and device
CN110611347B (en) Charging control method and related product
CN109388487B (en) Application program processing method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220831

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

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.