CN104123241A - Internal storage anonymous page initializing method, device and system - Google Patents

Internal storage anonymous page initializing method, device and system Download PDF

Info

Publication number
CN104123241A
CN104123241A CN201310144933.3A CN201310144933A CN104123241A CN 104123241 A CN104123241 A CN 104123241A CN 201310144933 A CN201310144933 A CN 201310144933A CN 104123241 A CN104123241 A CN 104123241A
Authority
CN
China
Prior art keywords
internal memory
energy consumption
write
anonymous page
mapping table
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.)
Granted
Application number
CN201310144933.3A
Other languages
Chinese (zh)
Other versions
CN104123241B (en
Inventor
夏飞
熊劲
蒋德钧
魏巍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Institute of Computing Technology of CAS
Original Assignee
Huawei Technologies Co Ltd
Institute of Computing Technology of CAS
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, Institute of Computing Technology of CAS filed Critical Huawei Technologies Co Ltd
Priority to CN201310144933.3A priority Critical patent/CN104123241B/en
Publication of CN104123241A publication Critical patent/CN104123241A/en
Application granted granted Critical
Publication of CN104123241B publication Critical patent/CN104123241B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention discloses an internal storage anonymous page initializing method. The internal storage anonymous page initializing method comprises the steps that the physical address of an internal storage anonymous page to be recognized is obtained, wherein the internal storage anonymous page is a unit of internal storage; according to the physical address, a preset address and name mapping table is searched and the internal storage name of the internal storage corresponding to the physical address is obtained, wherein the address and name mapping table is used for reflecting the corresponding relations of physical addresses of anonymous pages of internal storages and internal storage names of the internal storages; according to the internal storage name, a preset energy consumption difference information mapping table is searched, and energy consumption difference information generated by writing 0 to the internal storage and writing 1 to the internal storage is obtained, wherein the energy consumption difference information mapping table is used for reflecting energy consumption difference information generated by writing 0 to different internal storages and writing 1 to the different internal storages; according to the energy consumption difference information generated by writing 0 to the internal storage and writing 1 to the internal storage, corresponding initializing operation is conducted on the anonymous page of the internal storage. The embodiment of the invention further discloses an internal storage anonymous page initializing device and system.

Description

The anonymous page of internal memory initial method, Apparatus and system
Technical field
The present invention relates to computer realm, particularly the anonymous page of a kind of internal memory initial method, Apparatus and system.
Background technology
In computer system, internal memory generally consists of DRAM (Dynamic Random Access Memory, dynamic RAM).Because DRAM integrated level is low, finite capacity.In addition, DRAM belongs to volatile memory device, in order to guarantee that data do not lose, needs continuous refresh operation, causes DRAM energy consumption high.Memory system energy consumption accounts for the large percentage of computer system total energy consumption, and energy consumption problem also more and more becomes the bottleneck of restriction memory system development.Compare with DRAM, novel NVM (Non-Volatile Memory) energy consumption is lower, and because integrated level is high, can accomplish larger capacity.Along with application to memory size require increasing, to increasing of non-volatile demand, the internal memory only consisting of DRAM has been difficult to meet the demand of application, using NVM as internal memory or DRAM mix internal memory with NVM formation, will become the developing direction of following memory system.
The principle of NVM storage data is, changes the resistance of storage unit by add the voltage of different sizes, different directions or magnetic field etc. to storage unit, according to the difference of resistive memory cell size, judges that the data of storage are 0 or 1.As PCM (Phase Change Memory, phase transition storage), by add the voltage of different sizes to storage unit, change the resistance of storage unit; Unipolarity RRAM (Resistive Random Access Memory, resistive formula storer), changes the resistance of storage unit by add the voltage of different sizes to storage unit; Bipolarity RRAM, changes the resistance of storage unit by add the voltage of different directions, different sizes to storage unit; MRAM (Magnetoresistive Random Access Memory, reluctance type storer), changes the resistance of storage unit by add the magnetic field of different directions to storage unit.This according to the memory device of resistive memory cell size judgement 0 and 1, write 0 (RESET operation) different with the energy consumption of writing 1 (SET operation).
The memory management module of operating system adopts Dram distribution technique, when the page of process access is not during at internal memory, can cause page fault, and page fault handling procedure carries out actual Physical Page and distributes.Wherein, the internal memory of page Shi Yige unit, page comprises anonymous page and non-anonymous page.
In the prior art, operating system memory administration module is when processing page fault, if this page is to be accessed by process for the first time and is anonymous page, page fault handling procedure calls do_anonymous_page () function and obtains an anonymous page of new physics, and calls clear_page () function all positions of this anonymity page are initialized as to 0.
Operating system, when distributing anonymous page, is directly initialized as 0 by all positions of anonymity page, does not consider that novel NVM writes 0 and write 1 energy consumption difference in size, thereby causes energy dissipation.
Summary of the invention
The embodiment of the present invention proposes a kind of anonymous page of internal memory apparatus for initializing, method, system of saving energy consumption, by identifying title and the physical address of different internal memories, judgement internal memory write 0 with write 1 energy consumption difference, carry out different initialization operations, reduced the wasting of resources.
On the one hand, the embodiment of the present invention provides the anonymous page of a kind of internal memory initial method, comprising:
Obtain the physical address of the anonymous page of internal memory to be identified, the internal memory of the anonymous Ye Weiyige unit of described internal memory;
According to described physical address, search default address name mapping table, obtain the internal memory title corresponding to the internal memory of described physical address, described address name mapping table is for reflecting the corresponding relation of the physical address of the anonymous page of internal memory and the internal memory title of internal memory;
According to described internal memory title, search default energy consumption different information mapping table, obtain to described internal memory write 0 with write 1 energy consumption different information, described energy consumption different information mapping table for reflect to different internal memories write 0 with write 1 energy consumption different information;
According to described internal memory is write 0 with write 1 energy consumption different information, the anonymous page of described internal memory is carried out to corresponding initialization operation.
In a kind of possible implementation on the one hand, before the described physical address that obtains the anonymous page of internal memory to be identified, create address name mapping table, described address name mapping table is for reflecting physical address corresponding to the anonymous page of described internal memory title and described internal memory.
In conjunction with one side or a kind of possible implementation on the one hand, in the possible implementation of another kind, the described address name mapping table of setting up comprises modification basic input-output system BIOS, and described internal memory title and described physical address are write to the Installed System Memory mapping table in BIOS.
In conjunction with one side or a kind of possible implementation on the one hand, in the possible implementation of another kind, the described address name mapping table of setting up comprises the amended basic input-output system BIOS of operation, and described internal memory title and described physical address are preserved into the Installed System Memory mapping table in described amended BIOS.
In conjunction with one side or a kind of possible implementation on the one hand, in the possible implementation of another kind, described obtain described internal memory is write 0 with write 1 energy consumption different information before, create energy consumption different information mapping table, described energy consumption different information mapping table for reflect to different internal memories write 0 with write 1 energy consumption different information.
In conjunction with one side or a kind of possible implementation on the one hand, in the possible implementation of another kind, described energy consumption different information mapping table is based upon in operating system nucleus, dynamic load after kernel starts.
In conjunction with one side or a kind of possible implementation on the one hand, in the possible implementation of another kind, described according to described to described internal memory write 0 with write 1 energy consumption different information, the anonymous page of described internal memory is carried out to corresponding initialization operation, comprise if described internal memory is write to 0 energy consumption and be less than the energy consumption of described internal memory being write to 1, all positions of the anonymous page of described internal memory are initialized as to 0; If described internal memory is write to 1 energy consumption, be less than the energy consumption of described internal memory being write to 0, all positions of the anonymous page of described internal memory are initialized as to 1.
In conjunction with on the one hand or a kind of possible implementation on the one hand, in the possible implementation of another kind, if described internal memory is write to 0 energy consumption being less than the energy consumption of described internal memory being write to 1 of stating is initialized as 0 by all positions of the anonymous page of described internal memory; If described internal memory is write to 1 energy consumption, be less than the energy consumption of described internal memory being write to 0, the all positions of the anonymous page of described internal memory are initialized as to 1 and are included in the memory management module of operating system and add an anonymous page initialization function, for all positions of the anonymous page of described internal memory, be set to 1; If described internal memory is write to 0 energy consumption, be less than the energy consumption of described internal memory being write to 1, the existing function of calling system, all positions of the anonymous page of described internal memory are set to 0; If described internal memory is write to 1 energy consumption, be less than the energy consumption of described internal memory being write to 0, call the anonymous page initialization function of described interpolation, all positions of the anonymous page of described internal memory are set to 1.
In conjunction with one side or a kind of possible implementation on the one hand, in the possible implementation of another kind, described internal memory comprises PCM, NVM, DRAM, RRAM, MRAM is independent and the mixing internal memory of above combination in any.
The embodiment of the present invention also provides the anonymous page of a kind of internal memory apparatus for initializing, comprising:
Addressed module, for obtaining the physical address of the anonymous page of internal memory to be identified;
Internal memory title identification module, for the described physical address obtaining according to described addressed module, search default address name mapping table, obtain the internal memory title corresponding to the internal memory of described physical address, described address name mapping table is for reflecting the corresponding relation of the physical address of the anonymous page of internal memory and the internal memory title of internal memory;
Energy consumption difference identification module, for the described internal memory title of obtaining according to described internal memory title identification module, search default energy consumption different information mapping table, obtain to described internal memory write 0 with write 1 energy consumption different information, described energy consumption different information mapping table for reflect to different internal memories write 0 with write 1 energy consumption different information;
Initialization module, for according to described energy consumption difference identification module, obtain to described internal memory write 0 with write 1 energy consumption different information, the anonymous page of described internal memory is carried out to corresponding initialization operation.
In a kind of possible implementation on the one hand, the described anonymous page of internal memory apparatus for initializing also comprises the first interpolation module, for setting up address name mapping table in operating system, described address name mapping table is for reflecting physical address corresponding to the anonymous page of described internal memory title and described internal memory.
In conjunction with one side or a kind of possible implementation on the one hand, in the possible implementation of another kind, described first adds module comprises modification unit, for revising basic input-output system BIOS, described internal memory title and described physical address is write in BIOS; Performance element, for moving the amended basic input-output system BIOS in described modification unit, preserves described internal memory title and described physical address in described amended BIOS.
In conjunction with one side or a kind of possible implementation on the one hand, in the possible implementation of another kind, the described anonymous page of internal memory apparatus for initializing also comprises the second interpolation module, for setting up energy consumption different information mapping table at operating system nucleus, described energy consumption different information mapping table for reflect to described different internal memory write 0 with write 1 energy consumption different information.
In conjunction with on the one hand or a kind of possible implementation on the one hand, in the possible implementation of another kind, a described anonymous page initialization module comprises first module, for being less than all positions of the anonymous page of described internal memory of writing 1 energy consumption and being initialized as 0 writing 0 energy consumption; Second unit, for being less than all positions of the anonymous page of described internal memory of writing 0 energy consumption and being initialized as 1 writing 1 energy consumption.
In conjunction with one side or a kind of possible implementation on the one hand, in the possible implementation of another kind, described the second interpolation module dynamic load after operating system nucleus starts.
The embodiment of the present invention provides the anonymous page of a kind of internal memory initialization system, comprises device and the anonymous page of the internal memory apparatus for initializing of building table:
The described device of building table, for creating address name mapping table and creating energy consumption different information mapping table; Described address name mapping table is for reflecting the corresponding relation of the physical address of the anonymous page of described internal memory and the internal memory title of described internal memory; Described energy consumption different information mapping table for reflect to different described internal memories write 0 with write 1 energy consumption different information;
Described internal memory anonymity page apparatus for initializing, for according to the physical address that obtains the anonymous page of described internal memory to be identified, builds the address name mapping table of the device establishment of table described in searching, obtain the internal memory title corresponding to the internal memory of described physical address; According to described internal memory title, described in searching, build the described energy consumption different information mapping table of the device establishment of table, obtain to described internal memory write 0 with write 1 energy consumption different information, according to described internal memory write 0 with write 1 energy consumption different information, the anonymous page of described internal memory is carried out to corresponding initialization operation.
The embodiment of the present invention is by obtaining the physical address of the anonymous page of internal memory to be identified, inquire about default address name mapping table, obtain the internal memory title corresponding to the internal memory of described physical address, again according to the internal memory title of obtaining, inquire about default internal memory energy consumption different information table, inquire different internal memories write 0 with write 1 energy consumption difference, according to different internal memories write 0 with write 1 energy consumption difference, the anonymous page of internal memory is carried out to corresponding initialization operation, thereby reduce significantly the waste of resource.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The anonymous page of a kind of internal memory apparatus for initializing schematic diagram that Fig. 1 provides for the embodiment of the present invention;
The anonymous page of a kind of internal memory apparatus for initializing schematic diagram that Fig. 2 provides for the embodiment of the present invention;
The anonymous page of a kind of internal memory initial method schematic diagram that Fig. 3 provides for the embodiment of the present invention;
The anonymous page of a kind of internal memory initial method schematic diagram that Fig. 4 provides for the embodiment of the present invention;
The anonymous page of a kind of internal memory being formed by the PCM initial method schematic diagram that Fig. 5 provides for the embodiment of the present invention;
Fig. 6 for the embodiment of the present invention provide a kind of by DRAM, formed with PCM, RRAM mix the anonymous page of internal memory initial method schematic diagram;
The anonymous page of a kind of internal memory initialization system schematic diagram that Fig. 7 provides for the embodiment of the present invention;
A kind of PCM internal memory schematic diagram that Fig. 8 provides for the embodiment of the present invention;
A kind of DRAM that Fig. 9 provides for the embodiment of the present invention forms with PCM, RRAM mixes internal memory schematic diagram.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
One embodiment of the invention provides the anonymous page of a kind of internal memory apparatus for initializing, as shown in Figure 1, comprising:
Addressed module 101, for obtaining the physical address of the anonymous page of internal memory to be identified;
Internal memory title identification module 102, for according to 101 physical addresss that obtain of addressing mould, searches default address name mapping table, obtains the internal memory title corresponding to physical address;
Energy consumption difference identification module 103, for the internal memory title of obtaining according to internal memory title identification module 102, searches default energy consumption different information mapping table, obtain to internal memory write 0 with write 1 energy consumption different information;
Initialization module 104, for according to energy consumption difference identification module 103, obtain to internal memory write 0 with write 1 energy consumption different information, the anonymous page of internal memory is carried out to corresponding initialization operation.
The embodiment of the present invention is by obtaining the physical address of the anonymous page of internal memory to be identified, inquire about default address name mapping table, obtain the internal memory title corresponding to the internal memory of described physical address, again according to the internal memory title of obtaining, inquire about default internal memory energy consumption different information table, inquire different internal memories write 0 with write 1 energy consumption difference, according to different internal memories write 0 with write 1 energy consumption difference, the anonymous page of internal memory is carried out to corresponding initialization operation, thereby reduce significantly the waste of resource.
One embodiment of the invention also provides the anonymous page of a kind of internal memory apparatus for initializing, as shown in Figure 2, comprising:
Addressed module 202, for obtaining the physical address of the anonymous page of internal memory to be identified;
Internal memory title identification module 203, for according to 202 physical addresss that obtain of addressing mould, searches default address name mapping table, obtains the internal memory title corresponding to physical address;
Energy consumption difference identification module 204, for the internal memory title of obtaining according to internal memory title identification module 203, searches default energy consumption different information mapping table, obtain to internal memory write 0 with write 1 energy consumption different information;
Initialization module 205, for according to energy consumption difference identification module 204, obtain to internal memory write 0 with write 1 energy consumption different information, the anonymous page of internal memory is carried out to corresponding initialization operation.
In a kind of possible implementation, the anonymous page of internal memory apparatus for initializing also comprises:
First adds module 200, and for set up address name mapping table in operating system, address name mapping table is for reflecting physical address corresponding to the anonymous page of internal memory title and internal memory.
In the possible implementation of another kind, first adds module comprises:
Revise unit 2001, for revising basic input-output system BIOS, internal memory title and described physical address are write in BIOS;
Performance element 2002, for moving amended basic input-output system BIOS, is kept at internal memory title and physical address in amended BIOS.
In the possible implementation of another kind, the anonymous page of internal memory apparatus for initializing also comprises:
Second adds module 201, for set up energy consumption different information mapping table at operating system nucleus, energy consumption different information mapping table for reflect to different internal memories write 0 with write 1 energy consumption different information.
In the possible implementation of another kind, initialization module 205 comprises:
First module 2051, for being less than all positions of the anonymous page of internal memory of writing 1 energy consumption and being initialized as 0 writing 0 energy consumption;
Second unit 2052, for being less than all positions of the anonymous page of internal memory of writing 0 energy consumption and being initialized as 1 writing 1 energy consumption.
In the possible implementation of another kind, second adds module 201 dynamic load after operating system nucleus starts, and dynamic load is in order to save memory source.
The embodiment of the present invention is by obtaining the physical address of the anonymous page of internal memory to be identified, inquire about default address name mapping table, obtain the internal memory title corresponding to the internal memory of described physical address, again according to the internal memory title of obtaining, inquire about default internal memory energy consumption different information table, inquire different internal memories write 0 with write 1 energy consumption difference, according to different internal memories write 0 with write 1 energy consumption difference, to writing 0 energy consumption, be less than all positions of the anonymous page of internal memory internal memory of writing 1 energy consumption and be set to 0, and be less than to writing 1 energy consumption the internal memory of writing 0 energy consumption, the all positions of the anonymous page of internal memory are set to 1, thereby the waste of larger minimizing resource.
One embodiment of the invention also provides the anonymous page of a kind of internal memory initial method, and as shown in Figure 3, step is as follows:
S100, obtains the physical address of the anonymous page of internal memory to be identified;
In one embodiment, operating system memory administration module carries out addressing operation, obtains the range of physical addresses of the anonymous page of internal memory to be identified.
S101, according to the physical address obtaining, searches address name mapping table, obtains the internal memory title corresponding to physical address;
In one embodiment, operating system is when internal memory initialization, and the memory information in reading system memory mapping table, obtains the name information of every kind of internal memory, and preserves this information.
S102, according to internal memory title, identification internal memory write 0 with write 1 energy consumption different information;
In one embodiment, operating system after kernel starts, access memory energy consumption different information mapping table, obtain internal memory write 0 with write 1 energy consumption different information.
S103, according to internal memory write 0 with write 1 energy consumption different information, carry out different initialization operations;
In one embodiment, if internal memory is write 0 energy consumption, be less than the energy consumption of writing 1, all positions of the anonymous page of internal memory are set to 0; If internal memory is write 1 energy consumption and is less than the energy consumption of writing 0, all positions of the anonymous page of internal memory are set to 1;
In another embodiment, a newly-built function in operating system memory administration module, is used for all positions of the anonymous page of internal memory to be set to 1; If it is little that internal memory is write 1 energy consumption, memory management module is called described new function and is carried out initialization.
In another embodiment, little if internal memory is write 0 energy consumption, operating system is called existing system method, and all positions of anonymity page are initialized as to 0.
The embodiment of the present invention is by obtaining the physical address of the anonymous page of internal memory to be identified, inquire about default address name mapping table, obtain the internal memory title corresponding to the internal memory of described physical address, again according to the internal memory title of obtaining, inquire about default internal memory energy consumption different information table, inquire different internal memories write 0 with write 1 energy consumption difference, according to different internal memories write 0 with write 1 energy consumption difference, to writing 0 energy consumption, be less than all positions of the anonymous page of internal memory internal memory of writing 1 energy consumption and be set to 0, and be less than to writing 1 energy consumption the internal memory of writing 0 energy consumption, the all positions of the anonymous page of internal memory are set to 1, thereby the waste of larger minimizing resource.
One embodiment of the invention also provides the anonymous page of a kind of internal memory initial method, and as shown in Figure 4, step is as follows:
S1001, creates address name mapping table;
In one embodiment, revise basic input-output system BIOS, in Installed System Memory mapping table, add internal memory title and corresponding physical address.
In another embodiment, carry out amended basic input-output system BIOS, internal memory title and corresponding physical address information are preserved in Installed System Memory mapping table.
S100, obtains the physical address of the anonymous page of internal memory to be identified;
In one embodiment, operating system memory administration module carries out addressing operation, obtains the range of physical addresses of the anonymous page of internal memory to be identified.
S101, according to the physical address obtaining, searches address name mapping table, obtains the internal memory title corresponding to physical address;
In one embodiment, operating system is when internal memory initialization, and the memory information in reading system memory mapping table, obtains the name information of every kind of internal memory, and preserves this information.
S1011, creates internal memory energy consumption different information mapping table;
In one embodiment, in operating system nucleus, set up internal memory energy consumption different information mapping table.
In another embodiment, internal memory energy consumption different information mapping table at least comprises two row contents: internal memory title and the corresponding energy consumption smaller value of writing.
In another embodiment, internal memory energy consumption different information mapping table dynamic load after operating system nucleus starts.
S102, according to internal memory title, identification internal memory write 0 with write 1 energy consumption different information;
In one embodiment, operating system after kernel starts, access memory energy consumption different information mapping table, obtain internal memory write 0 with write 1 energy consumption different information.
S103, according to internal memory write 0 with write 1 energy consumption different information, carry out different initialization operations; If it is little to write 0 energy consumption, all positions are set to 0; If it is little to write 1 energy consumption, all positions are set to 1;
In one embodiment, a newly-built function in operating system memory administration module, is used for all positions of the anonymous page of internal memory to be set to 1; If it is little that internal memory is write 1 energy consumption, memory management module is called described new function and is carried out initialization.
In another embodiment, little if internal memory is write 0 energy consumption, operating system is called existing system method, and all positions of anonymity page are initialized as to 0.
The embodiment of the present invention is by obtaining the physical address of the anonymous page of internal memory to be identified, inquire about default address name mapping table, obtain the internal memory title corresponding to the internal memory of described physical address, again according to the internal memory title of obtaining, inquire about default internal memory energy consumption different information table, inquire different internal memories write 0 with write 1 energy consumption difference, according to different internal memories write 0 with write 1 energy consumption difference, to writing 0 energy consumption, be less than all positions of the anonymous page of internal memory internal memory of writing 1 energy consumption and be set to 0, and be less than to writing 1 energy consumption the internal memory of writing 0 energy consumption, the all positions of the anonymous page of internal memory are set to 1, thereby the waste of larger minimizing resource.
For the ease of more directly perceived, be easier to understand the anonymous page of internal memory initial method, as shown in Figure 5 and Figure 8, the anonymous page of the internal memory initial method that the present embodiment also provides a kind of PCM to form.
S2001, first create address name mapping table, by revising basic input-output system BIOS, internal memory name is called to PCM and corresponding physical address 0~4GB information is added in Installed System Memory mapping table E820 table, and move amended BIOS and preserve information, as shown in table 1;
S200, operating system is when internal memory initialization, and memory management module is carried out addressing operation automatically, and the physical address that obtains internal memory is 0~4GB, as shown in Figure 6;
S201, operating system when internal memory initialization, the memory information in reading system memory mapping table E820 table, internal memory name corresponding to physical address that identifies 0~4GB scope is called PCM;
S2021 sets up internal memory energy consumption different information mapping table in operating system nucleus, and internal memory energy consumption different information mapping table at least comprises two row contents: internal memory title and the corresponding energy consumption smaller value of writing, and as shown in table 2;
S202, operating system after kernel starts, access memory energy consumption different information mapping table, inquiry PCM write 0 with write 1 energy consumption different information map information, obtaining PCM, to write 1 energy consumption less;
S2031 adds an anonymous page initialization function clear_page_one () in the memory management module of operating system, for all positions of anonymous page are all set to 1;
S203, learns on inquiry that PCM writes 1 energy consumption and is less than the energy consumption of writing 0, when the anonymous page of initialization, calls clear_page_one () function, and all of anonymity page is initialized as to 1.
Device name Range of physical addresses ...
PCM 0~4GB ...
... ... ...
Table 1 internal memory title and corresponding physical address information
Device name Write the numerical value that energy consumption is less
DRAM 0
PCM 1
RRAM 0
... ...
Table 2 internal memory write 0 with write 1 energy consumption difference in size information mapping table
The embodiment of the present invention is by obtaining the physical address of the anonymous page of internal memory to be identified, inquire about default address name mapping table, obtain the internal memory title corresponding to the internal memory of described physical address, again according to the internal memory title of obtaining, inquire about default internal memory energy consumption different information table, inquire different internal memories write 0 with write 1 energy consumption difference, according to different internal memories write 0 with write 1 energy consumption difference, to writing 0 energy consumption, be less than all positions of the anonymous page of internal memory internal memory of writing 1 energy consumption and be set to 0, and be less than to writing 1 energy consumption the internal memory of writing 0 energy consumption, the all positions of the anonymous page of internal memory are set to 1, thereby the waste of larger minimizing resource.
The present embodiment also provide a kind of by DRAM, formed with PCM, RRAM mix the anonymous page of internal memory initial method, as shown in Fig. 6 and Fig. 9:
S3001, create address name mapping table, by revising basic input-output system BIOS, it is that physical address corresponding to internal memory that 1~2GB, internal memory name are called RRAM is that 2~4GB information is added in Installed System Memory mapping table E820 table that internal memory name is called to corresponding physical address 0~1GB of DRAM, physical address corresponding to internal memory that internal memory name is called PCM, and move amended BIOS and preserve information, as shown in table 3;
S300, during internal memory initialization, the memory information in reading system memory mapping table E820 table, the physical address that identifies the anonymous page of internal memory place is 0~4GB;
S301, operating system is when internal memory initialization, and memory management module is carried out addressing operation automatically, and the internal memory title of obtaining different range of physical addresses is respectively: 0~1GB is DRAM, and 1~2GB is PCM, 2~4GB is RRAM;
S3021 sets up internal memory energy consumption different information mapping table in operating system nucleus, and internal memory energy consumption different information mapping table at least comprises two row contents: internal memory title and the corresponding energy consumption smaller value of writing, and as shown in table 2;
S302, operating system is after kernel starts, and access memory energy consumption different information mapping table, obtains DRAM and writes that 0 energy consumption is little, PCM writes that 1 energy consumption is little, RRAM writes the information that 0 energy consumption is little;
S3031 adds an anonymous page initialization function clear_page_one () in the memory management module of operating system, for all positions of anonymous page are all set to 1;
S303, learns on inquiry that, range of physical addresses 0~1GB is DRAM, and DRAM writes 0 energy consumption and is less than the energy consumption of writing 1, and the memory management module of operating system is called existing system function clear_page () function all positions of anonymity page are initialized as to 0; Range of physical addresses 1~2GB is PCM, and PCM writes 1 energy consumption and is less than the energy consumption of writing 0, calls clear_page_one () function, and all positions of anonymity page are initialized as to 1; Range of physical addresses 2~4GB is RRAM, and RRAM writes 0 energy consumption and is less than the energy consumption of writing 1, calls clear_page () function all positions of anonymity page are initialized as to 0.
Device name Range of physical addresses
DRAM 0~1GB
PCM 1~2GB
RRAM 2~4GB
... ...
Table 3 internal memory title and corresponding physical address information
The embodiment of the present invention is by obtaining the physical address of the anonymous page of internal memory to be identified, inquire about default address name mapping table, obtain the internal memory title corresponding to the internal memory of described physical address, again according to the internal memory title of obtaining, inquire about default internal memory energy consumption different information table, inquire different internal memories write 0 with write 1 energy consumption difference, according to different internal memories write 0 with write 1 energy consumption difference, to writing 0 energy consumption, be less than all positions of the anonymous page of internal memory internal memory of writing 1 energy consumption and be set to 0, and be less than to writing 1 energy consumption the internal memory of writing 0 energy consumption, the all positions of the anonymous page of internal memory are set to 1, thereby the waste of larger minimizing resource.
One embodiment of the invention also provides the anonymous page of a kind of internal memory initialization system, as shown in Figure 7, comprising:
400, one devices of building table, for creating address name mapping table and creating energy consumption different information mapping table; Address name mapping table is for reflecting the corresponding relation of the physical address of the anonymous page of internal memory and the internal memory title of internal memory; Energy consumption different information mapping table for reflect to different internal memories write 0 with write 1 energy consumption different information;
401, internal memory anonymity page apparatus for initializing, for according to the physical address that obtains the anonymous page of internal memory to be identified, builds the address name mapping table of the device establishment of table described in searching, obtain the internal memory title corresponding to the internal memory of physical address; According to internal memory title, search and build the energy consumption different information mapping table that meter apparatus creates, obtain to internal memory write 0 with write 1 energy consumption different information, according to internal memory write 0 with write 1 energy consumption different information, the anonymous page of internal memory is carried out to corresponding initialization operation.
In a kind of possible implementation, build the device 400 of table and in operating system BIOS, revise Installed System Memory mapping table table, create address name mapping table, address name mapping table is for reflecting the physical address of the anonymous page of internal memory and the title corresponding relation of internal memory, as shown in table 3.
In a kind of possible implementation, Installed System Memory mapping table is E820 table in BIOS.
In another possible implementation, the device 400 of building table creates energy consumption different information mapping table in operating system nucleus, energy consumption different information mapping table for reflect to different internal memories write 0 with write 1 energy consumption different information, as shown in table 2.
The embodiment of the present invention is by obtaining the physical address of the anonymous page of internal memory to be identified, inquire about default address name mapping table, obtain the internal memory title corresponding to the internal memory of described physical address, again according to the internal memory title of obtaining, inquire about default internal memory energy consumption different information table, inquire different internal memories write 0 with write 1 energy consumption difference, according to different internal memories write 0 with write 1 energy consumption difference, to writing 0 energy consumption, be less than all positions of the anonymous page of internal memory internal memory of writing 1 energy consumption and be set to 0, and be less than to writing 1 energy consumption the internal memory of writing 0 energy consumption, the all positions of the anonymous page of internal memory are set to 1, thereby the waste of larger minimizing resource.
One embodiment of the invention also provides the anonymous page of a kind of internal memory initializing computer, comprises storer and processor, and wherein, storer is used for storing instruction; Processor, with this storer coupling, this processor is configured to carry out and is stored in the instruction in storer, and this processor is configured to for carrying out the anonymous page of internal memory as shown in arbitrary embodiment as corresponding in Fig. 2 to Fig. 3 initial method, it is similar that it realizes principle, repeats no more herein.
In sum, the embodiment of the present invention when the anonymous page of operating system memory administration module initialization, considered different internal memories write 0 with write 1 energy consumption difference in size, anonymous page is initialized as and writes the numerical value that energy consumption is less.By above technical scheme, save memory system energy consumption, thereby reduce the operating cost of memory system and whole system.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, to come the hardware that instruction is relevant to complete by computer program, described program can be stored in a computer read/write memory medium, this program, when carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
The foregoing is only several embodiments of the present invention, those skilled in the art can carry out various changes or modification and not depart from the spirit and scope of the present invention the present invention according to application documents are disclosed.

Claims (15)

1. the anonymous page of an internal memory initial method, is characterized in that, comprising:
Obtain the physical address of the anonymous page of internal memory to be identified, the internal memory of the anonymous Ye Weiyige unit of described internal memory;
According to described physical address, search default address name mapping table, obtain the internal memory title corresponding to the internal memory of described physical address, described address name mapping table is for reflecting the corresponding relation of the physical address of the anonymous page of internal memory and the internal memory title of internal memory;
According to described internal memory title, search default energy consumption different information mapping table, obtain to described internal memory write 0 with write 1 energy consumption different information, described energy consumption different information mapping table for reflect to different internal memories write 0 with write 1 energy consumption different information;
According to described internal memory is write 0 with write 1 energy consumption different information, the anonymous page of described internal memory is carried out to corresponding initialization operation.
2. the anonymous page of internal memory according to claim 1 initial method, is characterized in that, before the described physical address that obtains the anonymous page of internal memory to be identified, also comprises:
Create address name mapping table, described address name mapping table is for reflecting physical address corresponding to the anonymous page of described internal memory title and described internal memory.
3. the anonymous page of internal memory according to claim 2 initial method, is characterized in that, the described address name mapping table of setting up comprises:
Revise basic input-output system BIOS, described internal memory title and described physical address are write to the Installed System Memory mapping table in BIOS;
Move amended basic input-output system BIOS, described internal memory title and described physical address are preserved into the Installed System Memory mapping table in described amended BIOS.
4. the anonymous page of internal memory according to claim 1 initial method, is characterized in that, described obtain described internal memory is write 0 with write 1 energy consumption different information before, also comprise:
Create energy consumption different information mapping table, described energy consumption different information mapping table for reflect to different internal memories write 0 with write 1 energy consumption different information.
5. the anonymous page of internal memory according to claim 4 initial method, is characterized in that, described energy consumption different information mapping table is based upon in operating system nucleus, dynamic load after kernel starts.
6. the anonymous page of internal memory according to claim 1 initial method, is characterized in that, described basis to described internal memory write 0 with write 1 energy consumption different information, the anonymous page of described internal memory is carried out to corresponding initialization operation, comprising:
If described internal memory is write to 0 energy consumption, be less than the energy consumption of described internal memory being write to 1, all positions of the anonymous page of described internal memory are initialized as to 0;
If described internal memory is write to 1 energy consumption, be less than the energy consumption of described internal memory being write to 0, all positions of the anonymous page of described internal memory are initialized as to 1.
7. the anonymous page of internal memory according to claim 6 initial method, is characterized in that, if described, described internal memory is write to 0 energy consumption and is less than the energy consumption of described internal memory being write to 1, and all positions of the anonymous page of described internal memory are initialized as to 0; If described internal memory is write to 1 energy consumption, be less than the energy consumption of described internal memory being write to 0, all positions of the anonymous page of described internal memory be initialized as to 1 and comprise:
In the memory management module of operating system, add an anonymous page initialization function, for all positions of the anonymous page of described internal memory, be set to 1;
If described internal memory is write to 0 energy consumption, be less than the energy consumption of described internal memory being write to 1, the existing function of calling system, all positions of the anonymous page of described internal memory are set to 0;
If described internal memory is write to 1 energy consumption, be less than the energy consumption of described internal memory being write to 0, call the anonymous page initialization function of described interpolation, all positions of the anonymous page of described internal memory are set to 1.
8. according to the anonymous page of the internal memory described in claim 1 or 2 or 3 or 4 or 5 or 6 or 7 initial method, it is characterized in that, described internal memory comprises PCM, NVM, DRAM, RRAM, MRAM is independent and the mixing internal memory of above combination in any.
9. the anonymous page of an internal memory apparatus for initializing, is characterized in that, comprising:
Addressed module, for obtaining the physical address of the anonymous page of internal memory to be identified;
Internal memory title identification module, for the described physical address obtaining according to described addressed module, search default address name mapping table, obtain the internal memory title corresponding to the internal memory of described physical address, described address name mapping table is for reflecting the corresponding relation of the physical address of the anonymous page of internal memory and the internal memory title of internal memory;
Energy consumption difference identification module, for the described internal memory title getting according to described internal memory title identification module, search default energy consumption different information mapping table, obtain to described internal memory write 0 with write 1 energy consumption different information, described energy consumption different information mapping table for reflect to different internal memories write 0 with write 1 energy consumption different information;
Initialization module, for according to described energy consumption difference identification module, get described to described internal memory write 0 with write 1 energy consumption different information, the anonymous page of described internal memory is carried out to corresponding initialization operation.
10. the anonymous page of internal memory according to claim 9 apparatus for initializing, is characterized in that, also comprises:
First adds module, and for set up address name mapping table in operating system, described address name mapping table is for reflecting physical address corresponding to the anonymous page of described internal memory title and described internal memory.
The anonymous page of 11. internal memory according to claim 10 apparatus for initializing, is characterized in that, described first adds module comprises:
Revise unit, for revising basic input-output system BIOS, described internal memory title and described physical address are write in BIOS;
Performance element, for moving the amended basic input-output system BIOS in described modification unit, preserves described internal memory title and described physical address in described amended BIOS.
The anonymous page of 12. internal memory according to claim 9 apparatus for initializing, is characterized in that, also comprises:
Second adds module, for set up energy consumption different information mapping table at operating system nucleus, described energy consumption different information mapping table for reflect to described different internal memory write 0 with write 1 energy consumption different information.
The anonymous page of 13. internal memory according to claim 9 apparatus for initializing, is characterized in that, described anonymous page initialization module comprises:
First module, for being less than all positions of the anonymous page of described internal memory of writing 1 energy consumption and being initialized as 0 writing 0 energy consumption;
Second unit, for being less than all positions of the anonymous page of described internal memory of writing 0 energy consumption and being initialized as 1 writing 1 energy consumption.
The anonymous page of 14. internal memory according to claim 12 apparatus for initializing, is characterized in that, described the second interpolation module dynamic load after operating system nucleus starts.
The 15. 1 kinds of anonymous page of internal memory initialization systems, comprise device and the anonymous page of the internal memory apparatus for initializing of building table, it is characterized in that, comprising:
The described device of building table, for creating address name mapping table and creating energy consumption different information mapping table; Described address name mapping table is for reflecting the corresponding relation of the physical address of the anonymous page of described internal memory and the internal memory title of described internal memory; Described energy consumption different information mapping table for reflect to different described internal memories write 0 with write 1 energy consumption different information;
The anonymous page of described internal memory apparatus for initializing, for according to the physical address that obtains the anonymous page of described internal memory to be identified, builds the address name mapping table that meter apparatus creates described in searching, obtain the internal memory title corresponding to the internal memory of described physical address; According to described internal memory title, search and build the described energy consumption different information mapping table that meter apparatus creates, obtain to described internal memory write 0 with write 1 energy consumption different information, according to described internal memory write 0 with write 1 energy consumption different information, the anonymous page of described internal memory is carried out to corresponding initialization operation.
CN201310144933.3A 2013-04-24 2013-04-24 Internal memory anonymity page initial method, apparatus and system Active CN104123241B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310144933.3A CN104123241B (en) 2013-04-24 2013-04-24 Internal memory anonymity page initial method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310144933.3A CN104123241B (en) 2013-04-24 2013-04-24 Internal memory anonymity page initial method, apparatus and system

Publications (2)

Publication Number Publication Date
CN104123241A true CN104123241A (en) 2014-10-29
CN104123241B CN104123241B (en) 2017-08-29

Family

ID=51768659

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310144933.3A Active CN104123241B (en) 2013-04-24 2013-04-24 Internal memory anonymity page initial method, apparatus and system

Country Status (1)

Country Link
CN (1) CN104123241B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786721A (en) * 2014-12-25 2016-07-20 研祥智能科技股份有限公司 Memory address mapping management method and processor
CN110008016A (en) * 2019-04-15 2019-07-12 深圳市万普拉斯科技有限公司 Anonymous page management method, device, terminal device and readable storage medium storing program for executing

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101438242A (en) * 2006-03-30 2009-05-20 晶像股份有限公司 Shared nonvolatile memory architecture
US20110307663A1 (en) * 2010-06-10 2011-12-15 Global Supercomputing Corporation Storage Unsharing

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101438242A (en) * 2006-03-30 2009-05-20 晶像股份有限公司 Shared nonvolatile memory architecture
US20110307663A1 (en) * 2010-06-10 2011-12-15 Global Supercomputing Corporation Storage Unsharing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786721A (en) * 2014-12-25 2016-07-20 研祥智能科技股份有限公司 Memory address mapping management method and processor
CN110008016A (en) * 2019-04-15 2019-07-12 深圳市万普拉斯科技有限公司 Anonymous page management method, device, terminal device and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN104123241B (en) 2017-08-29

Similar Documents

Publication Publication Date Title
US9852069B2 (en) RAM disk using non-volatile random access memory
US9652386B2 (en) Management of memory array with magnetic random access memory (MRAM)
TWI614752B (en) Power conservation by way of memory channel shutdown
KR102137761B1 (en) Heterogeneous unified memory section and method for manaing extended unified memory space thereof
CN103946826B (en) For realizing the device and method of multi-level store level on common storage channel
US8826051B2 (en) Dynamic allocation of power budget to a system having non-volatile memory and a processor
US8724392B1 (en) Controller management of memory array of storage device using magnetic random access memory (MRAM)
US9213495B2 (en) Controller management of memory array of storage device using magnetic random access memory (MRAM) in a mobile device
US20170344430A1 (en) Method and apparatus for data checkpointing and restoration in a storage device
US8650379B2 (en) Data processing method for nonvolatile memory system
CN105786400B (en) heterogeneous hybrid memory component, system and storage method
CN104346290A (en) Storage device, computer system and methods of operating same
CN107193756A (en) For marking the beginning and the instruction of end that need to write back the non-transactional code area persistently stored
US20180024755A1 (en) Simulator for enterprise-scale simulations on hybrid main memory systems
CN105183379A (en) Mixed memory data backup system and method
CN105580010A (en) File access method and apparatus, and storage system
CN105579977A (en) File access method, device and storage system
CN105808455A (en) Memory access method, storage-class memory and computer system
US20170255565A1 (en) Method and apparatus for providing a contiguously addressable memory region by remapping an address space
US20160154734A1 (en) Cache memory device and electronic system including the same
US20190042415A1 (en) Storage model for a computer system having persistent system memory
CN105607862A (en) Solid state disk capable of combining DRAM (Dynamic Random Access Memory) with MRAM (Magnetic Random Access Memory) and being provided with backup power
KR20140073955A (en) Memory system and method for operating the same
CN104123241A (en) Internal storage anonymous page initializing method, device and system
US11861222B2 (en) Object management in tiered memory systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant