CN115878500A - Memory recovery method and device, electronic equipment and readable storage medium - Google Patents

Memory recovery method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN115878500A
CN115878500A CN202111167835.2A CN202111167835A CN115878500A CN 115878500 A CN115878500 A CN 115878500A CN 202111167835 A CN202111167835 A CN 202111167835A CN 115878500 A CN115878500 A CN 115878500A
Authority
CN
China
Prior art keywords
module
shrinker
list
memory
registered
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
CN202111167835.2A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202111167835.2A priority Critical patent/CN115878500A/en
Priority to PCT/CN2022/113964 priority patent/WO2023051094A1/en
Publication of CN115878500A publication Critical patent/CN115878500A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application is applicable to the technical field of terminals, and provides a memory recovery method and device, an electronic device and a readable storage medium. The memory recovery method comprises the following steps: in response to a memory recycling instruction, recycling the memory of the modules registered in the first list, and recycling the memory of the modules registered in the second list, wherein the activity index of the modules registered in the first list is smaller than a first threshold, the activity index of the modules registered in the second list is greater than or equal to the first threshold, and the activity index is used for indicating the frequency of unloading module registration. Since the module registration uninstall frequency registered in the first list is low. The module registration uninstall frequency registered in the second list is high. When the memory is recycled, the probability of writing/reading of the modules in the first list is reduced, the probability of blocking when the memory is recycled is further reduced, and the dynamic performance of the system in a low-memory state is effectively improved.

Description

Memory recovery method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of terminals, and in particular, to a method and an apparatus for memory recovery, an electronic device, and a readable storage medium.
Background
The slice (slab) mechanism is a partner system (buddy system) based memory allocation mechanism in Lin Nasi (Linux) system. In the partner system, memory is generally managed and allocated in units of 4kB pages. However, in actual applications, the memory requirement is mostly in units of bytes. Through the slab mechanism, a page of memory in the partner system can be distributed and managed in units of bytes.
In a Linux kernel (kernel), a plurality of modules all apply for a slab memory, and when each module applies for the slab memory, a recoverer (shrinker) is registered in the Linux kernel. Each shrinker is registered to a global linked list (shrinker _ list). When the system needs to recover the slab memory, the sharker _ list is traversed, sharkers registered by the modules are sequentially visited, and the slab memory of each module is recovered.
However, the shrinker _ list is protected by a shrinker read/write semaphore (shrinker _ rwsem) lock when reading and writing. This may cause the system to block the actions of other modules registering the shrinker and registering the shrinker to the shrinker _ list when reading the shrinker _ list to recycle the slab memory.
Disclosure of Invention
The embodiment of the application provides a memory recovery method, a memory recovery device, an electronic device and a readable storage medium, and can solve the problem that when a system reads a shrinker _ list to recover a slab memory, the actions of registering the shrinker with other modules and registering the shrinker with the shrinker _ list are blocked.
In a first aspect, an embodiment of the present application provides a memory recycling method, including: in response to a memory recycling instruction, recycling the memory of the modules registered in the first list, and recycling the memory of the modules registered in the second list, wherein the activity index of the modules registered in the first list is smaller than a first threshold, the activity index of the modules registered in the second list is greater than or equal to the first threshold, and the activity index is used for indicating the frequency of unloading module registration.
The memory recovery method provided by the embodiment of the application can be applied to electronic devices such as a mobile phone, a tablet personal computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), and the like, and the embodiment of the application does not limit the specific types of the electronic devices at all.
In the first aspect, since the activity index of the module registered in the first list is less than the first threshold, the module with the lower unloading frequency is registered. The activity index of the modules registered in the second list is greater than or equal to the first threshold, and the modules with higher unloading frequency are registered. When the memory is recycled, the probability of writing/reading of the modules in the first list is reduced, the probability of blocking when the memory is recycled is further reduced, and the dynamic performance of the system in a low-memory state is effectively improved.
In some embodiments, the method further comprises: when a module is registered, an activity index of the registered module is obtained. When the activity index of the module is less than a first threshold, the module is registered in a first list. When the activity index of the module is greater than or equal to the first threshold, the module is registered in the second list.
In some embodiments, the method further comprises: when unloading a module registered in the first list or the second list, the activity index of the unloaded module is incremented by one.
In some embodiments, each module corresponds to a shrinker, the shrinker includes a recovery function corresponding to the module, and the recovery function is used for recovering the memory of the module during execution.
In some embodiments, registering the module in the first list includes: and registering the shrinker corresponding to the module in the first list.
In some embodiments, registering the module in the second list includes: and registering the shrinker corresponding to the module in the second list.
In some embodiments, uninstalling a module in the first list or the second list includes: and unloading shrinkers corresponding to the modules in the first list or the second list from the first list or the second list.
In some embodiments, obtaining an activity index of a registered module when the module is registered comprises: and acquiring a recovery function in the shrinker corresponding to the registered module. And acquiring the activity index of the shrinker from a pre-stored global array according to the recovery functions, wherein the pre-stored global array comprises a plurality of recovery functions and the activity index of the shrinker corresponding to each recovery function. The activity index of shrinker is taken as the activity index of the module.
In some embodiments, adding one to the activity index of the unloaded module comprises: and acquiring a recovery function in the shrinker corresponding to the unloaded module. And adding one to the shrinker active index in a pre-stored global array according to the recovery function, wherein the pre-stored global array comprises a plurality of recovery functions and the shrinker active index corresponding to each recovery function.
In some embodiments, the method further comprises: the method comprises the steps of obtaining an active index of the shrinker from a pre-stored global array according to recovery functions in the shrinker, wherein the pre-stored global array comprises a plurality of recovery functions and the active index of the shrinker corresponding to each recovery function. The shrinker activity index is stored in the shrinker.
In some embodiments, obtaining the shrinker activity index in a pre-stored global array according to a recycling function in the shrinker includes: and traversing the pre-stored global array according to the recovery function, and searching for the shrinker active index corresponding to the recovery function. And when the shrinker activity index corresponding to the recovery function is found, taking the shrinker activity index as the module activity index. And when the shrinker active index corresponding to the recovery function is not found, adding the recovery function into a pre-stored global array, setting the shrinker active index corresponding to the recovery function as a preset numerical value, and taking the preset numerical value as the module active index.
In some embodiments, obtaining an activity index for a registered module comprises: and acquiring the activity index of the shrinker in the shrinker corresponding to the registered module. The activity index of shrinker is taken as the activity index of the module.
In some embodiments, uninstalling a module registered in the first list or the second list includes: and acquiring the activity index of the shrinker in the shrinker corresponding to the module to be unloaded. And when the shrinker activity index is smaller than a first threshold value, unloading the module from the first list. And when the shrinker activity index is greater than or equal to the first threshold value, unloading the module from the second list.
In some embodiments, adding one to the activity index of the unloaded module comprises: and adding one to the shrinker activity index in the shrinker corresponding to the unloaded module.
In some embodiments, after adding one to the shrinker activity index of the shrinker corresponding to the unloaded module, the method further includes: and acquiring a recovery function in the shrinker corresponding to the unloaded module. And according to a recycling function, adding one to the shrinker activity index in a pre-stored global array.
In some embodiments, in response to the memory reclamation instruction, reclaiming the memory of the modules registered in the first list and reclaiming the memory of the modules registered in the second list include: and responding to the memory recovery instruction, executing a recovery function corresponding to each module registered in the first list, and recovering the memory of each module registered in the first list. And responding to the memory recovery instruction, executing a recovery function corresponding to each module registered in the second list, and recovering the memory of each module registered in the second list.
In a second aspect, an embodiment of the present application provides a memory recycling apparatus, including a recycling module, configured to recycle a memory of a module registered in a first list and a memory of a module registered in a second list in response to a memory recycling instruction, where an activity index of the module registered in the first list is smaller than a first threshold, the activity index of the module registered in the second list is greater than or equal to the first threshold, and the activity index is used to indicate how frequently the module is unloaded by registration.
In some embodiments, the apparatus further comprises a registration module for obtaining an activity index of a registered module when the module is registered. When the activity index of the module is less than a first threshold, the module is registered in a first list. When the activity index of the module is greater than or equal to the first threshold, the module is registered in the second list.
In some embodiments, the apparatus further comprises an uninstall module to, when uninstalling the modules registered in the first list or the second list, increase an activity index of the uninstalled modules by one.
In some embodiments, each module corresponds to a shrinker, the shrinker includes a recovery function corresponding to the module, and the recovery function is used for recovering the memory of the module during execution.
In some embodiments, the registering module is specifically configured to register a shrinker corresponding to the module in the first list.
In some embodiments, the module is specifically configured to register a shrinker corresponding to the module in the second list.
In some embodiments, the unloading module is specifically configured to unload the shrinker corresponding to the module in the first list or the second list from the first list or the second list.
In some embodiments, the registration module is specifically configured to obtain a recovery function in a shrinker corresponding to the registered module. And acquiring the active index of the shrinker from a pre-stored global array according to the recovery functions, wherein the pre-stored global array comprises a plurality of recovery functions and the active index of the shrinker corresponding to each recovery function. The activity index of shrinker is taken as the activity index of the module.
In some embodiments, the unloading module is specifically configured to obtain a recovery function in a shrinker corresponding to the unloaded module. And adding one to the shrinker active index in a pre-stored global array according to the recovery function, wherein the pre-stored global array comprises a plurality of recovery functions and the shrinker active index corresponding to each recovery function.
In some embodiments, the registration module is further configured to obtain an activity index of the shrinker in a pre-stored global array according to a recovery function in the shrinker, where the pre-stored global array includes a plurality of recovery functions and the activity index of the shrinker corresponding to each recovery function. The shrinker activity index is stored in the shrinker.
In some embodiments, the registration module is specifically configured to traverse a pre-stored global array according to the recovery function, and search for a shrinker activity index corresponding to the recovery function. And when the shrinker activity index corresponding to the recovery function is found, taking the shrinker activity index as the module activity index. And when the shrinker active index corresponding to the recovery function is not found, adding the recovery function into a pre-stored global array, setting the shrinker active index corresponding to the recovery function as a preset numerical value, and taking the preset numerical value as the module active index.
In some embodiments, the registration module is specifically configured to obtain an activity index of a shrinker in the shrinker corresponding to the registered module. The activity index of shrinker is taken as the activity index of the module.
In some embodiments, the unloading module is specifically configured to obtain an activity index of a shrinker in the shrinker corresponding to the module to be unloaded. And when the shrinker activity index is smaller than a first threshold value, unloading the module from the first list. And when the shrinker activity index is greater than or equal to the first threshold value, unloading the module from the second list.
In some embodiments, the unloading module is further configured to add one to the shrinker activity index of the shrinker corresponding to the unloaded module.
In some embodiments, the unloading module is further configured to obtain a recovery function in a shrinker corresponding to the unloaded module. And according to a recycling function, adding one to the shrinker activity index in a pre-stored global array.
In some embodiments, the recovery module is specifically configured to execute a recovery function corresponding to each module registered in the first list in response to a memory recovery instruction, and recover the memory of each module registered in the first list. And responding to the memory recovery instruction, executing a recovery function corresponding to each module registered in the second list, and recovering the memory of each module registered in the second list.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the method provided by the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, where a computer program is stored, and when executed by a processor, the computer program implements the method provided in the first aspect.
In a fifth aspect, the present application provides a computer program product, which when run on an electronic device, causes the electronic device to execute the method provided in the first aspect.
In a sixth aspect, an embodiment of the present application provides a chip system, where the chip system includes a memory and a processor, and the processor executes a computer program stored in the memory to implement the method provided in the first aspect.
In a seventh aspect, an embodiment of the present application provides a chip system, where the chip system includes a processor, the processor is coupled with the computer-readable storage medium provided in the fourth aspect, and the processor executes a computer program stored in the computer-readable storage medium to implement the method provided in the first aspect.
It is to be understood that, the beneficial effects of the second to seventh aspects may be referred to the relevant description of the first aspect, and are not repeated herein.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device applying a memory reclamation method;
fig. 2 is a schematic diagram illustrating a software structure of an electronic device applying the memory recovery method;
FIG. 3 is a schematic flow chart diagram illustrating a memory reclamation method provided herein;
fig. 4 illustrates a schematic diagram of a first list and a second list in the memory recovery method provided in the present application;
fig. 5 illustrates another schematic diagram of a first list and a second list in the memory reclamation method provided in the present application;
fig. 6 illustrates another schematic diagram of a first list and a second list in the memory reclamation method provided in the present application;
fig. 7 shows a block diagram of a memory recovery apparatus according to an embodiment of the present application;
fig. 8 shows a schematic structural diagram of another electronic device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise.
When the electronic device runs, the system kernel of the electronic device can recycle the memory from time to time. For example, when the kernel receives a memory call request that is greater than the free memory, it forces the memory to be reclaimed, providing sufficient memory for the call. Or the kernel can also recycle the memory at regular time, prepare for burst memory calling and the like.
Taking a Linux system as an example, the Linux kernel can recycle the memory through a slab mechanism. The slab mechanism is a memory allocation mechanism based on a partner system in the Linux system. In the partner system, memory is generally managed and allocated in units of 4kB pages. However, in actual applications, the memory requirement is mostly in units of bytes. Through the slab mechanism, a page of memory (4 kB) in the partner system can be distributed and managed in units of bytes.
In the Linux kernel, there are a plurality of modules that require memory recovery, such as a Flash Friendly File System (f 2 fs) module, an extensible Read-Only File System (erofs) module, a low memory killer (lowmemory killer, lmk) module, a graphics processing unit (gpu) module, and the like. When the modules requiring memory recovery apply for the slab memory, each module may register a sharker in the Linux kernel, for example, the sharker registered by the f2fs module may be named as f2fs _ sharker. Similarly, the herofs module registered shrinker may be named erofs _ shrinker, the lmk module registered shrinker may be named lmk _ shrinker, and the gpu module registered shrinker may be named gpu _ shrinker.
The shrinker is a structural body, a recovery function (scan _ objects) for recovering the corresponding module slab memory is stored in the structural body, and the Linux kernel can recover the slab memory applied by the corresponding module by calling the scan _ objects in the structural body. For example, scan _ objects corresponding to the f2fs module are stored in the f2fs _ shrinker, and after the Linux kernel calls the scan _ objects in the f2fs _ shrinker, the slab memory applied by the f2fs module can be recovered.
Currently, when a module is initialized, a shrinker corresponding to the module is added to a global list shrinker _ list. When the module is unloaded, the corresponding shrinker needs to be unloaded from the shrinker _ list. All shrinkers are registered on the same shrinker _ list, and the shrinker _ list needs to be protected through a shrinker _ rwsem lock when being read and written. When the Linux kernel recovers the slab memory (needs to read the shrinker _ list), the behavior of registering or unloading the shrinker (needs to write the shrinker _ list) of other modules can be blocked, so that the system is not smooth to operate, and the performance is reduced.
In view of the above, the present application provides a memory recycling method, including: in response to a memory recycling instruction, recycling the memory of the modules registered in the first list, and recycling the memory of the modules registered in the second list, wherein the activity index of the modules registered in the first list is smaller than a first threshold, the activity index of the modules registered in the second list is greater than or equal to the first threshold, and the activity index is used for indicating the frequency of unloading module registration.
Since the activity index of the module registered in the first list is less than the first threshold, the module with the lower unload frequency is registered (cold module). The activity index of the modules registered in the second list is greater than or equal to the first threshold, and the modules (thermal modules) with higher unloading frequency are registered. When the memory is recycled, the probability of writing/reading of the modules in the first list is reduced, the probability of blocking when the memory is recycled is further reduced, and the dynamic performance of the system in a low-memory state is effectively improved.
The memory recovery method provided by the embodiment of the application can be applied to electronic devices such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), and the like, and the embodiment of the application does not limit the specific types of the electronic devices.
Fig. 1 shows a schematic structural diagram of an electronic device applying a memory recovery method.
In fig. 1, 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 Identification Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application 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.
By way of example, when the electronic device 100 is a mobile phone, a tablet computer, or a large-screen device, all of the components shown in the drawings may be included, or only some of the components shown in the drawings may be included.
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 memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. Wherein, the different processing units may be independent devices or may be integrated in one or more processors.
The controller may be, among other things, a neural center and a command center of the electronic device 100. 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 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 180K, 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 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a 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 communicate audio signals to the wireless communication module 160 through an I2S interface.
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, audio module 170 may also pass audio signals to wireless communication module 160 through a PCM interface. 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 parallel communications.
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 realize the function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 with peripheral devices such as the display screen 194, the 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 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, such as AR devices and the like.
It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an illustration, and does not limit 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 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 charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, 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 (not limited to the speaker 170A, the receiver 170B, etc.) 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), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. GNSS may include Global Positioning System (GPS), global navigation satellite system (GLONASS), beidou satellite navigation system (BDS), quasi-zenith satellite system (QZSS), and/or 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. Such as a teaching video and a user action picture video in the embodiment of the present application, 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 focal length of the lens can be used to indicate the viewing range of the camera, and the focal length of the lens Duan Yuexiao indicates that the viewing range of the lens is larger. 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 an image signal in a standard RGB, YUV and other formats.
In this application, the electronic device 100 may include 2 or more focal segments of cameras 193.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image 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 realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
In the embodiment of the present application, the NPU or other processor may be configured to perform operations such as analyzing and processing images in the video stored in the electronic device 100.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, and an application program (such as a sound playing function, an image playing function, etc.) required by at least one function. The storage data area may store data (e.g., audio data, phone book, etc.) created during use of the electronic device 100.
In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
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.
The audio module 170 is used to convert digital audio signals into analog audio signals for output and also to convert analog audio inputs into digital audio signals. 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 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic device 100 may listen to music through the speaker 170A, or listen to a hands-free call, for example, the speaker may play the comparison analysis result provided by the embodiment of the present application.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into a sound signal. When the electronic apparatus 100 receives a call or voice information, it is possible to receive voice by placing the receiver 170B close to the human ear.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking near the microphone 170C through the mouth. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and perform directional recording.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A.
In some embodiments, the touch operations that are applied to the same touch position but have different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for identifying the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and the like.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize range sensor 180F to range for fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human voice vibrating a bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal.
In some embodiments, bone conduction sensor 180M may also be provided in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signals acquired by the bone conduction sensor 180M, and the heart rate detection function is realized.
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 prompts 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 in response to 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 may 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.
Fig. 2 shows a schematic diagram of a software structure of an electronic device applying the memory recovery method.
As an example, the operating system in the electronic device 100 may be an Android system, lin Nasi (Linux) system, microsoft Windows system (Windows), apple mobile operating system (iOS), or hong meng system (Harmony OS), among others. The method provided by the application is particularly suitable for the Linux system or other systems derived based on the Linux system. Here, an operating system of the electronic apparatus 100 will be described as an example of a grand Monte Carlo system.
In some embodiments, a hongmeng system may be divided into four layers, including a kernel layer, a system services layer, a framework layer, and an application layer, with communication between the layers through a software interface.
As shown in FIG. 2, the Kernel Layer includes a Kernel Abstraction Layer (KAL) and a driver subsystem. The KAL comprises a plurality of kernels, such as a Kernel Linux Kernel of a Linux system, a Kernel LiteOS of a lightweight Internet of things system and the like. The Driver subsystem may include a Hardware Driver Foundation (HDF). The hardware driving framework can provide a unified peripheral access capability and a driving development and management framework. The kernel layer of the multi-kernel can select the corresponding kernel to process according to the requirements of the system.
The system service layer is a core capability set of the Hongmon system, and provides services for the application programs through the framework layer. The layer may include:
system basic capability subsystem set: and basic capability is provided for operations of running, scheduling, migrating and the like of the distributed application on multiple devices of the Hongmon system. The system can comprise subsystems such as a distributed soft bus, distributed data management, distributed task scheduling, multi-language runtime, a public base library, multi-mode input, graphics, security, artificial Intelligence (AI), a user program framework and the like. The multi-language runtime provides a system class library based on the C or C + + or JavaScript (JS) multi-language runtime, and may also provide a runtime for a Java program (i.e., a part developed by using Java language in an application program or framework layer) statically using a compiler.
Basic software service subsystem set: a common, general-purpose software service is provided for the hongmeng system. Subsystems such as event notification, telephony, multimedia, design For X (DFX), MSDP & DV, etc. may be included.
Enhanced software services subsystem set: a hongmeng system is provided with differentiated capability-enhanced software services for different devices. The system can comprise smart screen proprietary business, wearing proprietary business and Internet of Things (IoT) proprietary business subsystems.
Hardware services subsystem set: hardware services are provided for hong Meng systems. Subsystems that may include location services, biometric identification, wearing proprietary hardware services, ioT proprietary hardware services, and the like.
The framework layer provides multilingual User program frameworks (Java, C + +, JS and the like) and Ability (Ability) frameworks (User interfaces, UI) frameworks (including Java UI framework suitable for Java language and JS UI framework suitable for JS language) for Hongming system Application development, and multilingual framework Application Program Interfaces (API) with various software and hardware services open to the outside. The APIs supported by hong meng system devices may also vary depending on the degree of componentized clipping of the system.
The application layer comprises system applications and third-party non-system applications. The system applications may include applications installed by default on electronic devices such as desktops, control columns, settings, telephones, etc. The extended application may be an unnecessary application developed and designed by the manufacturer of the electronic device, such as an application program for electronic device stewards, change machine migration, notes, weather, and the like. The third party non-system applications may be developed by other vendors, but may run applications in a Hongmon system, such as gaming, navigation, social, or shopping applications.
Applications of the hongmeng system consist of one or more meta programs (FAs) or meta Services (PAs). The FA has a UI interface and provides the capability of interacting with the user. And the PA has no UI interface, and provides the capability of running tasks in the background and uniform data access abstraction. The PA primarily provides support for the FA, for example as a background service to provide computing power, or as a data repository to provide data access capability. The application developed based on FA or PA can realize specific service function, support cross-device scheduling and distribution, and provide consistent and efficient application experience for users.
Hardware mutual assistance and resource sharing can be realized among a plurality of electronic devices operating a Hongmon system through a distributed soft bus, distributed device virtualization, distributed data management and distributed task scheduling.
Fig. 3 shows a schematic flowchart of the memory reclamation method provided in the present application, and by way of example and not limitation, the method may be applied to the electronic device 100, where a kernel subsystem of a hongmeng system operated by the electronic device 100 includes a Linux kernel.
S201, responding to the registration instruction, and acquiring the shrinker activity index of the registration module.
In some embodiments, when the Linux kernel determines to recycle the memory, the modules needing memory recycling can be determined through a slab mechanism and the memory corresponding to each module is recycled. If a module needs to reclaim memory, it is not registered on the first list or the second list. It is determined that the module needs to be registered. And the Linux kernel generates a registration instruction and instructs the module to register.
Before registration, the activity index of the shrinker of the module can be obtained from a pre-stored global list according to a recovery function stored in the shrinker of the module. The global list can be stored in a cache, a local storage or a cloud in an array form, the global list includes a plurality of recovery functions and an activity index corresponding to each recovery function, each recovery function corresponds to one shrinker, and the activity index of the shrinker is the activity index corresponding to the recovery function corresponding to the shrinker. When each module is registered for the first time (that is, the recovery function corresponding to the module is not found in the pre-stored global list), the recovery function corresponding to the shrinker of the module is written into the global list, and the activity index of the shrinker is set to a preset value, for example, the preset value of the activity index corresponding to the recovery function may be set to 0.
As an example, the recycle function corresponding to the gpu _ shredder of the gpu module can be written as gpu _ scan _ objects. When the gup module registers for the first time (i.e., gpu _ scan _ objects are not found in the global list), gpu _ scan _ objects are written into the global list, and the activity exponent corresponding to gpu _ scan _ objects is set to 0. Each time a gpu module unloads, the activity index corresponding to a gpu _ scan _ objects in the global list may be incremented by 1.
When the gpu module is registered again, searching the corresponding active index in the global list according to the gpu _ scan _ objects, and taking the searched active index as the active index of the gpu _ shredder.
S202, storing the shrinker activity index into the shrinker.
The shrinker is a structural body, the structural body is composed of at least one piece of data, and each piece of data composing the structural body is called a "member" of the structural body, namely the structural body comprises at least one member.
The shrinker in this embodiment may include members such as a recycling function and an active _ index (active _ index). For example, the gpu _ sharker may include two members, gpu _ scan _ objects and gpu _ active _ index. Referring to S201, the activity index of gpu _ breaker found from the global list may be stored in a gpu _ active _ index.
S203, determining whether the activity index of the shrinker is smaller than a first threshold, if so, executing S204, otherwise, executing S205.
S204, registering the shrinker in the first list, and executing S210.
S205, register the shrinker in the second list, and execute S210.
In some embodiments, the shrinker activity indexes registered in the first list are all less than the first threshold. That is, the first list may also be referred to as a "cold list" (cold list), and a module corresponding to a shrinker registered in the first list may be referred to as a "cold module". The cold module is a module with lower unloading frequency in the Linux core, such as an f2fs module, an erofs module, a lmk module and the like. Similarly, the activity indexes of shrinkers registered in the second list are all greater than or equal to the first threshold. That is, the second list may also be referred to as a "hot list" (hot breaker list), and the module corresponding to the breaker registered in the second list may be referred to as a "hot module". The thermal module is a module with higher unloading frequency in the Linux core, such as a gpu module and the like.
Wherein the first threshold may be a preset value. As an example, the first threshold may be set to 20 at system initialization. Alternatively, the first threshold may also be updated from a server or cloud, etc. For example, the system may obtain an updated first threshold from the server or the cloud every 10 minutes, where the updated first threshold may be calculated by the server according to the global list uploaded by each electronic device.
It should be noted that registering the shrinker in the first list or the second list means adding the shrinker to the corresponding list. Hereinafter, the registration of shrinker to the first list or the second list will be described with reference to fig. 4 and 5.
Fig. 4 shows schematic diagrams of a first list and a second list in the memory reclamation method provided by the present application, and fig. 5 shows another schematic diagram of the first list and the second list in the memory reclamation method provided by the present application.
Referring to fig. 4, the first list includes "f2fs _ shrinker", "erofs _ shrinker", and "lmk _ shrinker"3 shrinkers. After "X _ shrinker" is registered in the first list, referring to fig. 5, the first list includes "f2fs _ shrinker", "erofs _ shrinker", "lmk _ shrinker", and "X _ shrinker"4 shrinkers. Where "X _ sharker" is used to denote any module that may be registered in the first list.
Similarly, referring to fig. 4, the second list includes "gpu _ shrinker"1 shrinker. After 3 shrinkers "a _ shrinker", "B _ shrinker" and "C _ shrinker" are registered in the second list, referring to fig. 5, the second list includes 4 shrinkers "gpu _ shrinker", "a _ shrinker", "B _ shrinker" and "C _ shrinker". Where "a _ breaker", "B _ breaker", and "C _ breaker" are used to denote any module that may be registered in the second list.
In some embodiments, the shrinker in the first list and the second list are sorted according to their registration time, and the earliest registration is ranked first. For example, referring to fig. 5, in the first list, shrinkers are sequentially "f2fs _ shrinker", "erofs _ shrinker", "lmk _ shrinker", and "X _ shrinker". In the second list, the sequence of the shrinkers is "gpu _ shrinker", "a _ shrinker", "B _ shrinker", and "C _ shrinker".
S206, responding to the unloading instruction, and obtaining the activity index of the shrinker in the shrinker corresponding to the module to be unloaded.
S207, determining whether the active index of the shrinker is smaller than a first threshold, if so, executing S208, otherwise, executing S209.
And S208, unloading the shrinker from the first list.
And S209, unloading the shrinker from the second list.
In some embodiments, when a module terminates running, the shrinker corresponding to the module needs to be unloaded from the first list or the second list. When unloading, the activity index of the shrinker can be obtained from the active _ index of the shrinker, and the shrinker can be unloaded from the first list or the second list according to the activity index of the shrinker. Referring to S201, after unloading a shrinker, the shrinker activity index is added by 1. That is, the value of active _ index is added by 1, and at the same time, the global list is searched for the corresponding active index according to scan _ objects in the shrinker, and the active index is added by 1.
The execution manner of S207 is the same as that of S203, and is not described herein.
In some embodiments, the termination of the operation of the module may include the electronic device terminating the corresponding module in response to the termination operation. Or, the module may perform destruction after executing the task, and the like, which is not limited herein.
It should be noted that unloading the shrinker from the first list or the second list refers to deleting the shrinker from the corresponding list. The unloading of shrinker from the first list or the second list is described below with reference to fig. 5 and 6.
Fig. 6 illustrates another schematic diagram of the first list and the second list in the memory reclamation method provided in the present application.
Referring to fig. 5, the first list includes "f2fs _ shrinker", "erofs _ shrinker", "lmk _ shrinker", and "X _ shrinker"4 shrinkers. Referring to fig. 6, when "X _ sharker" is unloaded, "X _ sharker" is deleted from the first list, and "f2fs _ sharker", "erofs _ sharker", and "lmk _ sharker" 3 sharkers are still left in the first list.
Similarly, referring to fig. 5, 4 shrinkers "gpu _ shrinker", "a _ shrinker", "B _ shrinker", and "C _ shrinker" are included in the second list. Referring to fig. 6, when unloading "C _ shredder", the "C _ shredder" is deleted from the second list, and the second list has "gpu _ shredder", "a _ shredder", and "B _ shredder" 3 shrinkers left.
It should be noted that the active index of the cold module may be continuously increased along with the continuous unloading and registering behavior of the Linux kernel until the active index corresponding to the cold module is greater than or equal to the first threshold after the cold module is unloaded, and then the cold module may be registered in the second list and converted into the hot module.
S210, determining whether a memory recovery instruction is received, if so, executing S211, otherwise, continuing to wait for receiving the memory recovery instruction.
S211, in response to the memory recycling instruction, recycling the memory of the shrinker registered in the first list, and recycling the memory of the shrinker registered in the second list.
In some embodiments, the system monitors the remaining memory, and forces the memory to be recycled when the Linux kernel receives a memory call application larger than the idle memory. Or the Linux kernel can also recycle the memory at regular time, prepare for burst memory calling and the like.
When the system forcibly recovers the memory or periodically recovers the memory, a memory recovery instruction is sent to the Linux kernel, and after the Linux kernel receives the memory recovery instruction, the memory of the shrinker registered in the first list is recovered and the memory of the shrinker registered in the second list is recovered in response to the memory recovery instruction.
In some embodiments, reclaiming memory of shrinkers registered in the first list or the second list may be implemented by sequentially reading and executing scan _ objects in each shrinker in the first list or the second list. For example, referring to fig. 5, when the memory corresponding to the first list is recycled, scan _ objects in the shrinker can be sequentially read and executed according to the sequence of "f2fs _ shrinker", "erofs _ shrinker", "lmk _ shrinker", and "X _ shrinker", so as to recycle the slab memory of the corresponding module.
Similarly, when the memory corresponding to the second list is recycled, scan _ objects in the breaker may be sequentially read and executed according to the sequence of "gpu _ breaker", "a _ breaker", "B _ breaker", and "C _ breaker", so as to recycle the slab memory of the corresponding module.
In the present application, S201 to S205 are steps of registering a module in a list, S206 to S209 are steps of unloading a module from a list, and S210 and S211 are steps of recovering a memory corresponding to a list. S201-S205, S206-S209, and S210 and S211 may be performed simultaneously or separately. For example, when a module is registered with the first list, the module may also be unloaded from the second list. Or when the slab memory of the module corresponding to the first list is recycled, the module may be registered in the second list or unloaded from the second list.
Because the first list and the second list are independent, the registration/unloading operation on the second list does not affect the recovery of the slab memory of the module corresponding to the first list, the blocking probability of the recovery memory and the registration/unloading operation can be effectively reduced, and the dynamic performance of the system in a low-memory state is effectively improved.
In some embodiments, more than two lists may be set, and the modules are registered in the corresponding lists according to multiple thresholds, and the manner of determining module attribution, module registration, module unloading, and memory recycling is similar to that in the present application, and is not described herein again.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 7 shows a structural block diagram of a memory recovery device provided in the embodiment of the present application, and for convenience of description, only parts related to the embodiment of the present application are shown.
Referring to fig. 7, the memory reclamation apparatus includes:
and the recycling module 31 is configured to recycle the memory of the modules registered in the first list and recycle the memory of the modules registered in the second list in response to a memory recycling instruction, where an activity index of the modules registered in the first list is smaller than a first threshold, the activity index of the modules registered in the second list is greater than or equal to the first threshold, and the activity index is used to indicate how frequently the modules are registered and unloaded.
In some embodiments, the apparatus further comprises a registration module 32 for obtaining an activity index of a registered module when the module is registered. When the activity index of the module is less than a first threshold, the module is registered in a first list. When the activity index of the module is greater than or equal to the first threshold, the module is registered in the second list. In some embodiments, the apparatus further comprises an uninstall module 33 for, when uninstalling the modules registered in the first list or the second list, adding one to the activity index of the uninstalled module.
In some embodiments, each module corresponds to a blender, the blender includes a recycle function corresponding to the module, and the recycle function is used for recycling a memory of the module during execution.
In some embodiments, the registering module 32 is specifically configured to register the shrinker corresponding to the module in the first list.
In some embodiments, the registering module 32 is specifically configured to register the shrinker corresponding to the module in the second list.
In some embodiments, the uninstalling module 33 is specifically configured to uninstall the shrinker corresponding to the module in the first list or the module in the second list from the first list or the second list.
In some embodiments, the registration module 32 is specifically configured to obtain a recycling function in a shrinker corresponding to the registered module. And acquiring the active index of the shrinker from a pre-stored global array according to the recovery functions, wherein the pre-stored global array comprises a plurality of recovery functions and the active index of the shrinker corresponding to each recovery function. The activity index of shrinker is taken as the activity index of the module.
In some embodiments, the registration module 32 is specifically configured to traverse a pre-stored global array according to the recovery function, and search for a shrinker activity index corresponding to the recovery function. And when the shrinker activity index corresponding to the recovery function is found, taking the shrinker activity index as the module activity index. And when the shrinker active index corresponding to the recovery function is not found, adding the recovery function into a pre-stored global array, setting the shrinker active index corresponding to the recovery function as a preset numerical value, and taking the preset numerical value as the module active index.
In some embodiments, the unloading module 33 is specifically configured to obtain a recovery function in a shrinker corresponding to the unloaded module. And adding one to the shrinker active index in a pre-stored global array according to the recovery function, wherein the pre-stored global array comprises a plurality of recovery functions and the shrinker active index corresponding to each recovery function.
In some embodiments, the registration module 32 is further configured to obtain the activity index of the shrinker in a pre-stored global array according to a recovery function in the shrinker, where the pre-stored global array includes a plurality of recovery functions and the activity index of the shrinker corresponding to each recovery function. The shrinker activity index is stored in the shrinker.
In some embodiments, the registering module 32 is specifically configured to obtain an activity index of a shrinker in the shrinker corresponding to the registered module. The activity index of shrinker is taken as the activity index of the module.
In some embodiments, the unloading module 33 is specifically configured to obtain an activity index of a shrinker in the shrinker corresponding to the module to be unloaded. And when the shrinker activity index is smaller than a first threshold value, unloading the module from the first list. And when the shrinker activity index is greater than or equal to the first threshold value, unloading the module from the second list.
In some embodiments, the unloading module 33 is further configured to increase the activity index of the shrinker in the shrinker corresponding to the unloaded module by one.
In some embodiments, the unloading module 33 is further configured to obtain a recycling function in the shrinker corresponding to the unloaded module. And according to a recycling function, adding one to the shrinker activity index in a pre-stored global array.
In some embodiments, the reclaiming module 31 is specifically configured to execute a reclaiming function corresponding to each module registered in the first list in response to the memory reclaiming instruction, and reclaim the memory of each module registered in the first list. And responding to the memory recovery instruction, executing a recovery function corresponding to each module registered in the second list, and recovering the memory of each module registered in the second list.
It should be noted that, because the above-mentioned information interaction between the modules, the execution process, and other contents are based on the same concept, specific functions, and technical effects brought by the method embodiment of the present application may be specifically referred to a part of the method embodiment, and are not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 8 shows a block diagram of an electronic device according to an embodiment of the present application.
As shown in fig. 8, the electronic apparatus 400 of this embodiment includes: at least one processor 401 (only one shown in fig. 8), a memory 402, and a computer program 403 stored in the memory 402 and operable on the at least one processor 401, wherein the processor 401 executes the computer program 403 to implement the steps of the network switching method in the above embodiments.
The electronic device 400 may be a smartphone, a tablet, a wearable device, an Augmented Reality (AR)/Virtual Reality (VR) device, a large screen device, a vehicle-mounted terminal, and the like. The electronic device may include, but is not limited to, a processor 401, a memory 402.
Those skilled in the art will appreciate that fig. 8 is merely an example of the electronic device 400 and does not constitute a limitation of the electronic device 400 and may include more or less components than those shown, or combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The Processor 401 may be a Central Processing Unit (CPU), and the Processor 401 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 402 may be an internal storage unit of the electronic device 400 in some embodiments, such as a hard disk or a memory of the electronic device 400. The memory 402 may also be an external storage device of the electronic device 400 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc., provided on the electronic device 400.
Further, the memory 402 may also include both internal storage units and external storage devices of the electronic device 400. The memory 402 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of a computer program. The memory 402 may also be used to temporarily store data that has been output or is to be output.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
An embodiment of the present application provides a chip system, where the chip system includes a memory and a processor, and the processor executes a computer program stored in the memory to implement the steps in the foregoing method embodiments.
An embodiment of the present application provides a chip system, where the chip system includes a processor, the processor is coupled to a computer-readable storage medium, and the processor executes a computer program stored in the computer-readable storage medium to implement the steps in the above-mentioned method embodiments.
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 computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or apparatus capable of carrying computer program code to an electronic device, a recording medium, computer Memory, read-Only Memory (ROM), random-Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-drive, a removable hard drive, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described or recited in any embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed method, apparatus, and electronic device may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units 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 may be integrated into another system, 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 through some interfaces, indirect coupling or communication connection of 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 or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Finally, it should be noted that: the above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (19)

