Water line setting method of storage disk, electronic device, and storage medium
By dynamically adjusting the waterline value of the storage disk based on historical read/write data volume and kernel processing capabilities, the problem of resource waste and reduced lifespan caused by improper storage disk waterline configuration is solved, achieving efficient utilization of storage resources.
Patent Information
- Application Number
- CN202111101661.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-18
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2041-09-18
AI Technical Summary
In terminal devices, improper waterline configuration of storage disks can lead to the inability to recycle storage disks with low usage frequency, resulting in a waste of storage resources. On the other hand, storage disks with high usage frequency are recycled too quickly, reducing their lifespan.
By dynamically adjusting the waterline value of the storage disk, a reasonable waterline value is calculated based on the historical read/write data volume of the storage disk and the kernel processing capability, avoiding the problem of waterline configuration being too high or too low. The waterline value of the storage disk is calculated using the formula S=C*K+D*T, and is flexibly adjusted within the waterline range.
By rationally occupying and releasing storage resources, the problems of storage resource waste and reduced storage disk lifespan are avoided, thus improving the utilization efficiency of storage resources.
Smart Images

Figure CN115840528B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of file access technology, and in particular to a waterline setting method for a storage disk, an electronic device, and a storage medium. Background Technology
[0002] After enabling Device Mapper Verity (DM-verity) on a terminal device, each storage disk in the device is used at a different frequency, but the upper and lower watermark settings for each disk are the same and fixed. Since the upper and lower watermarks determine the cache size, if all storage disks in the terminal device use the same watermark, a watermark configuration that is too high will prevent infrequently used disks from being reclaimed, resulting in wasted storage resources. Conversely, a watermark configuration that is too low will cause frequently used disks to be reclaimed too quickly under their own memory pressure, reducing the lifespan of the storage disks. Summary of the Invention
[0003] In view of the above, it is necessary to provide a waterline configuration method, electronic device and storage medium for storage disks, to avoid the problem that if the waterline configuration is too high, the storage disks with low usage frequency cannot be recycled, resulting in a waste of storage resources, and if the waterline configuration is too low, the storage disks with high usage frequency will be recycled too quickly, resulting in a reduction in the lifespan of the storage disks.
[0004] Firstly, this application provides a method for setting the waterline of a storage disk, applied in a file system. If the file system detects a process executing the DM-verity function, it obtains the historical read / write data volume of the storage disk where the process resides, and determines a first coefficient and a first waterline increment value based on 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. The file system also determines the kernel of the running process, and determines a second coefficient and a second waterline increment value based on the kernel, wherein the value of the second coefficient is the ratio of the kernel's processing speed or frequency to the processing speed or frequency of the small core. The file system calculates the waterline value of the storage disk based on 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 based on the calculated waterline value, for example, configuring the calculated waterline value as the waterline value of the storage disk. The above-mentioned technical solution of this application dynamically adjusts the waterline value of the storage disk according to the historical read and write data volume of the storage disk and the processing capability of the kernel of the running process. This can reasonably occupy and release storage resources, avoid the problem that the waterline configuration is too high, which will prevent the storage disk with low usage frequency from being reclaimed and cause waste of storage resources, and avoid the problem that the waterline configuration is too low, which will cause the storage disk with high usage frequency to be reclaimed too quickly and reduce the lifespan of the storage disk.
[0005] In one implementation, the method determines a first coefficient and a first waterline increment value corresponding to the historical read / write data volume of the storage disk by looking up a first relation table. This technical solution, which uses the first relation table to find empirical values for the first coefficient and the first waterline increment value required to calculate the storage disk, reduces computational load and hardware resource consumption.
[0006] In one implementation, the method determines the second coefficient and the second waterline increment value corresponding to the kernel by looking up a second relation table in the kernel. Through the above technical solution, by looking up the empirical values of the second coefficient and the second waterline increment value required for calculating the storage disk based on the second relation table, the computational load and hardware resource consumption can be further reduced.
[0007] In one implementation, the method calculates the waterline value of the storage disk according to the formula S = C * K + D * T, where C is a first coefficient, K is a first waterline increment, D is a second coefficient, T is a second waterline increment, and S is the waterline value of the storage disk. Through this technical solution, the waterline value of the storage disk can be accurately calculated according to the formula S = C * K + D * T, thereby facilitating the adjustment of the waterline value of the storage disk based on the precise waterline value.
[0008] In one implementation, the waterline value of the storage disk includes 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.
[0009] In one implementation, calculating the waterline value of the storage disk based on a first coefficient, a first waterline increment, a second coefficient, and a second waterline increment includes: calculating the upper waterline value of the storage disk according to the formula S1 = C * K1 + D * T1, where C is the first coefficient, K1 is the first upper waterline increment of the first coefficient, D is the second coefficient, T1 is the second upper waterline increment of the second coefficient, and S1 is the upper waterline value of the storage disk; calculating the lower waterline value of the storage disk according to the formula S2 = C * K2 + D * T2, where K2 is the first lower waterline increment of the first coefficient, T2 is the second lower waterline increment of the second coefficient, and S2 is the lower waterline value of the storage disk; and determining the waterline range of the storage disk based on the calculated upper and lower waterline values. Using the above technical solution, the upper water level value of the storage disk can be accurately calculated according to the formula S1=C*K1+D*T1, and the lower water level value of the storage disk can be calculated according to the formula S2=A*K2+B*T2. Based on the upper and lower water level values, the water level range of the water level value to be adjusted in the storage disk can be accurately determined.
[0010] In one implementation, the method further includes: dynamically configuring the waterline value of the storage disk according to the waterline range of the storage disk. Through the above technical solution, the waterline value of the storage disk can be flexibly adjusted within a waterline range.
[0011] In one implementation, the kernel is divided into large cores, medium cores, and small cores according to processing speed or frequency. The processing speed or frequency of large cores is higher than that of medium cores, and the processing speed or frequency of medium cores is higher than that of small cores. Through this technical solution, the kernel is divided into large cores, medium cores, and small cores according to processing speed or frequency, thereby allowing for more precise calculation of the waterline value of the storage disk corresponding to different cores.
[0012] In one implementation, if the chip running the process is a high-end chip, the second coefficient for the large core is 3.5:1, the second coefficient for the medium core is 3:1, and the second coefficient for the small core is 1:1. Through this technical solution, different second coefficients are set for different cores in the high-end chip, thereby further refining the waterline value of the storage disk corresponding to different cores in the high-end chip.
[0013] In one implementation, if the chip running the process is a low-end chip, the second coefficient for the large core is 5:1, the second coefficient for the medium core is 2:1, and the second coefficient for the small core is 1:1. Through this technical solution, different second coefficients are set for different cores in the low-end chip, thereby further refining the waterline value of the storage disk corresponding to different cores in the low-end chip.
[0014] In one implementation, the method further includes: if a process executing the DM-verity function is detected, the file system maps the mapped device to a target device, wherein the mapped device is a logical device, and the target device is either a physical space segment mapped by the mapped device or a physical device mapped by the mapped device. Through the above technical solution, the integrity of the device or device partition is ensured by executing the DM-verity function on the mapped device.
[0015] In one implementation, the target device includes a data device and a hash device. Through the above technical solution, the data device in the target device is used to store data and ensure data integrity, while the hash device in the target device is used to store hash values and verify the integrity of the data device.
[0016] In one implementation, the historical read / write data volume of the storage disk includes the amount of data written to the storage disk and the amount of data read from the storage disk. Using the above technical solution, the sum of the historical data written to and read from the storage disk can be used as the historical read / write data volume of the storage disk.
[0017] Secondly, embodiments of this application provide an electronic device, including a processor and a memory; wherein the processor and the memory are coupled; the memory is used to store program instructions; the processor is used to read the program instructions stored in the memory to implement the above-mentioned waterline setting method for the storage disk.
[0018] Thirdly, embodiments of this application provide a computer-readable storage medium storing program instructions that, when executed on an electronic device, cause the electronic device to perform a waterline setting method for a water storage tray.
[0019] Furthermore, the technical effects brought about by the second and third aspects can be found in the descriptions of the methods in the above-mentioned method section, and will not be repeated here. Attached Figure Description
[0020] Figure 1 This is a structural diagram of an electronic device provided in an embodiment of this application.
[0021] Figure 2 This is a schematic diagram illustrating the reading of data by the bufio_new module in one embodiment of this application.
[0022] Figure 3 This is a flowchart of a waterline setting method for a storage disk in one embodiment of this application.
[0023] Figure 4 This is a software structure block diagram of an electronic device according to an embodiment of this application.
[0024] Figure 5 This is a schematic diagram of the hardware structure of an electronic device in one embodiment of this application. Detailed Implementation
[0025] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. 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 this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in some embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0026] Unless otherwise defined, 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 pertains. The terminology used in this application's specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be understood that, unless otherwise stated, " / " in this application means "or". For example, A / B can mean A or B. In some embodiments of this application, "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. "At least one" refers to one or more. "More than one" refers to two or more. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, and a, b, and c (seven cases).
[0027] refer to Figure 1 The diagram shows the software structure of the Device Mapper architecture 11 of the electronic device 100 provided in this embodiment. The electronic device 100 includes the 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. Through the Device Mapper architecture 11, users can customize resource management strategies. In this embodiment, the mapping device (Device Mapper) is used to map MapperDevice, such as a logical device, to one or more target devices. In this embodiment, the target device is either the physical space segment mapped by the mapping device or the physical device mapped by the mapping device. Each target device belongs to a type, and target devices of different types handle I / O differently. In this embodiment, the logical volume managers in the Linux kernel of the electronic device 100, such as Linux Volume Manager 2 (LVM2), Enterprise Volume Management System (EVMS), and dmraid, are all implemented based on the Device Mapper architecture 11.
[0028] In this embodiment, Device Mapper Verity (DM-verity) is the mapping process under the DeviceMapper architecture 11 that maps a mapped device to a target device. The integrity of the device or device partition is ensured by performing the DM-verity function on the mapped device. (See reference...) Figure 1DM-verity includes two types of target devices: data devices and hash devices. Data devices are used to store data and ensure its integrity. Hash devices are used to store hash values and verify the integrity of data devices.
[0029] In this embodiment, the mapping device (i.e., the Mapper Device) and the target device (i.e., the Target Device) have a one-to-one mapping relationship. This mapping relationship includes mapping read operations on the mapping device to read operations on the target device. On the target device, the DM-verity function maps read operations to read operations on the data device and adds a verification operation at the end of the read operation. This verification operation calculates a hash value for the read data and compares the hash value with a value stored in the hash device. If the calculated hash value and the value stored in the hash device are different, the verification operation marks the read operation as an error.
[0030] In this embodiment, after enabling the DM-verity function, the read / write capability (I / O performance) of the electronic device 100's storage disk decreases significantly. In this embodiment, the storage disk refers to a storage partition of the electronic device 100; for example, the storage disk can be drive A, drive B, drive C, drive D, etc. of the electronic device 100. In this embodiment, the storage disk is used to store programs and data; all information in the electronic device 100, including input raw data, computer programs, intermediate running results, and final running results, is stored in the storage disk. In this embodiment, the storage disk includes a buffer (buffer memory). The buffer is a temporary memory used to cache frequently used data in the storage disk to accelerate the storage disk's read performance. For example, when the electronic device 100 has low memory, since the file data (page) to be read is not in the buffer, the DM-verity function performs most of its read operations in the buffer (e.g., dm bufio read operation). If the DM-verity feature is enabled, and the bufio_new module finds that the requested buffer has been swapped out and is not in the DM buffer cache, the bufio_new module can only read the data by initiating a read request to the device. The bufio_new module is used to request the creation of the buffer and control the buffer or device to read data. (Reference) Figure 2The diagram shown is a schematic of the bufio_new module reading data according to an embodiment of this application. The time for the bufio_new module to perform a read operation on the device becomes entirely dependent on the device's read and write speed. If the device performance is poor, or if it is undergoing garbage collection, or if the device has a large number of I / O operations queued in its queue, the waiting time for the read operation will be longer. To avoid excessively long waiting times for read operations, every preset time interval, such as 30 seconds, the file system of the electronic device 100 checks whether the number of buffers or the remaining storage space of each client with the DM-verity function enabled exceeds the preset upper limit of the buffer. If the number of buffers or the remaining storage space of the client with the DM-verity function enabled exceeds the preset upper limit of the buffer, the excess buffers that are not used in the client are reclaimed. If the number of buffers or the remaining storage space of the client with the DM-verity function enabled does not exceed the preset upper limit of the buffer, the client searches for buffers on the LRU (Least Recently Used) clean list that have exceeded the retention time limit D and releases the storage resources, so that the number of buffers or the remaining storage space of the client are kept below the upper limit as much as possible. In this embodiment, the LRU clean list stores the least recently used buffers. In this embodiment, the waterline refers to the amount of cache used; for example, the highest waterline for a client's buffer is 512*4096 bytes, and the lowest reserved waterline is 64*4096 bytes. In one embodiment, the waterline value of the client's buffer is used to optimize the buffer's cache size. In this embodiment, the upper waterline value refers to the upper limit of cache allocated to the storage disk or buffer. In this embodiment, if the cache usage of the storage disk exceeds the upper waterline value, the file system will reclaim the unreferenced excess cache from the storage disk. For example, if the upper waterline value of storage disk A is 20MB, but the available cache is 26MB, the file system will immediately reclaim the 6MB (26MB-20MB) of free cache from storage disk A, which will be used when storage disk B has free traffic. In this embodiment, the lower waterline value refers to the lower limit of cache allocated to the storage disk or buffer; that is, the lower waterline value is the minimum cache value required to ensure the storage function of the storage disk. For example, storage disk A has a lower watermark of 6M and an upper watermark of 12M, meaning its watermark range is [6M, 12M]. Storage disk B has a lower watermark of 3M and an upper watermark of 8M, meaning its watermark range is [3M, 8M]. The file system only has 10M of available cache. If initially only storage disk A has storage operations, then storage disk A will occupy the entire 10M cache. In this case, storage disk A's cache is within the watermark range of [6M, 12M].If storage disk B stores business later, since the bottom watermark value of storage disk B is 3M, the file system will allocate at least 3M of cache to storage disk B. At this time, the total cache of the file system is 10M, storage disk B occupies 3M, and storage disk A occupies 7M = 10M-3M of cache. The cache of storage disk A is still within the watermark range [6M, 12M].
[0031] In this embodiment, if the number of buffers or the remaining storage space of the client with the DM-verity function enabled does not exceed the preset upper limit of the buffer, the client searches for the buffer that has not been used for the longest time in the LRU clean list and releases the storage resources.
[0032] In one embodiment of this application, when all storage disks in the electronic device 100 use the same water line, if the water line configuration is too high, the storage disks with low usage frequency in the electronic device 100 will not be able to be recycled, resulting in a waste of storage resources; if the water line configuration is too low, the storage disks with high usage frequency in the electronic device 100 will be recycled too quickly, resulting in a reduction in the lifespan of the storage disks.
[0033] To address the aforementioned technical problems, this application provides a method for setting the waterline of a storage disk. (Reference) Figure 3 The diagram shown is a flowchart of a waterline setting method for a storage disk in one embodiment of this application. The method specifically includes the following steps.
[0034] Step S301: Detect the process executing the DM-verity function.
[0035] Step S302: If a process executing the DM-verity function is detected, obtain the historical read and write data volume of the storage disk where the process is located, and determine the first coefficient and the first waterline increment value of the first coefficient based on the historical read and write data volume of the storage disk.
[0036] In this embodiment, the historical read / write data volume of the process on the storage disk includes the amount of data written to the storage disk and the amount of data read from the storage disk. In this embodiment, the electronic device 100 determines the historical read / write data volume of the storage disk based on the amount of data written to and read from the storage disk, and determines a first coefficient and a first waterline increment value by looking up a first relation table based on the historical read / write data volume. In this embodiment, the first relation table includes different historical read / write data volumes, different first coefficients, and different first waterline increment values, and each historical read / write data volume corresponds to one first coefficient and one first waterline increment value. The electronic device 100 determines the first coefficient and first waterline increment value corresponding to the historical read / write data volume by looking up the first relation table based on the historical read / write data volume of the storage disk. In this embodiment, the first coefficient is a usage coefficient of the historical read / write data volume of the storage disk. The first coefficient is determined based on the usage frequency of the storage disk, wherein the higher the usage frequency of the storage disk, the larger the first coefficient value, where the usage frequency of the storage disk is the amount of data written to and read from the storage disk. In this embodiment, the first waterline increment value is the unit value for increasing the minimum storage or cache size based on the historical read / write data volume of the storage disk. For example, in the first relationship table, when the historical read / write data volume of storage disk A is in the range of 0G-2G, the corresponding first coefficient is 0.25, and the first waterline increment value is 2M; when the historical read / write data volume of storage disk A is in the range of 2G-4G, the corresponding first coefficient is 0.35, and the first waterline increment value is 3M.
[0037] Step S303: Determine the kernel running the process, and determine the second coefficient and the second waterline increment value of the second coefficient based on the kernel.
[0038] In this embodiment, the second coefficient is the processing power coefficient of the kernel running the process. In this embodiment, the kernels are divided into large cores, medium cores, and small cores according to their processing power. The processing speed or frequency of a large core is higher than that of a medium core, and the processing speed or frequency of a medium core is higher than that of a small core. In this embodiment, the value of the second coefficient is the ratio of the processing power (processing speed or processing frequency) of the kernel running the process to the processing power of the small core. For example, if the chip running the process in electronic device 100 is a high-end chip, the second coefficient corresponding to the large core of electronic device 100 is the ratio of the processing power of the large core to the processing power of the small core, for example, 5:1; the second coefficient corresponding to the medium core of electronic device 100 is the ratio of the processing power of the medium core to the processing power of the small core, for example, 3:1; and the second coefficient corresponding to the small core of electronic device 100 is 1:1. For example, if the chip running the process in electronic device 100 is a low-end chip, the second coefficient corresponding to the large core of electronic device 100 is 3.5:1, the second coefficient corresponding to the medium core of electronic device 100 is 2:1, and the second coefficient corresponding to the small core of electronic device 100 is 1:1.
[0039] In this embodiment, the second waterline increment value is a unit value for increasing the minimum storage or cache size to match the processing capability (processing rate or processing frequency) of the kernel running the process.
[0040] In this embodiment, the electronic device 100 determines the second coefficient and the second waterline increment value of the second coefficient by looking up the second relationship table according to the kernel. In this embodiment, the second relationship 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 determines the second coefficient and second waterline increment value corresponding to the kernel by looking up the second relationship table according to the kernel running the process. For example, in the second relationship table, the second coefficient of the large kernel is 1, and the second waterline increment value of the large kernel is 5M; the second coefficient of the medium kernel is 3, and the second waterline increment value of the medium kernel is 3M; the second coefficient of the small kernel is 5, and the second waterline increment value of the medium kernel is 2M.
[0041] Step S304: Calculate the waterline value of the storage disk based on 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 configure the waterline value of the storage disk according to the calculated waterline value. For example, configure the calculated waterline value as the waterline value of the storage disk.
[0042] In this embodiment, the waterline value of the storage disk is calculated according to the formula S = C * K + D * T, where C is a first coefficient, K is the first waterline increment value of the first coefficient, D is a second coefficient, T is the 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, then the waterline value calculated according to the formula S = C * K + D * T is S = 0.25 * 3M + 3 * 3M = 9.75M.
[0043] In this embodiment, the waterline value of the storage disk includes an upper waterline value and a lower waterline value. In this embodiment, the first waterline increment value includes a first upper waterline increment value and a first lower waterline increment value. The second waterline increment value includes a second upper waterline increment value and a second lower waterline increment value. The electronic device 100 determines the first coefficient, the first upper waterline increment value, and the first lower upper waterline increment value corresponding to the historical read / write data volume by looking up a first relation table based on the historical read / write data volume. The electronic device 100 determines the second coefficient, the second upper waterline increment value, and the second lower waterline increment value corresponding to the kernel by looking up a second relation table based on the kernel running the process. The electronic device 100 calculates the upper waterline value of the storage disk according to the formula S1 = C*K1 + D*T1, where K1 is the first upper waterline increment value of the first coefficient, T1 is the second upper waterline increment value of the second coefficient, and S1 is the upper waterline value of the storage disk. The electronic device 100 calculates the bottom waterline value of the storage disk according to the formula S2 = C*K2 + D*T2, where K2 is the first bottom waterline increment value of the first coefficient, T2 is the second bottom waterline increment value of the second coefficient, and S2 is the bottom waterline value of the storage disk. The electronic device 100 determines the waterline range of the storage disk based on the calculated top and bottom waterline values, and dynamically configures the waterline value of the storage disk according to the waterline range, for example, configuring the waterline value of the storage disk within the specified waterline range.
[0044] In this embodiment, after enabling the DM-verity function, the waterline value of the storage disk is dynamically adjusted according to the historical read and write data volume of the storage disk where the process executing the DM-verity function is located and the processing capability of the core of the running process. This can reasonably occupy and release storage resources, avoiding the problem that if the waterline configuration is too high, the storage disk with low usage frequency cannot be reclaimed, resulting in the waste of storage resources, and if the waterline configuration is too low, the storage disk with high usage frequency will be reclaimed too quickly, resulting in the reduced lifespan of the storage disk.
[0045] refer to Figure 4The diagram shows a software structure block diagram of an electronic device 100 according to one embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system of the electronic device 100 is divided into four layers, from top to bottom: the Application layer, the Application Framework layer, the Android runtime and system libraries, and the Kernel layer.
[0046] The application layer can include a series of applications. For example... Figure 4 As shown, the applications may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, and other applications. In this embodiment, the applications can be third-party applications, referring to software provided by software companies other than the manufacturer of the non-linear editing system. Most of these software programs cannot directly interface with the non-linear editing card for input / output, but they can process and edit audio and video materials already on the hard drive array, or create their own 2D and 3D images and then composite them with the video materials. The composited work is then output by the input / output software.
[0047] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0048] As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0049] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0050] Content providers are used to store and retrieve data, and make that data accessible to applications. This data may include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, etc.
[0051] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0052] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).
[0053] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and so on.
[0054] The notification manager allows applications to display notifications in the status bar. These can be used to convey informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating the smart device, and flashing indicator lights.
[0055] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0056] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0057] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0058] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), file systems, etc.
[0059] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0060] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, G.264, MP3, AAC, AMR, JPG, and PNG.
[0061] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0062] A 2D graphics engine is a graphics engine for 2D drawing.
[0063] A file system is a system used to define files on storage devices (such as disks, NAND flash solid-state drives) or partitions.
[0064] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0065] refer to Figure 5 The diagram shows a hardware structure schematic of an electronic device 100 according to one embodiment of this application. The electronic device 100 may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device, and / or smart city device. Some embodiments of this application do not impose special limitations on the specific type of the electronic device 100.
[0066] 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, antenna 1, 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, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0067] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0068] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0069] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0070] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0071] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (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.
[0072] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to a touch sensor, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to a touch sensor through the I2C interface, enabling the processor 110 and the touch sensor to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0073] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0074] The PCM interface can 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 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0075] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0076] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 100 to display images.
[0077] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0078] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices 100, such as AR devices.
[0079] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0080] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via a USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device 100 via the power management module 141.
[0081] The power management module 141 connects 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 charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0082] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0083] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0084] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0085] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted 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 separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0086] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc.
[0087] The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0088] 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, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), 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 the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0089] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0090] Display screen 194 is used to display images, videos, etc. 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 (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0091] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0092] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0093] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0094] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0095] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0096] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0097] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).
[0098] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
[0099] Internal memory 121 or external memory interface 120 is used to store one or more computer programs. The one or more computer programs are configured to be executed by processor 110. The one or more computer programs include multiple instructions that, when executed by processor 110, implement the waterline setup method for the storage disk executed on electronic device 100 in the above embodiments.
[0100] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0101] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 115, or some functional modules of the audio module 170 may be located in the processor 115.
[0102] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0103] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0104] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0105] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0106] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the waterline setting method for the storage disk in the above embodiment.
[0107] In addition, some embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory. The memory is used to store computer execution instructions. When the apparatus is running, the processor can execute the computer execution instructions stored in the memory to cause the chip to execute the waterline setting method of the storage disk in the above method embodiments.
[0108] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.
[0109] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0110] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0111] The unit described as a separate component may or may not be physically separate. The component shown as a unit can be one physical unit or multiple physical units, that is, it can be located in one place or distributed in multiple different places. Some or all of the units can be selected to achieve the purpose of the solution in this embodiment according to actual needs.
[0112] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0113] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of some embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of some embodiments of this application and are not intended to limit it. Although some embodiments of this application have been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of some implementation examples of this application without departing from the spirit and scope of the technical solutions of some embodiments of this application.
Claims
1. A method for setting the waterline on a storage disk, characterized in that, The method includes: Detect the process executing the DM-verity function; If a process executing the DM-verity function is detected, the historical read and write data volume of the storage disk where the process is located is obtained, and a first coefficient and a first waterline increment value of the first coefficient are determined based on the historical read and write data volume of the storage disk. The first coefficient is the usage coefficient of the historical read and write data volume of the storage disk, and the first waterline increment value is the unit value of increasing the minimum storage volume matched according to the historical read and write data volume of the storage disk. The first coefficient is determined based on the usage frequency of the storage disk. The kernel running the process is determined, and a second coefficient and a second waterline increment value of the second coefficient are determined based on the kernel. The value of the second coefficient is the ratio of the processing rate or frequency of the kernel to the processing rate or frequency of the small core. The value of the second waterline increment is the unit value of increasing the minimum storage amount to match the processing rate or frequency of the kernel running the process. The waterline value of the storage disk is calculated based on the first coefficient, the first waterline increment value, the second coefficient, and the second waterline increment value, and the waterline value of the storage disk is dynamically configured based on the calculated waterline value.
2. The waterline setting method for the storage disk as described in claim 1, characterized in that, The step of determining the first coefficient based on the historical read / write data volume of the storage disk, and the first waterline increment value of the first coefficient, includes: Based on the historical read and write data volume of the storage disk, the first coefficient and the first waterline increment value corresponding to the historical read and write data volume of the storage disk are determined by searching the first relation table.
3. The waterline setting method for the storage disk as described in claim 1, characterized in that, The step of determining the second coefficient based on the kernel, and the second waterline increment value of the second coefficient, includes: The second coefficient and the second waterline increment value corresponding to the kernel are determined by looking up the second relation table according to the kernel.
4. The waterline setting method for the storage disk as described in claim 1, characterized in that, The step of calculating the waterline value of the storage disk based on the first coefficient, the first waterline increment value, the second coefficient, and the second waterline increment value includes: The waterline value of the storage disk is calculated according to the formula S=C*K+D*T, where 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 waterline value of the storage disk.
5. The waterline setting method for a storage disk as described in claim 1, characterized in that, The waterline value of the storage disk includes 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. The second waterline increment value includes a second upper waterline increment value and a second lower waterline increment value.
6. The waterline setting method for a storage disk as described in claim 5, characterized in that, The step of calculating the waterline value of the storage disk based on the first coefficient, the first waterline increment value, the second coefficient, and the second waterline increment value includes: The water level value of the storage disk is calculated according to the formula S1=C*K1+D*T1, where C is the first coefficient, K1 is the first water level increment of the first coefficient, D is the second coefficient, T1 is the second water level increment of the second coefficient, and S1 is the water level value of the storage disk. The water level value of the storage disk is calculated according to the formula S2 = C * K2 + D * T2, where K2 is the first water level increment of the first coefficient, T2 is the second water level increment of the second coefficient, and S2 is the water level value of the storage disk. The waterline range of the storage disk is determined based on the calculated upper and lower waterline values.
7. The waterline setting method for a storage disk as described in claim 6, characterized in that, The method further includes: The waterline value of the storage disk is dynamically configured according to the waterline range of the storage disk.
8. The waterline setting method for a storage disk as described in claim 1, characterized in that, The kernels are divided into large kernels, medium kernels, and small kernels according to their processing speed or frequency. The processing speed or frequency of large kernels is higher than that of medium kernels, and the processing speed or frequency of medium kernels is higher than that of small kernels.
9. The waterline setting method for a storage disk as described in claim 8, characterized in that, 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 medium core is 3:1, and the second coefficient of the small core is 1:
1.
10. The waterline setting method for a storage disk as described in claim 8, characterized in that, 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 medium core is 2:1, and the second coefficient of the small core is 1:
1.
11. The waterline setting method for a storage disk as described in claim 1, characterized in that, The method further includes: If a process executing the DM-verity function is detected, the file system maps the mapped device to the target device, where the mapped device is a logical device and the target device is either the physical space segment mapped by the mapped device or the physical device mapped by the mapped device.
12. The waterline setting method for a storage disk as described in claim 11, characterized in that, The target device includes a data device and a hash device.
13. The waterline setting method for a storage disk as described in claim 1, characterized in that, The historical read / write data volume of the storage disk includes the amount of data written to the storage disk and the amount of data read from the storage disk.
14. An electronic device, characterized in that, Includes a processor and a memory; wherein the processor is coupled to the memory; The memory is used to store program instructions; The processor is configured to read the program instructions stored in the memory to implement the waterline setting method for the storage disk as described in any one of claims 1 to 13.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that, when executed on an electronic device, cause the electronic device to perform the waterline setup method for the storage disk as described in any one of claims 1 to 13.
Citation Information
Patent Citations
Method for reducing latency of accessing data stored in a file system on a computer storage device by caching file system permission information in the computer storage device
US20130254477A1
Method and devices for managing cache
US20190102308A1