CN109445943A - The EMS memory management process of I/O stack, system and relevant apparatus in kernel state system - Google Patents

The EMS memory management process of I/O stack, system and relevant apparatus in kernel state system Download PDF

Info

Publication number
CN109445943A
CN109445943A CN201811245448.4A CN201811245448A CN109445943A CN 109445943 A CN109445943 A CN 109445943A CN 201811245448 A CN201811245448 A CN 201811245448A CN 109445943 A CN109445943 A CN 109445943A
Authority
CN
China
Prior art keywords
memory
stack
ram
reserved
module
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
CN201811245448.4A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811245448.4A priority Critical patent/CN109445943A/en
Publication of CN109445943A publication Critical patent/CN109445943A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/524Deadlock detection or avoidance
    • 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]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Abstract

The EMS memory management process of I/O stack in a kind of kernel state system provided herein, comprising: reserved memory is determined whether according to total RAM remaining value and I/O stack demand amount of ram;If so, obtaining the pre- allowance of actual memory, and reserved memory ram according to total RAM remaining value and I/O stack demand amount of ram, reserved memory is obtained.By obtaining total RAM remaining value and I/O stack demand amount of ram, determine whether reserved memory, it and is I/O stack advance reservation memory when allowing, and the memory is only applied for I/O stack with pre-set particular interface, guarantee that I/O stack memory is sufficient when file system write-back process or recycling memory pageout, Memory recycle, which will not occur, leads to resource deadlock.The application also provides internal storage management system, a kind of computer readable storage medium and a kind of terminal of I/O stack in a kind of kernel state system, has above-mentioned beneficial effect.

Description

The EMS memory management process of I/O stack, system and relevant apparatus in kernel state system
Technical field
This application involves operating system field, in particular to the EMS memory management process of I/O stack in a kind of kernel state system is System and relevant apparatus.
Background technique
In Linux system, idle memory is used to do ache, buffer use, cache file system metadata, file Data page and block device file data substantially increase Linux system compared with directly reading/be written data from physical hard disk in this way I/O rate.Linux vfs is on certain opportunity by pdflush or bdi mechanism come the write back data to caching, write-back opportunity packet It includes write-back releasing memory when kupdate timing is write with a brush dipped in Chinese ink, dirty balance controls containing dirty pages ratio, low memory and calls sync Etc. systems call active write with a brush dipped in Chinese ink movement.
There are three watermark:WMARK_MIN, WMARK_LOW and WMARK_HIGH by each memory zone.When in zone Kswapd, which is waken up, when free memory is less than WMARK_LOW starts to recycle memory, represents when free memory is less than WMARK_MIN There is a serious shortage in the supply that Memory recycle pressure is very big for free memory, if kswpd terminates when opposite free memory amount is greater than WMARK_HIGH Recycling enters sleep.When each zone recycles memory, the hand that memory obtains can be determined according to zone_reclaim_mode mode Section: it is obtained from other zone, containing dirty pages is write back into disk (pageout) or dirty data is exchanged into exchange partition (swapout).
Based on the above mechanism, it is ensured that Memory Management Subsystem has the stability of height in primary Linux system. But in field of storage, developer needs to the various advanced feature I/O stacks of block device I/O system development, such as calamity Standby function, simplification volume, data encryption, data compression, redundancy backup etc., these I/O stacks are distributed in from user program to physics magnetic On the I/O access of disk.In I/O stack development process, also need to be allocated memory source for managing and storing I/O number According to it is discontinuous that common Memory Allocation interface has kmem_cache_alloc distribution slab memory, kmalloc, vmalloc to establish Mapping or _ _ get_free_pages of the physical memory to virtual address are directly allocated page frame, if to the mistake of memory Using will lead to including memory overflow, deadlock, loss of data risk.In file system write-back process or recycling memory When pageout, the above-mentioned I/O stack of I/O approach is there is still a need for consuming certain memory source, and I/O stack module is same when low memory It needs to initiate Memory recycle process and obtains memory;The multilayer I/O stack that will lead to system under limiting case generates race to memory, leads Livelock or deadlock on memory source is caused to generate.
Summary of the invention
The purpose of the application is to provide EMS memory management process, system, a kind of computer of I/O stack in a kind of kernel state system Readable storage medium storing program for executing and a kind of terminal solve multilayer I/O stack in existing system and are easy to appear memory livelock or deadlock situation.
In order to solve the above technical problems, the application provides a kind of EMS memory management process of I/O stack in kernel state system, specifically Technical solution is as follows:
Obtain total RAM remaining value and I/O stack demand amount of ram;
Reserved memory is determined whether according to total RAM remaining value and the I/O stack demand amount of ram;
If so, obtaining the pre- allowance of actual memory according to total RAM remaining value and the I/O stack demand amount of ram;
Memory ram is reserved according to the pre- allowance of the actual memory, obtains reserved memory;
Wherein, the reserved memory is applied for the I/O stack with the first preset interface.
Wherein, memory ram is reserved according to the pre- allowance of the actual memory, obtaining reserved memory includes:
According to the pre- allowance of the actual memory, memory ram is reserved in a manner of mempool+GFP_NOIO, is obtained in reserved It deposits.
Wherein, memory ram is reserved according to the pre- allowance of the actual memory, obtaining reserved memory includes:
According to the pre- allowance of the actual memory, memory ram is reserved in a manner of get_free_pages+GFP_NOIO, is obtained To reserved memory.
Wherein, further includes:
When target I/O stack is corresponding applied for memory use after, judge whether described using memory be described reserved Memory;
If so, calling the release of the second preset interface is described to use memory;
If it is not, calling kfress or free_pages release is described to use memory.
The application also provides a kind of internal storage management system of I/O stack in kernel state system, comprising:
Module is obtained, for obtaining total RAM remaining value and I/O stack demand amount of ram;
Judgment module, for determining whether to reserve according to total RAM remaining value and the I/O stack demand amount of ram Memory;
Computing module, if being when being, according to total RAM remaining value and the I/ for the judgment module judging result O stack demand amount of ram obtains the pre- allowance of actual memory;
Reserved module obtains reserved memory for reserving memory ram according to the pre- allowance of the actual memory;
Wherein, the reserved memory is applied for the I/O stack with the first preset interface.
Wherein, the reserved module is specially according to the pre- allowance of the actual memory, with the side of mempool+GFP_NOIO Formula reserves memory ram, obtains the module of reserved memory.
Wherein, the reserved module is specially according to the pre- allowance of the actual memory, with get_free_pages+GFP_ The mode of NOIO reserves memory ram, obtains the module of reserved memory.
Wherein, further includes:
Second judgment module, for when target I/O stack is corresponding applied for memory use after, judge in the use Whether deposit is the reserved memory;
First release module when being judged as YES for second judgment module, is called described in the release of the second preset interface Memory is used;
Second release module when being judged as NO for second judgment module, calls kfress or free_pages to release Memory has been used described in putting.
The application also provides a kind of computer readable storage medium, is stored thereon with computer program, the computer journey The step of EMS memory management process as described above is realized when sequence is executed by processor.
The application also provides a kind of terminal, including memory and processor, has computer program in the memory, institute State the step of realizing EMS memory management process as described above when processor calls the computer program in the memory.
The EMS memory management process of I/O stack in a kind of kernel state system provided herein, comprising: it is remaining to obtain total RAM Value and I/O stack demand amount of ram;It determines whether to reserve according to total RAM remaining value and the I/O stack demand amount of ram Memory;If so, obtaining the pre- allowance of actual memory according to total RAM remaining value and the I/O stack demand amount of ram;According to described The pre- allowance of actual memory reserves memory ram, obtains reserved memory;Wherein, the reserved memory is default with first for the I/O stack Interface is applied.
The application determines whether reserved memory by obtaining total RAM remaining value and I/O stack demand amount of ram, and It is I/O stack advance reservation memory when permission, and the memory is only applied for I/O stack with pre-set particular interface, guarantees File system write-back process or I/O stack memory is sufficient when recycling memory pageout, Memory recycle, which will not occur, causes resource dead Lock.The application also provides internal storage management system, a kind of computer readable storage medium and one of I/O stack in a kind of kernel state system Kind terminal, has above-mentioned beneficial effect, details are not described herein again.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow chart of the EMS memory management process of I/O stack in a kind of kernel state system provided by the embodiment of the present application;
Fig. 2 is the internal storage management system structural representation of I/O stack in a kind of kernel state system provided by the embodiment of the present application Figure.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Referring to FIG. 1, memory management side of the Fig. 1 for I/O stack in a kind of kernel state system provided by the embodiment of the present application The flow chart of method, this method comprises:
S101: total RAM remaining value and I/O stack demand amount of ram are obtained;
This step is intended to total RAM remaining value and I/O stack demand amount of ram in acquisition system.At this point it is possible to by all I/O Stack treats as an I/O stack module, then I/O stack demand amount of ram namely the required amount of ram of I/O stack module.
It after boot kernel, is loaded prior to I/O stack module, passes through the total RAM residue size of comprhensive deterministic system and I/O Stack module it is expected reserved amount of ram, is used with preparing to reserve a certain number of memory rams for subsequent I/O stack module.
S102: reserved memory is determined whether according to total RAM remaining value and the I/O stack demand amount of ram;If It is, into S103;
This step is intended to judge that current system is according to the total RAM remaining value and I/O stack demand amount of ram that obtain in S101 It is no to allow reserved memory, it is to be understood that when the total RAM remaining value of system is smaller, discomfort is combined into I/O stack, and to establish its exclusive Reserved memory.Judgment criteria specific for this step is not construed as limiting herein, it is preferred that is provided one kind herein and was specifically judged Journey:
Total RAM remaining value and I/O stack demand amount of ram are calculated, by the number of pages of page distribution on the basis of I/O stack is registered 30% memory of more applications is needed, it may unmatched problem with actual use for making up each number of pages memory grouping.
When the total memory surplus of system is less than 8GB, if totalfree-reserve < 2GB, do not allow reserved memory, System oops alarm.
When the total memory surplus of system is more than or equal to 8GB, if pre- allowance is greater than the 70% of free memory, do not allow pre- Stay memory, system oops alarm.Other situations can then carry out reserved memory.
S103: the pre- allowance of actual memory is obtained according to total RAM remaining value and the I/O stack demand amount of ram;
When allowing reserved memory, then need to calculate the pre- allowance of actual memory.The usual pre- allowance of actual memory can be higher than Calculated value.Certainly, preset corrected parameter can also be utilized when calculating the pre- allowance of actual memory, not limited specifically herein It is fixed.
S104: reserving memory ram according to the pre- allowance of the actual memory, obtains reserved memory;
It is not construed as limiting herein for how to reserve memory ram, it is preferred that the embodiment of the present application provides two kinds of reserved sides herein Method:
1, according to the pre- allowance of the actual memory, memory ram is reserved in a manner of mempool+GFP_NOIO, is reserved Memory.
2, according to the pre- allowance of the actual memory, memory ram is reserved in a manner of get_free_pages+GFP_NOIO, Obtain reserved memory.
It should be noted that method 1 for different allocation units by 256byte, 512byte, 1kb, 2kb, 4kb, 8kb, The sizes such as 16kb, 32kb, 64kb are allocated by group, and which copes with the scene frequently used in some a small amount of memories, such as Variable, structural body etc. are used to manage the data structure of I/O.Method 2 is also by the different number of pages point such as 1,2,4,8,16,32,64 Group carries out reserved distribution, which uses for the scene that immediate data stores, and I/O stack module is on demand never the same as number of pages Region obtains page.Both realizations can hold always reserved memory, will not be because of the page recycling machine of Linux system It makes and is released.It is identified using GFP_NOIO and applies for that memory is necessary to I/O stack module, can caused in this way to avoid Memory recycle Deadlock.
It should be noted that the reserved memory is applied for the I/O stack with the first preset interface.Reserved memory is only Applied for I/O stack with preset interface, in other words, this ensure that being kept away occupied by reserved memory will not carry out by other Exempt from I/O stack low memory and brings deadlock or livelock problem.
The embodiment of the present application provides a kind of EMS memory management process of I/O stack in kernel state system, surplus by obtaining total RAM Residual value and I/O stack demand amount of ram determine whether reserved memory, and are I/O stack advance reservation memory when allowing, and should Memory is only applied for I/O stack with pre-set particular interface, guarantees file system write-back process or recycling memory I/O stack memory is sufficient when pageout, and Memory recycle, which will not occur, leads to resource deadlock.
All users to provided by the embodiments of the present application including the first preset interface provide interface and are situated between below Continue, need to illustrate when, the first preset interface is actually memory application interface.And user provide interface include memory application, The interface for the functions such as memory lookup, memory discharge, memory is reserved.
User supplies the I/O stack module calls of each registration using interface, and I/O stack can pass through stor_mem_ when registering Reserve reserves fritter memory request, and input parameter includes Object Notation and reserved quantity;Pass through stor_pages_ Reserve reserves whole page memory, inputs number of pages and total amount of ram that parameter includes single application.
It can be applied by stor_mem_alloc interface when I/O stack module needs to apply fritter memory, this connects Mouthful parameter is the data structure symbol to be applied, and returning an object value pointer;Stor_pages_ is used when applying for a large amount of memories Alloc apply by page, which is the quantity of application page, and returns to the pointer of first character section, after memory application I/O stack module can be used freely.
It when specifying low memory in size internal memory group in trough, can be borrowed, be borrowed total to next memory group Size is not more than 30% amount of ram of the group, when borrow memory group is not able to satisfy application demand, can call directly kmalloc + GFP_NOIO or _ _ get_free_pages+GFP_NOIO application.
For application memory use after, I/O stack module can be used stor_mem_free to fritter memory carry out Release, the interface need to input the pointer to object returned when distribution;Whole page memory is released using stor_pages_alloc It puts, which is address pointer.It, can be by chained record address in release in application for the memory directly applied Kfree and free_pages is called to be discharged.
Memory strategy is adjusted flexibly according to query result convenient for I/O stack module in addition, also providing memory surplus query interface, Interface stor_mem_query can be used in inquiry fritter memory surplus, and input parameter is Object Notation, the interface returned data It include: memory group #, memory surplus, applying type (normal application/borrow);Inquiring whole page memory surplus can be used interface Stor_pages_query, input parameter are memory number of pages, and returned data includes: memory group #, memory surplus, application class Type (normal application/borrow).
It is understood that above each physical interface title is only preferred interface provided by the embodiments of the present application, herein On the basis of can also use other interfaces with same or similar function, herein it is different one citing limit.
Based on the above embodiment, as preferred embodiment, the embodiment of the present application carries out reserved memory application process More detailed description:
I/O stack module obtains memory from specified memory grouping by specified interface.Specified memory grouping refers to reserving Packetized memory in memory.
Step 1: I/O stack module calls stor_mem_query or stor_pages_query interface polls free memory It is grouped surplus.
Step 2: calling stor_mem_query, judges whether object legal and then computing object size, to corresponding Memory obtains free memory quantity in being grouped, and is inquired if memory is grouped remaining deficiency to borrow grouping, if still It is not able to satisfy and returns to NOMEM.Stor_pages_query is called, obtains free memory number into the grouping of correspondence memory page Amount is inquired to borrow grouping if memory is grouped remaining deficiency, returns to NOMEM if be not still able to satisfy.
Step 3: I/O stack module calls stor_mem_alloc input object symbol to carry out the application of fritter memory.It calls Stor_pages_alloc interface inputs number of pages and carries out memory application by page.
Step 4: for stor_mem_alloc interface, judge whether object is registered and then obtain object size, to first Simultaneously return address pointer is allocated in a memory grouping not less than the size.For calling stor_pages_alloc interface Press page distribution request, first judge apply for whether size legal, then obtained into the memory grouping of corresponding number of pages unused Page pointer, return to I/O stack use.
Step 5: when free memory is unable to meet demand in the grouping of the memory of application, it can be grouped and carry out to next memory It borrows, if borrowing grouping free memory less than 30%, borrows failure.Kmalloc is called directly to be allocated fritter memory, And record the method for salary distribution;System calls directly _ and _ get_free_pages is allocated to by page memory, and records the method for salary distribution.
Based on the above embodiment, as preferred embodiment, the embodiment of the present application carries out memory release process more detailed Thin explanation:
After I/O module has used the memory of application, memory realizing interface releasing memory is called.
Step 1: I/O stack module calls stor_mem_free input memory address progress fritter memory to be discharged.It adjusts It is discharged with stor_pages_free interface input page pointer.
Step 2: for calling stor_mem_free interface, this system is using mempool_free interface corresponding interior It deposits in grouping and discharges the address.For calling stor_pages_free interface, directly label changes from the grouping of corresponding page Page is unused.
Step 3: if this it is interior save as direct storage allocation, i.e., be not reserved memory, then according to the distribution type tune of record Memory release is carried out with kfree or free_pages.
The internal storage management system of I/O stack in a kind of kernel state system provided by the embodiments of the present application is introduced below, Internal storage management system described below can correspond to each other reference with above-described EMS memory management process.
Fig. 2 is participated in, Fig. 2 is the internal storage management system of I/O stack in a kind of kernel state system provided by the embodiment of the present application Structural schematic diagram, the application also provide a kind of internal storage management system of I/O stack in kernel state system, and specific technical solution is as follows:
Module 100 is obtained, for obtaining total RAM remaining value and I/O stack demand amount of ram;
Judgment module 200, for being determined whether according to total RAM remaining value and the I/O stack demand amount of ram Reserved memory;
Computing module 300, if being when being, according to total RAM remaining value and institute for the judgment module judging result It states I/O stack demand amount of ram and obtains the pre- allowance of actual memory;
Reserved module 400 obtains reserved memory for reserving memory ram according to the pre- allowance of the actual memory;Wherein, The reserved memory is applied for the I/O stack with the first preset interface.
Based on the above embodiment, as preferred embodiment, the reserved module 400 is specially according to the actual memory Pre- allowance reserves memory ram in a manner of mempool+GFP_NOIO, obtains the module of reserved memory.
Based on the above embodiment, as preferred embodiment, the reserved module 400 is specially according to the actual memory Pre- allowance reserves memory ram in a manner of get_free_pages+GFP_NOIO, obtains the module of reserved memory.
Based on the above embodiment, as preferred embodiment, the internal storage management system further include:
Second judgment module, for when target I/O stack is corresponding applied for memory use after, judge in the use Whether deposit is the reserved memory;
First release module when being judged as YES for second judgment module, is called described in the release of the second preset interface Memory is used;
Second release module when being judged as NO for second judgment module, calls kfress or free_pages to release Memory has been used described in putting.
Present invention also provides a kind of computer readable storage mediums, have computer program thereon, the computer program It is performed the step of EMS memory management process of I/O stack in a kind of kernel state system provided by above-described embodiment may be implemented. The storage medium may include: USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory The various media that can store program code such as device (Random Access Memory, RAM), magnetic or disk.
Present invention also provides a kind of terminals, may include memory and processor, have computer in the memory Program when the processor calls the computer program in the memory, may be implemented in the provided one kind of above-described embodiment In core state system the step of the EMS memory management process of I/O stack.Certain terminal can also include various network interfaces, power supply etc. Component.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For embodiment provide system and Speech, since it is corresponding with the method that embodiment provides, so being described relatively simple, related place is referring to method part illustration ?.
Specific examples are used herein to illustrate the principle and implementation manner of the present application, and above embodiments are said It is bright to be merely used to help understand the present processes and its core concept.It should be pointed out that for the ordinary skill of the art For personnel, under the premise of not departing from the application principle, can also to the application, some improvement and modification can also be carried out, these improvement It is also fallen into the protection scope of the claim of this application with modification.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.