1. A memory reclamation method, comprising:
in response to a memory recycling instruction, recycling memory of modules registered in a first list, and recycling memory of modules registered in a second list, wherein an activity index of the modules registered in the first list is smaller than a first threshold, and an activity index of the modules registered in the second list is greater than or equal to the first threshold, and the activity index is used for indicating the frequency of unloading the module registration.
2. The method of claim 1, further comprising:
when a module is registered, acquiring an activity index of the registered module;
registering the module in the first list when an activity index of the module is less than a first threshold;
registering the module in the second list when the activity index of the module is greater than or equal to a first threshold.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
when unloading a module registered in the first list or the second list, adding one to an activity index of the unloaded module.
4. The method of claim 2 or 3, wherein each of the modules corresponds to a shrinker, and the shrinker includes a recovery function corresponding to the module, and the recovery function is used for recovering the memory of the module when executing.
5. The method of claim 4, wherein registering the module in the first list comprises:
and registering the shrinker corresponding to the module in the first list.
6. The method according to claim 4 or 5, wherein registering the module in the second list comprises:
and registering the shrinker corresponding to the module in the second list.
7. The method of any of claims 4-6, wherein offloading modules in the first list or the second list comprises:
unloading the shrinker corresponding to the modules in the first list or the second list from the first list or the second list.
8. The method according to any of claims 4-6, wherein obtaining an activity index of the registered module when the module is registered comprises:
acquiring a recovery function in the shrinker corresponding to the registered module;
acquiring the shrinker active index from a pre-stored global array according to the recovery function, wherein the pre-stored global array comprises a plurality of recovery functions and the shrinker active index corresponding to each recovery function;
and taking the activity index of the shrinker as the activity index of the module.
9. The method according to claim 8, wherein the obtaining the shrinker activity index in a pre-stored global array according to the recycling function comprises:
traversing the pre-stored global array according to the recovery function, and searching for the shrinker active index corresponding to the recovery function;
when the shrinker active index corresponding to the recovery function is found, taking the shrinker active index as the module active index;
and when the shrinker active index corresponding to the recovery function is not found, adding the recovery function into the pre-stored global array, setting the shrinker active index corresponding to the recovery function as a preset value, and taking the preset value as the module active index.
10. The method of claim 4 or 7, wherein adding one to the activity index of the unloaded module comprises:
acquiring a recovery function in the shrinker corresponding to the unloaded module;
and adding one to the shrinker active index in a pre-stored global array according to the recovery function, wherein the pre-stored global array comprises a plurality of recovery functions and the shrinker active index corresponding to each recovery function.
11. The method according to any one of claims 4-10, further comprising:
acquiring the activity index of the shrinker from a pre-stored global array according to recovery functions in the shrinker, wherein the pre-stored global array comprises a plurality of recovery functions and the activity index of the shrinker corresponding to each recovery function;
storing the activity index of the shrinker in the shrinker.
12. The method of claim 11, wherein obtaining an activity index of the registered module comprises:
acquiring an active index of the shrinker in the shrinker corresponding to the registered module;
and taking the activity index of the shrinker as the activity index of the module.
13. The method according to claim 11 or 12, wherein the uninstalling the registered modules in the first list or the second list comprises:
acquiring an active index of a shrinker in the shrinker corresponding to a module to be unloaded;
uninstalling the module from the first list when the shrinker activity index is less than the first threshold;
uninstalling the module from the second list when the shrinker activity index is greater than or equal to the first threshold.
14. The method of claim 11 or 13, wherein adding one to the activity index of the unloaded module comprises:
and adding one to the activity index of the shrinker in the shrinker corresponding to the unloaded module.
15. The method of claim 14, wherein after adding one to the shrinker activity index in the shrinker corresponding to the unloaded module, further comprising:
acquiring a recovery function in the shrinker corresponding to the unloaded module;
and according to the recovery function, adding one to the activity index of the shrinker in the pre-stored global array.
16. The method according to any one of claims 4-15, wherein the reclaiming memory of the modules registered in the first list and the reclaiming memory of the modules registered in the second list in response to the memory reclamation instruction comprises:
responding to the memory recovery instruction, executing a recovery function corresponding to each module registered in the first list, and recovering the memory of each module registered in the first list;
and responding to the memory recovery instruction, executing a recovery function corresponding to each module registered in the second list, and recovering the memory of each module registered in the second list.
17. A memory recycling device, comprising:
the recovery module is used for responding to a memory recovery instruction, recovering the memory of the modules registered in the first list, and recovering the memory of the modules registered in the second list, wherein the activity index of the modules registered in the first list is smaller than a first threshold, the activity index of the modules registered in the second list is larger than or equal to the first threshold, and the activity index is used for indicating the frequency of unloading the module registration.
18. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 15 when executing the computer program.
19. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 15.
CN202111167835.2A 2021-09-29 2021-09-29 Memory recovery method and device, electronic equipment and readable storage medium Pending CN115878500A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111167835.2A CN115878500A (en) 2021-09-29 2021-09-29 Memory recovery method and device, electronic equipment and readable storage medium
PCT/CN2022/113964 WO2023051094A1 (en) 2021-09-29 2022-08-22 Memory recovery method and apparatus, electronic device, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111167835.2A CN115878500A (en) 2021-09-29 2021-09-29 Memory recovery method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN115878500A true CN115878500A (en) 2023-03-31

