CN115840528A - Method for setting waterline of storage disc, electronic equipment and storage medium - Google Patents

Method for setting waterline of storage disc, electronic equipment and storage medium Download PDF

Info

Publication number
CN115840528A
CN115840528A CN202111101661.XA CN202111101661A CN115840528A CN 115840528 A CN115840528 A CN 115840528A CN 202111101661 A CN202111101661 A CN 202111101661A CN 115840528 A CN115840528 A CN 115840528A
Authority
CN
China
Prior art keywords
waterline
coefficient
value
storage disk
increment value
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.)
Pending
Application number
CN202111101661.XA
Other languages
Chinese (zh)
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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202111101661.XA priority Critical patent/CN115840528A/en
Publication of CN115840528A publication Critical patent/CN115840528A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a method for setting a waterline of a storage disk, an electronic device and a storage medium. The method is applied to a file system. If the file system detects a process for executing the DM-verify function, the historical read-write data volume of the storage disk where the process is located is obtained, and the first coefficient and the first waterline increment value of the first coefficient are determined according to the historical read-write data volume of the storage disk. The file system also determines a kernel of the running process, determines a second coefficient and a second waterline increment value of the second coefficient according to the kernel, calculates a waterline value of the storage disk according to the first coefficient, the first waterline increment value, the second coefficient and the second waterline increment value, and dynamically configures the waterline value of the storage disk according to the calculated waterline value, for example, configures the calculated waterline value into the waterline value of the storage disk. This application can the waterline value of dynamic adjustment memory disc, avoids too high waste that causes storage resource of waterline configuration and avoids the too low problem that causes memory disc life to reduce of waterline configuration.

Description

Method for setting waterline of storage disc, electronic equipment and storage medium
Technical Field
The present application relates to the field of file access technologies, and in particular, to a method for setting a waterline of a storage disk, an electronic device, and a storage medium.
Background
After the terminal Device starts a Device mapping criterion (DM-criterion) function, the frequency of use of each storage disk in the terminal Device is different, but the settings of the upper and lower pipelines of each storage disk are the same and fixed. Since the upper and lower pipelines determine the size of the cache. When all the storage disks in the terminal equipment use the same waterline, if the waterline configuration is too high, the storage disks with low use frequency cannot be recycled, so that the waste of storage resources is caused, and if the waterline configuration is too low, the storage disks with frequent use are recycled too fast under the self memory pressure, so that the service life of the storage disks is reduced.
Disclosure of Invention
In view of the above, it is desirable to provide a method for setting a waterline of a storage disk, an electronic device and a storage medium, which avoid the problem that a storage disk with low use frequency cannot be recycled due to too high configuration of the waterline, resulting in waste of storage resources, and the problem that a storage disk with high use frequency is recycled too fast due to too low configuration of the waterline, resulting in reduction of service life of the storage disk.
In a first aspect, the present application provides a method for setting a waterline of a storage disk, which is applied to a file system. If the file system detects a process for executing the DM-verify function, acquiring historical read-write data volume of a storage disc where the process is located, and determining a first coefficient and a first waterline increment value of the first coefficient according to the historical read-write data volume of the storage disc, wherein the first coefficient is a usage coefficient of the historical read-write data volume of the storage disc. The file system also determines a kernel of the running process, determines a second coefficient and a second waterline increment value of the second coefficient according to the kernel, wherein the value of the second coefficient is the ratio of the processing rate or the processing frequency of the kernel to the processing rate or the processing frequency of the small kernel, calculates the waterline value of the storage disk according to the first coefficient, the first waterline increment value, the second coefficient and the second waterline increment value, and dynamically configures the waterline value of the storage disk according to the calculated waterline value, for example, configures the calculated waterline value as the waterline value of the storage disk. The above-mentioned technical scheme of this application is according to the waterline value of the handling capacity dynamic adjustment memory disc of the data bulk of the history reading and writing of memory disc and the kernel of operation process, can rationally occupy and release storage resource, avoids too high can let the memory disc that the frequency of use is low of waterline configuration to retrieve, causes the problem of the waste of storage resource, and avoids the waterline configuration too low then causes the memory disc that frequently uses to retrieve too fast, causes the problem that memory disc life reduces.
In one implementation mode, the method searches a first relation table according to the data volume of the historical reading and writing of the storage disk to determine a first coefficient and a first waterline increment value corresponding to the data volume of the historical reading and writing of the storage disk. Through the technical scheme, the first coefficient required by the storage disk and the empirical value of the first waterline increment value of the first coefficient are searched and calculated according to the first relation table, so that the calculation amount can be reduced, and the consumption of hardware resources can be reduced.
In one implementation, the method determines a second coefficient and a second waterline increment value corresponding to the kernel by looking up a second relation table according to the kernel. Through the technical scheme, the second coefficient required by the calculation of the storage disk and the empirical value of the second waterline increment value of the second coefficient are searched according to the second relation table, so that the calculation amount and the consumption of hardware resources can be further reduced.
In one implementation, the method calculates the watermark value of the storage disk according to the formula S = C × K + D × T, where C is a first coefficient, K is a first watermark increment value, D is a second coefficient, T is a second watermark increment value, and S is the watermark value of the storage disk. Through the technical scheme, the waterline value of the storage disk can be accurately calculated according to the formula S = C + K + D + T, so that the waterline value of the storage disk can be adjusted conveniently according to the accurate waterline value of the storage disk.
In one implementation, the waterline values of the storage disks include an upper waterline value and a lower waterline value, the first waterline increment value includes a first upper waterline increment value and a first lower waterline increment value, and the second waterline increment value includes a second upper waterline increment value and a second lower waterline increment value.
In one implementation, calculating the waterline value of the storage disk according to the first coefficient, the first waterline increment value, the second coefficient and the second waterline increment value includes: calculating a water-up line value of the storage disk according to a formula S1= C K1+ D T1, wherein C is a first coefficient, K1 is a first water-up line increment value of the first coefficient, D is a second coefficient, T1 is a second water-up line increment value of the second coefficient, and S1 is the water-up line value of the storage disk; calculating a lower waterline value of the storage disk according to a formula S2= C K2+ D T2, wherein K2 is a first waterline increment value of a first coefficient, T2 is a second waterline increment value of a second coefficient, and S2 is the lower waterline value of the storage disk; and determining the waterline interval range of the storage disk according to the calculated water feeding line value and the calculated water discharging line value of the storage disk. Through the technical scheme, the upper waterline value of the storage disk can be accurately calculated according to the formula S1= C K1+ D T1, the lower waterline value of the storage disk can be calculated according to the formula S2= A K2+ B T2, and the waterline interval range of the waterline value to be adjusted in the storage disk can be accurately determined according to the upper waterline value and the lower waterline value.
In one implementation, the method further comprises: and dynamically configuring the waterline value of the storage disk according to the waterline interval range of the storage disk. Through the technical scheme, the water line value of the storage disk can be flexibly adjusted in a water line interval.
In one implementation, the cores are divided into large cores, medium cores and small cores according to the processing rate or the processing frequency, the processing rate or the processing frequency of the large cores is higher than that of the medium cores, and the processing rate or the processing frequency of the medium cores is higher than that of the small cores. According to the technical scheme, the inner cores are divided into the large core, the medium core and the small core according to the processing speed or the processing frequency, so that the water line values of the storage disks corresponding to different inner cores are further accurately calculated.
In one implementation, if the chip running the process is a high-end chip, the second coefficient of the large core is 3.5:1, second coefficient of the kernel is 3:1, the second coefficient of the small kernel is 1:1. through the technical scheme, different second coefficients are set for different kernels in the high-end chip, so that the water line values of the storage disks corresponding to the different kernels in the high-end chip are further accurately calculated.
In one implementation, if the chip running the process is a low-end chip, the second coefficient of the large core is 5:1, the second coefficient of the kernel is 2:1, the second coefficient of the small kernel is 1:1. by the technical scheme, different second coefficients are set for different cores in the low-end chip, so that the water line values of the storage disks corresponding to the different cores in the low-end chip are further accurately calculated.
In one implementation, the method further comprises: if the process of executing the DM-version function is detected, the file system maps the mapping device to a target device, wherein the mapping device is a logical device, and the target device is a physical space segment mapped by the mapping device or a physical device mapped by the mapping device. By the technical scheme, the integrity of the equipment or the equipment partition is guaranteed by executing the DM-preference function on the mapping equipment.
In one implementation, the target device includes a data device and a hash device. Through the technical scheme, the data device in the target device is used for storing data and guaranteeing the integrity of the data, and the hash device in the target device is used for storing the hash value and verifying the integrity of the data device.
In one implementation, the amount of data historically read from and written to the storage disk includes the amount of data written to the storage disk and the amount of data read from the storage disk. According to the technical scheme, the sum of the data volume which is historically written into the storage disk and the data volume which is read from the storage disk can be used as the data volume which is historically read and written by the storage disk.
In a second aspect, an embodiment of the present application provides an electronic device, including a processor, a memory; wherein the processor is coupled to the memory; a memory for storing program instructions; and the processor is used for reading the program instructions stored in the memory so as to realize the waterline setting method of the storage disk.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, where program instructions are stored, and when the program instructions are executed on an electronic device, the electronic device is caused to execute a water line setting method for a water-supply storage disk.
In addition, the technical effects brought by the second aspect to the third aspect can be referred to the description related to the methods designed in the above methods, and are not repeated herein.
Drawings
Fig. 1 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Fig. 2 is a schematic diagram of reading data by the bufio _ new module according to an embodiment of the present application.
Fig. 3 is a flowchart of a method for setting a waterline of a storage disk according to an embodiment of the present application.
Fig. 4 is a block diagram of a software structure of an electronic device according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of some embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or illustrations. Any embodiment or design described as "exemplary" or "e.g.," in some embodiments of the present application is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present relevant concepts in a concrete fashion.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be understood that in this application, "/" means "or" means "unless otherwise indicated. For example, A/B may represent A or B. In some embodiments of the present application, "and/or" is only one kind of association relation describing an associated object, and means that there may be three kinds of relations. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone. "at least one" means one or more. "plurality" means two or more than two. For example, at least one of a, b, or c, may represent: a, b, c, a and b, a and c, b and c, a, b and c.
Referring to fig. 1, a software structure diagram of a Device Mapper architecture 11 of an electronic Device 100 according to an embodiment of the present disclosure is shown. The electronic Device 100 includes a Device Mapper architecture 11. The Device Mapper architecture 11 provides a mapping framework from logical devices to physical devices for the Linux kernel of the electronic Device 100, and a user can customize management policies of resources through the Device Mapper architecture 11. In this embodiment, a mapping Device (Device Mapper) is configured to map a Mapper Device, such as a logical Device, to one or more Target devices (Target devices). In this embodiment, the target device is a physical space segment mapped by the mapping device or a physical device mapped by the mapping device. Wherein each target device belongs to one type, and the I/O processing of different target devices is different. In this embodiment, logical Volume managers in the Linux kernel of the electronic Device 100, such as Linux Volume Manager 2 (LVM 2), enterprise Volume Management System (EVMS), dmroid, and the like, are implemented based on the Device Mapper architecture 11.
In this embodiment, the Device mapping criterion (DM-preference) is a mapping process for mapping a mapping Device to a target Device under the Device Mapper architecture 11, and the integrity of the Device or the Device partition is ensured by executing a DM-preference function on the mapping Device. Referring to fig. 1, the dm-nature includes two target devices, a Data Device (Data Device) and a Hash Device (Hash Device). And the data device is used for storing data and ensuring the integrity of the data. The hash device is used to store the hash value and verify the integrity of the data device.
In this embodiment, the mapping Device (i.e., mapper Device) and the Target Device (i.e., target Device) are in a one-to-one mapping relationship. The mapping includes that read operations to the mapping device are mapped to read operations to the target device. In the target Device, the DM-verify function maps the read operation to a read operation of a Data Device (Data Device), and adds a verify operation at the end of the read operation. The verification operation computes a hash value on the read data and compares the hash value with a value stored in a hash device. If the computed hash value is not the same as the value stored in the hash device, the check operation marks the read operation as an error.
In this embodiment, after the DM-verify function is turned on, the read-write capability (I/O performance) of the storage disk of the electronic device 100 is obviously reduced. In this embodiment, the storage disk refers to a storage partition of the electronic device 100, and for example, the storage disk may be an a disk, a B disk, a C disk, a D disk, and the like of the electronic device 100. In this embodiment, the storage disk is used to store programs and data, and all information in the electronic device 100, including the input raw data, the computer program, the intermediate operation result, and the final operation result, is stored in the storage disk. In the present embodiment, the storage disk includes a buffer (buffer memory). The buffer is a temporary memory for caching frequently used data in the storage disk to speed up the reading efficiency of the storage disk. For example, in a low memory condition of the electronic device 100, since the file data (page) to be read currently is not in the cache, the DM-verify function mostly performs a read operation (e.g., DM bufio read operation) in the cache. If the DM-verify function is turned on, the buffer _ new module finds that the requested buffer (buffer) has been swapped out and is not in the buffer of the DM buffer, and the buffer _ new module can only initiate a read request to the device, where the buffer _ new module is used to request to generate a buffer and control the buffer or the device to read data. Fig. 2 is a schematic diagram illustrating read data of the bufio _ new module according to an embodiment of the present application. The time for the bufio _ new module to read the device becomes completely dependent on the read-write speed of the device, and if the device performance is poor or garbage collection is performed, or more issued IO operations collected by the current device are queued in the queue of the device, the waiting time for the read operation becomes long. In order to avoid the waiting time of the read operation being too long, every preset time, for example, 30 seconds, the file system of the electronic device 100 checks whether the number of buffers (DM client buffers) of each client (client) that starts the DM-verify function or the remaining storage space exceeds the preset upper line of the buffer, if the number of buffers or the remaining storage space of the client that starts the DM-verify function exceeds the preset upper line of the buffer, the excess buffers that are not applied in the client are recycled, and if the number of buffers or the remaining storage space of the client that starts the DM-verify function does not exceed the preset upper line of the buffer, the client searches for the buffer that has exceeded the retention time limit D on the LRU (Least recent utilized) client to release the storage resources, so that the number of buffers or the remaining storage space of the client is kept below the upper line as much as possible. In this embodiment, the LRU clean list stores the least recently used buffer. In this embodiment, the pipeline refers to the usage amount of the cache, for example, the highest pipeline of the buffer of the client is 512 × 4096b (Byte), and the lowest reserved pipeline is 64 × 4096b. In an embodiment, the client's cache's water-line value is used to optimize the cache size of the buffer. In this embodiment, the upper-line value refers to an upper limit value of a buffer allocated to a storage disk or a buffer. In this embodiment, if the usage amount of the cache of the storage disk exceeds the upper-water line value of the cache, the file system may recycle the redundant cache that is not referenced in the storage disk. For example, if the water-line value of the storage disk a is 20M, but the available cache is 26M, the file system immediately reclaims the free 6M (26M-20M) in the storage disk a, and the 6M cache is used when the storage disk B has free services. In this embodiment, the lower horizontal value refers to a lower limit value of a buffer allocated to the storage disk or the buffer, that is, the lower horizontal value of the buffer is a buffer value that is least occupied under the condition that the storage function of the storage disk is ensured. For example: the lower waterline value of the storage disk A is 6M, the upper waterline value is 12M, namely the waterline range of the storage disk A is [6M,12M ], the lower waterline value of the storage disk B is 3M, the upper waterline value is 8M, namely the waterline range of the storage disk B is [3M,8M ], and the file system only has 10M available cache. If only the storage disk A has storage service at the beginning of the system file, the storage disk A occupies 10M of cache, and at the moment, the cache of the storage disk A is located in a [6M,12M ] section of the waterline range. If the storage disk B stores the service later, the file system allocates at least 3M of cache to the storage disk B because the lower pipeline value of the storage disk B is 3M, at this time, the total cache of the file system is 10M, the storage disk B occupies 3M, the storage disk a occupies 7M =10m-3M of cache, and the cache of the storage disk a is located in the waterline range or in the waterline range [6m,12m ].
In this embodiment, if the number of buffers or the remaining storage space of the client that starts the DM-verify function does not exceed the preset waterline of the buffers, the client searches for the buffer that is not used in the LRU clean list for the latest period of time and the longest period of time, and releases the storage resource.
In an embodiment of the present application, when all the storage disks in the electronic device 100 use the same waterline, if the waterline configuration is too high, the storage disks in the electronic device 100 with low use frequency cannot be recycled, which results in waste of storage resources; if the water line configuration is too low, the frequency of recycling the frequently used disk in the electronic device 100 is too fast, resulting in a reduction in the lifetime of the disk.
In order to solve the technical problem, the present application provides a method for setting a waterline of a storage disk. Referring to fig. 3, a flowchart of a method for setting a waterline of a storage disk in an embodiment of the present application is shown. The method specifically comprises the following steps.
In step S301, a process of executing the DM-verify function is detected.
Step S302, if a process for executing the DM-verify function is detected, obtaining the historical read-write data volume of the storage disk where the process is located, and determining a first coefficient and a first waterline increment value of the first coefficient according to the historical read-write data volume of the storage disk.
In this embodiment, the data amount of the history read and write of the process on the storage disk includes the data amount written to the storage disk and the data amount read from the storage disk. In this embodiment, the electronic device 100 determines the data amount of the historical read/write of the storage disk according to the data amount written into the storage disk and the data amount read from the storage disk, and searches the first relation table according to the data amount of the historical read/write of the storage disk to determine the first coefficient and the first waterline increment value. In this embodiment, the first relation table includes different data amounts of historical reading and writing, different first coefficients, and different first waterline increment values, and each data amount of historical reading and writing corresponds to one first coefficient and one first waterline increment value, and the electronic device 100 searches the first relation table according to the data amounts of historical reading and writing of the storage disk to determine the first coefficient and the first waterline increment value corresponding to the data amount of historical reading and writing. In this embodiment, the first coefficient is a usage coefficient of data size of historical read/write of the storage disk. The first coefficient is determined according to the use frequency of the storage disk, wherein the higher the use frequency of the storage disk is, the larger the first coefficient value is, and the use frequency of the storage disk is the data amount written into the storage disk and the data amount read from the storage disk. In this embodiment, the first waterline increment value is a unit value of an increase minimum storage amount or a buffer storage amount that is matched according to the data amount of the historical read/write of the storage disk. For example, in the first relation table, when the data amount of the historical read-write of the storage disk a is in the interval of 0G-2G, the corresponding first coefficient is 0.25, and the first waterline increment value is 2M; when the data amount of the history read-write of the storage disk A is within the interval of 2G-4G, the corresponding first coefficient is 0.35, and the first waterline increment value is 3M.
Step S303, determining a kernel for running the process, and determining a second coefficient and a second waterline increment value of the second coefficient according to the kernel.
In this embodiment, the second coefficient is a processing capability coefficient of a kernel that runs the process. In this embodiment, the cores are divided into a large core, a middle core and a small core according to processing capacity, where a processing rate or a processing frequency of the large core is higher than that of the middle core, and a processing rate or a processing frequency of the middle core is higher than that of the small core. In this embodiment, the value of the second coefficient is a ratio of a processing capacity (processing rate or processing frequency) of a kernel running the process to a processing capacity of the small kernel. For example, if the chip running the process in the electronic device 100 is a high-end chip, the second coefficient corresponding to the large core of the electronic device 100 is a ratio of the processing capability of the large core to the processing capability of the small core, and is, for example, 5:1, the second coefficient corresponding to the middle core of the electronic device 100 is a ratio of the processing capability of the middle core to the processing capability of the small core, and is, for example, 3:1, the second coefficient corresponding to the corelet of the electronic device 100 is 1:1. for another example, if the chip running the process in the electronic device 100 is a low-end chip, the second coefficient corresponding to the large core of the electronic device 100 is 3.5:1, the second coefficient corresponding to the kernel of the electronic device 100 is 2:1, the second coefficient corresponding to the corelet of the electronic device 100 is 1:1.
in this embodiment, the second pipeline increment value is a unit value of an increased minimum storage amount or a buffer amount that matches the processing capacity (processing rate or processing frequency) of the kernel that runs the process.
In this embodiment, the electronic device 100 finds the second relation table according to the kernel to determine the second coefficient and the second waterline increment value of the second coefficient. In this embodiment, the second relation table includes different kernels, different second coefficients, and different second waterline increment values, and each kernel corresponds to one second coefficient and one second waterline increment value. The electronic device 100 searches the second relation table according to the kernel running the process to determine a second coefficient and a second waterline increment value corresponding to the kernel. For example, in the second relation table, the second coefficient of the large core is 1, and the second waterline increment value of the large core is 5M; the second coefficient of the middle core is 3, and the second waterline increment value of the middle core is 3M; the second coefficient for the small kernel is 5 and the second waterline increment value for the medium kernel is 2M.
Step S304, calculating the waterline value of the storage disk according to the first coefficient, the first waterline increment value of the first coefficient, the second coefficient and the second waterline increment value of the second coefficient, and dynamically configuring the waterline value of the storage disk according to the calculated waterline value. For example, the calculated water line value is configured as a water line value of the storage disk.
In this embodiment, the waterline value of the storage disk is calculated according to a formula S = C × K + D × T, where C is a first coefficient, K is a first waterline increment value of the first coefficient, D is a second coefficient, T is a second waterline increment value of the second coefficient, and S is the waterline value of the storage disk. For example, if the first coefficient C is 0.25, the first waterline increment value K is 3M, the second coefficient D is 3, and the second waterline increment value is 3M, the waterline value calculated according to the formula S = C × K + D × T is S =0.25 × 3m +3 × 3m =9.75m.
In this embodiment, the water line values of the storage disk include an upper water line value and a lower water line value. In this embodiment, the first waterline increment value includes a first waterline increment value and a first waterline increment value. The second waterline increment value comprises a second waterline increment value and a second waterline increment value. The electronic device 100 searches the first relation table according to the historical read-write data volume of the storage disk to determine a first coefficient, a first upper waterline increment value and a first lower upper waterline increment value corresponding to the historical read-write data volume. The electronic device 100 searches the second relation table according to the kernel running the process to determine a second coefficient, a second waterline increment value and a second waterline increment value corresponding to the kernel. The electronic device 100 calculates the water-up line value of the storage disk according to a formula S1= C × K1+ D × T1, where K1 is a first water-up line increment value of a first coefficient, T1 is a second water-up line increment value of a second coefficient, and S1 is the water-up line value of the storage disk. The electronic device 100 calculates a lower waterline value of the storage disk according to a formula S2= C × K2+ D × T2, where K2 is a first waterline increment value of a first coefficient, T2 is a second waterline increment value of a second coefficient, and S2 is the lower waterline value of the storage disk. The electronic device 100 determines the waterline interval range of the storage disk according to the calculated water line value and the calculated water line value of the storage disk, and dynamically configures the waterline value of the storage disk according to the waterline interval range of the storage disk, for example, configures the waterline value of the storage disk in the waterline interval range.
In this embodiment, after the DM-verify function is turned on, the water line value of the storage disk is dynamically adjusted according to the data amount of the history read and write of the storage disk where the process executing the DM-verify function is located and the processing capability of the core running the process, so that the storage resource can be reasonably occupied and released, the problem that the storage disk with low use frequency cannot be recycled due to too high water line configuration and the problem that the storage resource is wasted due to too fast recovery of the storage disk with frequent use due to too low water line configuration and the problem that the service life of the storage disk is reduced due to too fast recovery of the storage disk with frequent use due to too low water line configuration is avoided.
Referring to fig. 4, a block diagram of a software structure of the electronic device 100 according to an embodiment of the present application is shown. The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system of the electronic device 100 is divided into four layers, which are an Application (Application) layer, an Application Framework (Application Framework) layer, an Android runtime (Android runtime) and system library (Android runtime) layer, and a Kernel (Kernel) layer from top to bottom.
The application layer may include a series of applications. As shown in fig. 4, the applications may include camera, gallery, calendar, phone, map, navigation, WLAN, bluetooth, music, video, short message, etc. applications. In this embodiment, the application may be a third-party application, where the third-party application refers to software provided by a software company other than the manufacturer of the nonlinear editing system. Most of the software can not be directly attached to a nonlinear card for input/output, but can process and edit video and audio materials which enter a hard disk array, or make own two-dimensional and three-dimensional images and then synthesize the two-dimensional and three-dimensional images with the video materials, and the synthesized product is output by input/output software.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application of the application layer. The application framework layer includes a number of predefined functions.
As shown, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so forth.
The notification manager enables applications to display notification information in a status bar, can be used to convey notification-type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, text information is prompted in the status bar, a prompt tone is given, the intelligent terminal vibrates, and the indicator light flickers.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), file systems, and the like.
The surface manager is used to manage the display subsystem and provide a fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, g.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
File systems are used to specify the system of files on a storage device (e.g., a disk, a solid state hard drive for NAND Flash) or partition.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
Referring to fig. 5, a hardware structure diagram of the electronic device 100 according to an embodiment of the present application is shown. The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an Artificial Intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and/or a smart city device, and some embodiments of the present application do not particularly limit the specific type of the electronic device 100.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. Wherein the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bidirectional synchronous serial bus including a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor through an I2C interface, such that the processor 110 and the touch sensor communicate through an I2C bus interface to implement the touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through the I2S interface, so as to implement a function of receiving a call through a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit the audio signal to the wireless communication module 160 through the PCM interface, so as to implement the function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to implement the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices 100, such as AR devices and the like.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative, and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like.
The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou satellite navigation system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may be a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The internal memory 121 may include one or more Random Access Memories (RAMs) and one or more non-volatile memories (NVMs).
The external memory interface 120 may be used to connect an external nonvolatile memory, so as to expand the storage capability of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are saved in an external nonvolatile memory.
The internal memory 121 or the external memory interface 120 is used to store one or more computer programs. One or more computer programs are configured to be executed by the processor 110. The one or more computer programs include a plurality of instructions which, when executed by the processor 110, can implement the method for setting the water line of the storage disk executed on the electronic device 100 in the above-described embodiments.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 115, or some functional modules of the audio module 170 may be disposed in the processor 115.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards can be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The present embodiment also provides a computer program product, which when running on a computer, causes the computer to execute the relevant steps described above, so as to implement the water line setting method for the storage disk in the foregoing embodiments.
In addition, some embodiments of the present application also provide an apparatus, which may be embodied as a chip, a component, or a module, and may include a processor and a memory connected to each other; when the device runs, the processor can execute the computer execution instruction stored in the memory, so that the chip can execute the waterline setting method for the storage disk in the above method embodiments.
The electronic device, the computer storage medium, the computer program product, or the chip provided in this embodiment are all configured to execute the corresponding method provided above, so that the beneficial effects achieved by the electronic device, the computer storage medium, the computer program product, or the chip may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the module or unit is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, that is, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of some embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of some embodiments of the present application and not for limiting, and although some embodiments of the present application are described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of some embodiments of the present application can be modified or substituted equivalently without departing from the spirit and scope of the technical solutions of some embodiments of the present application.

Claims (15)

1. A method for setting a waterline of a storage disk, the method comprising:
detecting a process for executing the DM-preference function;
if a process for executing the DM-verify function is detected, acquiring historical read-write data volume of a storage disk where the process is located, and determining a first coefficient and a first waterline increment value of the first coefficient according to the historical read-write data volume of the storage disk, wherein the first coefficient is a usage coefficient of the historical read-write data volume of the storage disk;
determining a kernel for running the process, and determining a second coefficient and a second waterline increment value of the second coefficient according to the kernel, wherein the value of the second coefficient is the ratio of the processing rate or the processing frequency of the kernel to the processing rate or the processing frequency of a corelet;
and calculating the waterline value of the storage disk according to the first coefficient, the first waterline increment value, the second coefficient and the second waterline increment value, and dynamically configuring the waterline value of the storage disk according to the calculated waterline value.
2. The method for setting the waterline of the storage disk as claimed in claim 1, wherein said determining a first coefficient according to the data amount of the historical read-write of the storage disk, the first waterline increment value of the first coefficient comprises:
and searching a first relation table according to the data volume of the historical reading and writing of the storage disk to determine the first coefficient and the first waterline increment value corresponding to the data volume of the historical reading and writing of the storage disk.
3. The method of claim 1, wherein said determining a second coefficient, a second waterline increment value for the second coefficient from the kernel comprises:
and searching a second relation table according to the kernel to determine the second coefficient and the second waterline increment value corresponding to the kernel.
4. The method of claim 1, wherein said calculating a waterline value for the storage disk based on the first coefficient, the first waterline increment value, the second coefficient, and the second waterline increment value comprises:
and calculating the water line value of the storage disk according to a formula S = C + K + D + T, wherein C is the first coefficient, K is the first waterline increment value, D is the second coefficient, T is the second waterline increment value, and S is the water line value of the storage disk.
5. The method of claim 1, wherein the tray's waterline values include an upper waterline value and a lower waterline value, the first waterline increment value includes a first upper waterline increment value and a first lower waterline increment value, and the second waterline increment value includes a second upper waterline increment value and a second lower waterline increment value.
6. The method of claim 5, wherein said calculating a waterline value for the storage disk based on the first coefficient, the first waterline increment value, the second coefficient, and the second waterline increment value comprises:
calculating a water-up line value of the storage disk according to a formula S1= C K1+ D T1, where C is the first coefficient, K1 is a first water-up line increment value of the first coefficient, D is the second coefficient, T1 is a second water-up line increment value of the second coefficient, and S1 is the water-up line value of the storage disk;
calculating a lower waterline value of the storage disk according to a formula S2= C × K2+ D × T2, where K2 is a first waterline increment value of the first coefficient, T2 is a second waterline increment value of the second coefficient, and S2 is the lower waterline value of the storage disk;
and determining the waterline interval range of the storage disc according to the calculated water feeding line value and the calculated water discharging line value of the storage disc.
7. The method of claim 6, further comprising:
and dynamically configuring the waterline value of the storage disk according to the waterline interval range of the storage disk.
8. The method of claim 1, wherein the cores are divided into a large core, a medium core and a small core according to a processing rate or a processing frequency, the processing rate or the processing frequency of the large core is higher than that of the medium core, and the processing rate or the processing frequency of the medium core is higher than that of the small core.
9. The method of claim 8, wherein if the chip running the process is a high-end chip, the second coefficient of the large core is 3.5:1, the second coefficient of the kernel is 3:1, the second coefficient of the small kernel is 1:1.
10. the method of claim 8, wherein if the chip running the process is a low-end chip, the second coefficient of the large core is 5:1, the second coefficient of the kernel is 2:1, the second coefficient of the small kernel is 1:1.
11. the method of claim 1, further comprising:
if the process of executing the DM-preference function is detected, the file system maps the mapping device into a target device, wherein the mapping device is a logical device, and the target device is a physical space segment mapped by the mapping device or a physical device mapped by the mapping device.
12. The method of claim 11, wherein the target device comprises a data device and a hash device.
13. The method of claim 1, wherein the historical read-write data amount of the storage disk comprises a data amount written to the storage disk and a data amount read from the storage disk.
14. An electronic device comprising a processor, a memory; wherein the processor is coupled with the memory;
the memory to store program instructions;
the processor, configured to read the program instructions stored in the memory to implement the waterline setting method of the storage disk according to any one of claims 1 to 13.
15. A computer-readable storage medium characterized in that it stores program instructions that, when run on an electronic device, cause the electronic device to execute the waterline setting method of a storage disk according to any one of claims 1 to 13.
CN202111101661.XA 2021-09-18 2021-09-18 Method for setting waterline of storage disc, electronic equipment and storage medium Pending CN115840528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111101661.XA CN115840528A (en) 2021-09-18 2021-09-18 Method for setting waterline of storage disc, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111101661.XA CN115840528A (en) 2021-09-18 2021-09-18 Method for setting waterline of storage disc, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115840528A true CN115840528A (en) 2023-03-24