Claims (10)

1. the EMS memory management process of I/O stack in a kind of kernel state system characterized by comprising
Obtain total RAM remaining value and I/O stack demand amount of ram;
Reserved memory is determined whether according to total RAM remaining value and the I/O stack demand amount of ram;
If so, obtaining the pre- allowance of actual memory according to total RAM remaining value and the I/O stack demand amount of ram;
Memory ram is reserved according to the pre- allowance of the actual memory, obtains reserved memory;
Wherein, the reserved memory is applied for the I/O stack with the first preset interface.
2. EMS memory management process according to claim 1, which is characterized in that reserved according to the pre- allowance of the actual memory Memory ram, obtaining reserved memory includes:
According to the pre- allowance of the actual memory, memory ram is reserved in a manner of mempool+GFP_NOIO, obtains reserved memory.
3. EMS memory management process according to claim 1, which is characterized in that reserved according to the pre- allowance of the actual memory Memory ram, obtaining reserved memory includes:
According to the pre- allowance of the actual memory, memory ram is reserved in a manner of get_free_pages+GFP_NOIO, is obtained pre- Stay memory.
4. EMS memory management process according to claim 1, which is characterized in that further include:
When target I/O stack is corresponding applied for memory use after, judge it is described using memory whether be the reserved memory;
If so, calling the release of the second preset interface is described to use memory;
If it is not, calling kfress or free_pages release is described to use memory.
5. the internal storage management system of I/O stack in a kind of kernel state system characterized by comprising
Module is obtained, for obtaining total RAM remaining value and I/O stack demand amount of ram;
Judgment module, for being determined whether in reserved according to total RAM remaining value and the I/O stack demand amount of ram It deposits;
Computing module, if being when being, according to total RAM remaining value and the I/O stack for the judgment module judging result Demand amount of ram obtains the pre- allowance of actual memory;
Reserved module obtains reserved memory for reserving memory ram according to the pre- allowance of the actual memory;
Wherein, the reserved memory is applied for the I/O stack with the first preset interface.
6. internal storage management system according to claim 5, which is characterized in that the reserved module is specially according to the reality Memory pre- allowance in border reserves memory ram in a manner of mempool+GFP_NOIO, obtains the module of reserved memory.
7. internal storage management system according to claim 5, which is characterized in that the reserved module is specially according to the reality Memory pre- allowance in border reserves memory ram in a manner of get_free_pages+GFP_NOIO, obtains the module of reserved memory.
8. internal storage management system according to claim 5, which is characterized in that further include:
Second judgment module, for when target I/O stack is corresponding applied for memory use after, judge it is described use memory be No is the reserved memory;
First release module when being judged as YES for second judgment module, calls the release of the second preset interface is described to make Use memory;
Second release module when being judged as NO for second judgment module, calls kfress or free_pages to discharge institute It states and has used memory.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt The step of processor realizes EMS memory management process according to any one of claims 1-4 when executing.
10. a kind of terminal, which is characterized in that including memory and processor, there is computer program in the memory, it is described Processor realizes EMS memory management process according to any one of claims 1-4 when calling the computer program in the memory The step of.
CN201811245448.4A 2018-10-24 2018-10-24 The EMS memory management process of I/O stack, system and relevant apparatus in kernel state system Pending CN109445943A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811245448.4A CN109445943A (en) 2018-10-24 2018-10-24 The EMS memory management process of I/O stack, system and relevant apparatus in kernel state system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811245448.4A CN109445943A (en) 2018-10-24 2018-10-24 The EMS memory management process of I/O stack, system and relevant apparatus in kernel state system

Publications (1)

Publication Number Publication Date
CN109445943A true CN109445943A (en) 2019-03-08

Family

ID=65547492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811245448.4A Pending CN109445943A (en) 2018-10-24 2018-10-24 The EMS memory management process of I/O stack, system and relevant apparatus in kernel state system

Country Status (1)

Country Link
CN (1) CN109445943A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488316A (en) * 2020-04-12 2020-08-04 杭州迪普科技股份有限公司 File cache recovery method and device
CN111736997A (en) * 2020-06-18 2020-10-02 北京达佳互联信息技术有限公司 Memory allocation method and device, electronic equipment and storage medium
CN112527490A (en) * 2019-09-17 2021-03-19 广州虎牙科技有限公司 Node resource control method and device, electronic equipment and storage medium
CN112764930A (en) * 2021-01-22 2021-05-07 山东云海国创云计算装备产业创新中心有限公司 Memory allocation method, device, equipment and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101984417A (en) * 2010-11-01 2011-03-09 中兴通讯股份有限公司 Memory management method and device
CN103136105A (en) * 2011-11-28 2013-06-05 广东新岸线计算机系统芯片有限公司 Memory management method, embedded type system and video data processing system
CN106648907A (en) * 2017-02-24 2017-05-10 郑州云海信息技术有限公司 Method and device for increasing memory reuse
CN106776046A (en) * 2017-01-13 2017-05-31 郑州云海信息技术有限公司 A kind of SCST reads and writes optimization method and system
CN106776368A (en) * 2016-11-29 2017-05-31 郑州云海信息技术有限公司 Buffer memory management method, apparatus and system during a kind of digital independent
CN108337109A (en) * 2017-12-28 2018-07-27 中兴通讯股份有限公司 A kind of resource allocation methods and device and resource allocation system
CN108519863A (en) * 2018-04-12 2018-09-11 郑州云海信息技术有限公司 A kind of the IO management methods and device of storage system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101984417A (en) * 2010-11-01 2011-03-09 中兴通讯股份有限公司 Memory management method and device
CN103136105A (en) * 2011-11-28 2013-06-05 广东新岸线计算机系统芯片有限公司 Memory management method, embedded type system and video data processing system
CN106776368A (en) * 2016-11-29 2017-05-31 郑州云海信息技术有限公司 Buffer memory management method, apparatus and system during a kind of digital independent
CN106776046A (en) * 2017-01-13 2017-05-31 郑州云海信息技术有限公司 A kind of SCST reads and writes optimization method and system
CN106648907A (en) * 2017-02-24 2017-05-10 郑州云海信息技术有限公司 Method and device for increasing memory reuse
CN108337109A (en) * 2017-12-28 2018-07-27 中兴通讯股份有限公司 A kind of resource allocation methods and device and resource allocation system
CN108519863A (en) * 2018-04-12 2018-09-11 郑州云海信息技术有限公司 A kind of the IO management methods and device of storage system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527490A (en) * 2019-09-17 2021-03-19 广州虎牙科技有限公司 Node resource control method and device, electronic equipment and storage medium
CN112527490B (en) * 2019-09-17 2024-02-09 广州虎牙科技有限公司 Node resource management and control method and device, electronic equipment and storage medium
CN111488316A (en) * 2020-04-12 2020-08-04 杭州迪普科技股份有限公司 File cache recovery method and device
CN111488316B (en) * 2020-04-12 2023-09-22 杭州迪普科技股份有限公司 File cache recovery method and device
CN111736997A (en) * 2020-06-18 2020-10-02 北京达佳互联信息技术有限公司 Memory allocation method and device, electronic equipment and storage medium
CN112764930A (en) * 2021-01-22 2021-05-07 山东云海国创云计算装备产业创新中心有限公司 Memory allocation method, device, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN109445943A (en) The EMS memory management process of I/O stack, system and relevant apparatus in kernel state system
US20210248065A1 (en) Memory system and method for controlling nonvolatile memory
US8805902B2 (en) Managing snapshot storage pools
JP6314355B2 (en) Memory management method and device
US9355028B2 (en) Data-storage device and flash memory control method
US7363456B2 (en) System and method of allocating contiguous memory in a data processing system
US20090210464A1 (en) Storage management system and method thereof
JP2018049522A (en) Memory system and control method
CN104407926B (en) A kind of dispatching method of cloud computing resources
CN107783812B (en) Virtual machine memory management method and device
JP2009525555A (en) Reduce power consumption by disabling refresh of unused portions of DRAM during periods of device inactivity
CN102968279A (en) Thin provisioning method for storage system
CN101702138A (en) Memory management method, memory management system and server
WO2016112713A1 (en) Processing method and device for memory page in memory
US20190235787A1 (en) Memory system and method for controlling nonvolatile memory
CN103106150B (en) A kind of storage system that realizes simplifies configuration and the method simplifying distribution automatically
CN103218305B (en) The distribution method of memory space
CN103412822A (en) Operation method of non-volatile RAM, data operation method and relevant device
KR101061483B1 (en) Memory circuit and memory circuit access method, memory management system and memory management method
CN109815005A (en) A kind of method, apparatus and storage system of managing internal memory
CN111104219A (en) Binding method, device, equipment and storage medium of virtual core and physical core
CN104111896A (en) Virtual memory management method and virtual memory management device for mass data processing
US7793051B1 (en) Global shared memory subsystem
CN103020077A (en) Method for managing memory of real-time database of power system
CN115168259B (en) Data access method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190308

RJ01 Rejection of invention patent application after publication