This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2018-172870, filed on Sep. 14, 2018; the entire contents of which are incorporated herein by reference.
Embodiments described herein relate generally to a management device, an information processing apparatus, and a memory control method.
Recently, a high-speed non-volatile memory referred to as a storage class memory has been developed. In addition to being data-rewritable in a page unit, the storage class memory is data-writable in a unit smaller than the page unit, such as a byte unit, for example. A non-volatile memory that has become data-writable in a byte unit in this manner becomes directly-accessible from a central processing unit (CPU).
Meanwhile, in a case where temperature of a semiconductor device becomes high, an operation needs to be stopped temporarily, or operating frequency needs to be lowered. Thus, in the semiconductor device, operation performance in a region with high temperature has been worsened.
According to an embodiment, a management device is for controlling readout and writing of data that are performed by a processing circuit with respect to a non-volatile memory storing a plurality of pages. The management device includes one or more processors. The one or more processors are configured to perform: access processing including performing writing or readout with respect to data stored in the non-volatile memory, in a case where a request for writing or readout is received for any page of the plurality of pages; and management including controlling a storage position in the non-volatile memory for each of the plurality of pages. The non-volatile memory includes a high-temperature region and a low-temperature region in which temperature is relatively lower than in the high-temperature region during operation. The one or more processors are configured to, at the management, move storage positions of the plurality of pages in such a manner that pages included in a high access page group are stored more in the low-temperature region than in the high-temperature region, where the plurality of pages are classified into the high access page group in which access amounts are relatively high, and a low access page group in which access amounts are relatively low.
Hereinafter, an information processing apparatus 10 according to an embodiment will be described in detail with reference to the drawings.
The processing circuit 12 includes one or a plurality of processors. For example, the processor is a CPU. The processor may include one or a plurality of CPU cores. The processing circuit 12 processes data by executing a program. In accordance with the execution of the program, the processing circuit 12 reads out data from the first memory 14 or the non-volatile memory 16, or writes data into the first memory 14 or the non-volatile memory 16.
In addition, the processing circuit 12 includes a hierarchical cache memory such as an L1 data cache, an L1 command cache, an L2 cache, and an L3 cache. Using such a cache memory, the processing circuit 12 temporarily stores data stored in the first memory 14 or the non-volatile memory 16. In the case of making a cache mistake in the lowest cache (last-level cache) in the hierarchical caches, for example, the processing circuit 12 accesses the first memory 14 or the non-volatile memory 16 to read out or write in necessary data in a cache line unit.
In addition, the processing circuit 12 may be any circuit as long as data processing can be executed. For example, the processing circuit 12 may be an accelerator or the like. For example, the processing circuit 12 may be a graphics processing unit (GPU) used for a general-purpose computing on graphics processing unit (GPGPU) or the like. In addition, the processing circuit 12 may be an accelerator for artificial intelligence processing, or the like.
The first memory 14 is a main storage device (main memory) used as a work area by the processing circuit 12. The first memory 14 is a volatile memory in which loses stored data when power supply is stopped, for example. The first memory 14 is a Dynamic Random Access Memory (DRAM), for example. In addition, the first memory 14 may be a non-volatile memory such as a Magnetoresistive Random Access Memory (MRAM), to which high-speed access can be performed similarly to the DRAM.
In addition, the first memory 14 has a larger write endurance than that of the non-volatile memory 16. For example, the first memory 14 has such a large number of writable times that design needs not be made considering the number of writable time (e.g. that design can be made assuming that there is no limit on the number of writable times).
The non-volatile memory 16 is a memory that continues to store data even if power supply is stopped. The non-volatile memory 16 functions as a main storage device of the processing circuit 12 together with the first memory 14.
The non-volatile memory 16 includes a large-capacity high-speed non-volatile memory (Non-volatile Memory) having a larger capacity than the DRAM, for example. The non-volatile memory 16 is a MRAM, a phase change memory (PCM), a phase random access memory (PRAM), a phase change random access memory (PCRAM), a resistance change random access memory (ReRAM), a ferroelectric random access memory (FeRAM), a 3DXPoint, a Memristor, or the like, for example. The non-volatile memory 16 may be a memory referred to as a so-called storage class memory (SCM). In addition, the non-volatile memory 16 may be a module in which a plurality of semiconductor devices are provided on one substrate, casing, or the like.
The non-volatile memory 16 has a larger capacity as compared with the first memory 14. The capacity of the non-volatile memory 16 may be the same as that of the first memory 14. In addition, the non-volatile memory 16 has an access speed equivalent to or a bit slower than an access speed of the first memory 14. In addition, the non-volatile memory 16 has zero standby power or extremely-little standby power as compared with the first memory 14. As an example, the non-volatile memory 16 is a memory having an access latency of about 10 nanoseconds to several microseconds.
The non-volatile memory 16 is data-writable and data-readable in a unit of a small region such as a byte unit. Thus, the processing circuit 12 can directly access the non-volatile memory 16 by a load command or a store command. The processing circuit 12 directly accesses the non-volatile memory 16 in a cache line unit or the like, for example.
In addition, the non-volatile memory 16 includes a high-temperature region and a low-temperature region. During operation, temperature in the low-temperature region is relatively lower than in the high-temperature region. For example, in a case where the non-volatile memory 16 includes a plurality of stacked semiconductor chips, a semiconductor chip having good heat release efficiency because of being located close to a heat release device or the like is set as a low-temperature region, and a semiconductor chip having bad heat release efficiency because of being farther from the heat release device or the like is set as a high-temperature region.
The management device 18 controls readout and writing of data that are performed by the processing circuit 12 with respect to the first memory 14 and the non-volatile memory 16. The management device 18 processes an access request to the first memory 14 and the non-volatile memory 16 from the processing circuit 12. More specifically, in response to a writing command from the processing circuit 12, the management device 18 writes data into the first memory 14 or the non-volatile memory 16. In addition, in response to a readout command from the processing circuit 12, the management device 18 reads out data from the first memory 14 or the non-volatile memory 16, and grants the read-out data to the processing circuit 12.
In addition, the management device 18 is a memory controller formed by hardware separate from the processing circuit 12, for example. In addition, the management device 18 may be a part of pieces of hardware of the processing circuit 12 (e.g. circuit formed on the same semiconductor substrate as the processing circuit 12), or may be implemented by a combination of a part of pieces of hardware of the processing circuit 12 and a memory controller. In addition, the management device 18 may be implemented by a part of functions of an operating system executed by the processing circuit 12, or may be implemented by a combination of a part of functions of the operating system, and a memory controller.
In addition, for example, the management device 18 may be a memory management unit (MMU) formed by hardware separate from the processing circuit 12. In addition, the management device 18 may be implemented by a combination of a part of pieces of hardware of the processing circuit 12, and a memory management unit. In addition, the management device 18 may be implemented by a combination of a part of functions of an operating system executed by the processing circuit 12, and a memory management unit.
In addition, the management device 18 may be implemented by a combination of a memory controller and a memory management unit (MMU). In addition, the management device 18 may be implemented by a combination of a part of pieces of hardware of the processing circuit 12, a memory controller, and a memory management unit. In addition, the management device 18 may be implemented by a combination of a part of functions of an operating system executed by the processing circuit 12, a memory controller, and a memory management unit.
The setting storage unit 26 stores a conversion table. The conversion table stores, for each page for which the processing circuit 12 issues an access request, a correspondence relationship between a request address and a number (physical address) for identifying a corresponding region storing a page in the first memory 14 or the non-volatile memory 16.
Furthermore, the conversion table stores, for each page for which the processing circuit 12 issues an access request, an access method indicating which of first access processing and second access processing is to be executed.
The first access processing is a method of performing writing and readout with respect to data transferred from the non-volatile memory 16 to the first memory 14. The second access processing is a method of directly performing writing and readout with respect to data stored in the non-volatile memory 16. In addition, the details of the conversion table will be described later with reference to
The access processing unit 28 processes an access request to the first memory 14 and the non-volatile memory 16 from the processing circuit 12. More specifically, in response to a writing command from the processing circuit 12, the access processing unit 28 writes data into the first memory 14 or the non-volatile memory 16. In addition, in response to a readout command from the processing circuit 12, the access processing unit 28 reads out data from the first memory 14 or the non-volatile memory 16, and grants the read-out data to the processing circuit 12.
In addition, for a page for which the processing circuit 12 has issued an access request, the access processing unit 28 accesses the first memory 14 and the non-volatile memory 16 by an access method stored in the conversion table. In other words, in a case where a writing or readout request is received for a page set to the first access processing, the access processing unit 28 executes the first access processing. In addition, in a case where a writing or readout request is received for a page set to the second access processing, the access processing unit 28 executes the second access processing. In addition, the details of the access method will be described later with reference to
The access amount storage unit 32 stores an access amount table. The access amount table stores, for each of a plurality of pages stored in the non-volatile memory 16, an access amount of data in a certain period of time. In addition, the details of the access amount table will be described later with reference to
The update unit 36 updates each access amount stored in the access amount table. In a case where the processing circuit 12 accesses the non-volatile memory 16, the update unit 36 acquires address information of accessed data, and updates the access amount table based on the acquired address information. Then, the update unit 36 resets the access amount table every certain period of time.
Here, the access amount is the number of writings in a certain period of time, for example. In this case, the update unit 36 acquires address information of data written into the non-volatile memory 16 by the processing circuit 12, and updates the access amount table based on the acquired address information. In addition, the access amount may be a total number of the number of writings and the number of readouts in a certain period of time. In this case, the update unit 36 acquires address information of data written into the non-volatile memory 16 or read out from the non-volatile memory 16 by the processing circuit 12, and updates the access amount table based on the acquired address information.
The management unit 40 controls a storage position in the non-volatile memory 16 for each of a plurality of pages. More specifically, in a case where a plurality of pages are classified into a high access page group in which access amounts are relatively high, and a low access page group in which the access amounts are relatively low, the management unit 40 moves storage positions of the plurality of pages in such a manner that pages included in the high access page group are stored more in the low-temperature region than in the high-temperature region. Furthermore, the management unit 40 may move storage positions of the plurality of pages in such a manner that pages included in the low access page group are stored more in the high-temperature region than in the low-temperature region. In addition, detailed processing of the management unit 40 will be further described in
For example, in the example in
Furthermore, the conversion table stores, for each page for which the processing circuit 12 issues an access request, an access method indicating which of first access processing and second access processing is to be executed. In addition, the configuration of the conversion table is not limited to the configuration as illustrated in
For example, as illustrated in
In addition, the access processing unit 28 may write back the data in the first page that has been transferred to the first memory 14, to an original location or to another location. For example, in the first access processing, the access processing unit 28 may write back the data in the first page that has been transferred from the non-volatile memory 16 to the first memory 14, to an unused region not associated with any request address. The access processing unit 28 can thereby reduce a gap between the numbers of rewritings among pages, and suppress quality deterioration of a specific page.
In addition, in a case where a writing or readout request is received for a second page set to the second access processing, the access processing unit 28 executes the second access processing on the non-volatile memory 16.
For example, as illustrated in
In this manner, the access processing unit 28 accesses the non-volatile memory 16 by two types of access methods. For example, in a case where an application having high locality is executed for memory access, the access processing unit 28 transfers a page stored in the non-volatile memory 16, to the first memory 14, and accesses the page by the first access processing. The access processing unit 28 can thereby perform processing on the same page at higher speed in a case where an application having high locality is executed for memory access.
In addition, for example, in a case where processing with low locality is executed for memory access as in random access, the access processing unit 28 accesses a page stored in the non-volatile memory 16, by the second access processing. The access processing unit 28 can thereby eliminate an overhead of transfer processing from the non-volatile memory 16 to the first memory 14, and can efficiently perform processing, in a case where processing with low locality is executed. In this manner, the access processing unit 28 can efficiently perform processing by using two types of access methods including the first access processing and the second access processing.
First of all, in S11, the access processing unit 28 determines whether an access request is issued from the processing circuit 12. In a case where no access request is issued (No in S11), the access processing unit 28 causes the processing to stand by in S11. In a case where an access request is issued (Yes in S11), the access processing unit 28 advances the processing to S12.
In S12, the access processing unit 28 refers to the conversion table, and identifies, from a request address included in the access request, a page number of a target page serving as an access destination in the first memory 14 or the non-volatile memory 16. The access processing unit 28 can thereby execute address conversion processing from the request address into a physical address.
Subsequently, in S13, the access processing unit 28 determines whether an access method for the target page is the first access processing. In a case where an access method for the target page is not the first access processing, that is to say, in a case where the access method is the second access processing (No in S13), the access processing unit 28 advances the processing to S14. In S14, the access processing unit 28 directly accesses the target page in the non-volatile memory 16. Then, when the processing in S14 ends, the access processing unit 28 ends this flow.
In addition, in a case where an access method for the target page is the first access processing (Yes in S13), the access processing unit 28 advances the processing to S15. In S15, the access processing unit 28 determines whether the data has been transferred to the first memory 14 or the data has not been transferred yet. The access processing unit 28 can determine whether the data has been transferred to the first memory 14 or the data has not been transferred yet, by referring to a page number (physical address) in the conversion table. In a case where the data has been transferred (Yes in S15), the access processing unit 28 advances the processing to S17.
In a case where the data has not been transferred yet (No in S15), the access processing unit 28 advances the processing to S16. In S16, the access processing unit 28 transfers data in the target page to the first memory 14. Furthermore, the access processing unit 28 changes a page number (physical address) of the transferred data in the conversion table, to a page number of a transfer destination in the first memory 14. When the processing in S16 ends, the access processing unit 28 advances the processing to S17.
In S17, the access processing unit 28 accesses the target page in the first memory 14. Then, when the processing in S17 ends, the access processing unit 28 ends this flow. By executing the processing as described above, the access processing unit 28 can access the first memory 14 and the non-volatile memory 16 by an access method stored in the conversion table.
Each access amount may represent the number of readouts or an estimate value of the number of readouts of a corresponding page. Each access amount may represent the number of rewritings or an estimate value of the number of rewritings of a corresponding page. Each access amount may represent a total number of the number of writings and the number of readouts of a corresponding page, or a total number of an estimate value of the number of writings and an estimate value of the number of readouts. Each access amount is reset to 0 every certain period of time, for example.
In the non-volatile memory 16 having such a configuration, heat is released by the heatsink 54. Thus, the non-volatile memory 16 has such a tendency that temperatures of chips 50 in a region close to the heatsink 54 become low, and temperatures of chips 50 in a region far from the heatsink 54 become high. Thus, in the non-volatile memory 16 having such a configuration, one or a plurality of chips 50 far from the heatsink 54 are set as a high-temperature region, and one or a plurality of chips 50 located closer to the heatsink 54 than the high-temperature region are set as a low-temperature region.
In this case, in the non-volatile memory 16, one or a plurality of chips 50 close to the substrate 52 or the interposer are set as a high-temperature region, and one or a plurality of chips 50 farther from the substrate 52 or the interposer than the high-temperature region are set as a low-temperature region.
The logic chip 56 includes a circuit that executes data processing. The logic chip 56 generally has a large heat generation amount. Thus, in such a non-volatile memory 16, one or a plurality of chips 50 close to the logic chip 56 are set as a high-temperature region, and one or a plurality of chips 50 farther from the logic chip 56 than the high-temperature region are set as a low-temperature region.
In S21, the management unit 40 refers to the access amount table stored in the access amount storage unit 32, and acquires an access amount in a certain period of time in a target page. Subsequently, in S22, the management unit 40 refers to a page number (physical address) in the conversion table in the setting storage unit 26, and determines whether the target page belongs to a high-temperature region. In a case where the target page belongs to a high-temperature region (Yes in S22), the management unit 40 advances the processing to S23, and in a case where the target page does not belong to a high-temperature region (No in S22), the management unit 40 advances the processing to S26.
In S23, the management unit 40 determines whether an access amount in a certain period of time of the target page belonging to the high-temperature region is larger than a predefined first reference value. In a case where the access amount is not larger than the first reference value (No in S23), the management unit 40 ends this flow, and continues the processing of this flow for the next page.
In a case where the access amount is larger than the first reference value (Yes in S23), the management unit 40 advances the processing to S24. In S24, the management unit 40 reserves a free space in the low-temperature region for storing the page. Subsequently, in 325, the management unit 40 moves the target page from the high-temperature region to the low-temperature region, and changes a page number (physical address) of the target page in the conversion table. After ending S25, the management unit 40 ends this flow, and continues the processing of this flow for the next page.
By executing the processing in S24 and S25, the management unit 40 can move storage positions of a plurality of pages in such a manner that pages included in a high access page group are stored more in the low-temperature region than in the high-temperature region.
In addition, in S26, the management unit 40 determines whether an access amount in a certain period of time of a target page not belonging to the high-temperature region, that is to say, a target page belonging to the low-temperature region is smaller than a predefined second reference value. The second reference value is an amount smaller than the first reference value, for example. In a case where the access amount is not smaller than the second reference value (No in S26), the management unit 40 ends this flow, and continues the processing of this flow for the next page.
In a case where the access amount is smaller than the second reference value (Yes in S26), the management unit 40 advances the processing to S27. In S27, the management unit 40 reserves a free space in the high-temperature region for storing the page. Subsequently, in S28, the management unit 40 moves the target page from the low-temperature region to the high-temperature region, and changes a page number (physical address) of the target page in the conversion table. After ending S28, the management unit 40 ends this flow, and continues the processing of this flow for the next page.
By executing the processing in S27 and S28, the management unit 40 can move storage positions of a plurality of pages in such a manner that pages included in a low access page group are stored more in the high-temperature region than in the low-temperature region.
In S31, the management unit 40 refers to an access method in the conversion table in the setting storage unit 26, and determines whether the target page is to be accessed by the second access processing. In a case where the second access processing is not to be used (No in S31), the management unit 40 ends this flow, and continues the processing of this flow for the next page. In a case where the second access processing is to be used (Yes in S31), the management unit 40 advances the processing to S24. The management unit 40 can thereby move the page to the low-temperature region in a case where the second access processing is to be used, that is to say, in a case where processing of directly writing data into or reading data from the non-volatile memory 16 is to be performed.
In addition, in S32, the management unit 40 refers to an access method in the conversion table in the setting storage unit 26, and determines whether the target page is to be accessed by the first access processing. In a case where the first access processing is not to be used (No in S32), the management unit 40 ends this flow, and continues the processing of this flow for the next page. In a case where the first access processing is to be used (Yes in S32), the management unit 40 advances the processing to S27. The management unit 40 can thereby move the page to the high-temperature region in a case where the first access processing is to be used, that is to say, in a case where processing of performing writing and readout of data by copying the data into the first memory 14 is to be performed.
In place of the above-described processing, in S31, the management unit 40 may determine whether the target page is to be accessed by the first access processing. Then, in a case where the first access processing is to be used (Yes in S31), the management unit 40 advances the processing to S24. The management unit 40 can thereby move the page to the low-temperature region in a case where the first access processing is to be used, that is to say, in a case where an access amount with respect to the page is large.
Furthermore, in S32, the management unit 40 may determine whether the target page is to be accessed by the second access processing. Then, in a case where the second access processing is to be used (Yes in 332), the management unit 40 advances the processing to 327. The management unit 40 can thereby move the page to the high-temperature region in a case where the second access processing is to be used, that is to say, in a case where an access amount with respect to the page is small.
In such a case, for example, the management unit 40 classifies access amounts with respect to target pages, into a plurality of stages, and moves the target pages to regions corresponding to the respective classifications. Specifically, the management unit 40 moves the target pages so as to be stored in a region closer to the low temperature side as the access amounts become larger. In other words, the management unit 40 moves the target pages so as to be stored in regions closer to the high temperature side as the access amounts become smaller.
Also in this case, the management unit 40 can move storage positions of the plurality of pages in such a manner that pages included in the high access page group are stored more in the low-temperature region than in the high-temperature region. Furthermore, the management unit 40 can move storage positions of the plurality of pages in such a manner that pages included in the low access page group are stored more in the high-temperature region than in the low-temperature region.
As describe above, the information processing apparatus 10 according to the present embodiment can store a page with a large access amount in a low-temperature region, and store a page with a small access amount in a high-temperature region. There is a possibility that operation performance becomes worse in the high-temperature region than that in the low-temperature region. Thus, by storing a page with a large access amount in the low-temperature region, the information processing apparatus 10 according to the present embodiment can enhance access efficiency with respect to the non-volatile memory 16 as a whole.
Hereinafter, modified examples of each embodiment will be described.
The processing circuit 12 includes a virtual storage mechanism referred to as a TLB. The TLB stores correspondence relationship information indicating correspondence between a request address (logical address) and a physical address in a page, for converting an address from a virtual address to a physical address. Nevertheless, the correspondence relationship information is replaced as necessary because entries held by the TLB are limited. The TLB preferentially stores correspondence relationship information regarding pages recently accessed at high frequency, for example.
Thus, the management device 18 may store management information in a management table for a page for which correspondence relationship information is stored in the TLB. For example, the management device 18 stores a management table including entries in the same number as the number of entries of the TLB. Then, the update unit 36 erases management information stored in a corresponding management table, at a timing at which correspondence relationship information is expelled from the entries of the TLB. In this case, the update unit 36 executes processing similar to that executed in a case where management information is written into another pieces of management information. In addition, because a management table includes the same entries as the entries of the TLB, an entry storing identification information needs not be included.
In addition, the first memory 14 may be a Static Random Access Memory (SRAM) in a processor, for example. In addition, the first memory 14 may be a non-volatile memory such as a MRAM that has a larger number of rewritings than that of the non-volatile memory 16.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
Number | Date | Country | Kind |
---|---|---|---|
2018-172870 | Sep 2018 | JP | national |