Family

ID=85574287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111101661.XA Pending CN115840528A (en) 2021-09-18 2021-09-18 Method for setting waterline of storage disc, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115840528A (en)

Similar Documents

Publication Publication Date Title
CN113704014B (en) Log acquisition system, method, electronic device and storage medium
CN114443277A (en) Memory management method and device, electronic equipment and computer readable storage medium
CN114650363B (en) Image display method and electronic equipment
CN113722087B (en) Virtual memory management method and electronic equipment
CN114461588B (en) Method for adjusting pre-reading window and electronic equipment
CN112817736B (en) Memory management method and electronic equipment
CN111382087A (en) Memory management method and electronic equipment
CN113704205A (en) Log storage method, chip, electronic device and readable storage medium
CN116315667B (en) Data transmission method, device, equipment and storage medium
CN117130541A (en) Storage space configuration method and related equipment
CN114489469B (en) Data reading method, electronic equipment and storage medium
CN113760191B (en) Data reading method, data reading apparatus, storage medium, and program product
CN114461589B (en) Method for reading compressed file, file system and electronic equipment
CN112783418B (en) Method for storing application program data and mobile terminal
CN115840528A (en) Method for setting waterline of storage disc, electronic equipment and storage medium
CN113485969A (en) Storage fragmentation method and device, terminal and computer storage medium
CN113760192A (en) Data reading method, data reading apparatus, storage medium, and program product
CN114489471A (en) Input and output processing method and electronic equipment
CN115904297A (en) Screen display detection method, electronic device and storage medium
CN116700578B (en) Layer synthesis method, electronic device and storage medium
CN115482143B (en) Image data calling method and system for application, electronic equipment and storage medium
CN116627855B (en) Memory processing method and related device
CN114443240B (en) Input/output request processing method and electronic equipment
WO2024032430A1 (en) Memory management method and electronic device
CN117707449A (en) Display control method and related equipment

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