Family

ID=85756793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111167835.2A Pending CN115878500A (en) 2021-09-29 2021-09-29 Memory recovery method and device, electronic equipment and readable storage medium

Country Status (2)

Country Link
CN (1) CN115878500A (en)
WO (1) WO2023051094A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116795298A (en) * 2023-08-28 2023-09-22 麒麟软件有限公司 IO optimization method and system for NVME memory under Linux

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9733939B2 (en) * 2012-09-28 2017-08-15 Intel Corporation Physical reference list for tracking physical register sharing
CN109213539B (en) * 2016-09-27 2021-10-26 华为技术有限公司 Memory recovery method and device
CN108228339B (en) * 2017-07-28 2021-08-13 珠海市魅族科技有限公司 Memory recovery method and device, terminal equipment and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116795298A (en) * 2023-08-28 2023-09-22 麒麟软件有限公司 IO optimization method and system for NVME memory under Linux
CN116795298B (en) * 2023-08-28 2023-11-24 麒麟软件有限公司 IO optimization method and system for NVME memory under Linux

Also Published As

Publication number Publication date
WO2023051094A1 (en) 2023-04-06

Similar Documents

Publication Publication Date Title
CN110347269B (en) Empty mouse mode realization method and related equipment
WO2021159746A1 (en) File sharing method and system, and related device
WO2021218429A1 (en) Method for managing application window, and terminal device and computer-readable storage medium
CN113805797B (en) Processing method of network resource, electronic equipment and computer readable storage medium
CN114116191A (en) Memory cold page processing method and electronic equipment
CN111865646A (en) Terminal upgrading method and related device
CN115129410B (en) Desktop wallpaper configuration method and device, electronic equipment and readable storage medium
CN114490174A (en) File system detection method, electronic device and computer readable storage medium
CN113973398A (en) Wireless network connection method, electronic equipment and chip system
CN115543145A (en) Folder management method and device
WO2023051094A1 (en) Memory recovery method and apparatus, electronic device, and readable storage medium
CN114968543A (en) Method for processing document page and related device
CN113901485B (en) Application program loading method, electronic device and storage medium
CN114077519B (en) System service recovery method and device and electronic equipment
CN114828098B (en) Data transmission method and electronic equipment
CN114915747B (en) Video call method, electronic device and readable storage medium
CN115185441A (en) Control method, control device, electronic equipment and readable storage medium
CN116048772B (en) Method and device for adjusting frequency of central processing unit and terminal equipment
CN110737916A (en) Communication terminal and processing method
WO2023185623A1 (en) Background application recovery method, apparatus, electronic device and readable storage medium
CN113704209B (en) Data sharing method, electronic device and storage medium
CN114329595B (en) Application program detection method, device, storage medium and program product
CN116048769B (en) Memory recycling method and device and terminal equipment
CN116048831B (en) Target signal processing method and electronic equipment
CN116723384B (en) Process control method, electronic device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination