This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2013-081652, filed on Apr. 9, 2013, the entire contents of which are incorporated herein by reference.
The embodiment discussed herein is directed to an information processing apparatus, a memory control device, a data transfer control method, and a data transfer control program.
In recent years, auxiliary storage units, such as memory systems or storage systems, that use nonvolatile memories, such as NAND type flash memory devices, have been widely used in information processing apparatuses, such as servers.
When an auxiliary storage unit that includes this type of nonvolatile memory as a medium is used, software executes a process in response to an input of data in the nonvolatile memory and executes, when the process has been completed, a process that stores the data that has been subjected to the process in the nonvolatile memory. In this process, if the amount of data to be processed is large or if the amount of free space is small, data that is in a middle of the process or that has been updated may sometimes be temporarily stored in the nonvolatile memory.
When a process that temporarily stores the data that is in a middle of the process or that has been updated in the nonvolatile memory is performed, the following process is conceivably performed. Namely, even though there is no change between the update data that is temporarily stored in the nonvolatile memory and the data in which the process has been completed, there may be a case in which the finalized data obtained after the completion of the process is re-stored in the nonvolatile memory when the process has been completed. Consequently, a system bus is used to read or write the update data, and thus the performance in the entirety of the information processing apparatus is decreased.
In order to reduce the number of accesses to a nonvolatile memory, there is a proposed technology that replaces, when data is replaced between logical addresses, the association relationship between the logical addresses and the physical addresses.
However, in the conventional technology that replaces the association relationship between addresses, only the replacement is targeted and thus the moving of data, other than the replacement, inside a nonvolatile memory is not considered. Consequently, with the conventional technology that replaces the association relationship between the addresses, it is not possible to determine whether data is moved only inside the nonvolatile memory without being replaced; therefore, it is difficult to reduce the number of accesses to the nonvolatile memory. In other words, with the conventional technology that replaces the association relationship between addresses, the use rate of the buses is not able to be reduced and thus it is not possible to improve the performance of the system.
According to an aspect of an embodiment, an information processing apparatus includes: a storing unit that stores therein data and that manages the stored data by using a physical address; a processing unit that outputs a process instruction to process, by using a logical address associated with the physical address, data stored in the storing unit; a detecting unit that detects, on the basis of the process instruction that is output from the processing unit, an instruction to move data stored in the storing unit; and an address changing unit that stores therein an association relationship between the physical address and the logical address and that changes, when the detecting unit detects the instruction to move the data, the association relationship such that the logical address at the move destination is associated with the physical address in which the data is stored.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
Preferred embodiments of the present invention will be explained with reference to accompanying drawings. The information processing apparatus, the memory control device, the data transfer control method, and the data transfer control program disclosed in the present invention is not limited to the embodiment described below.
The main control unit 1 executes an OS or an application. The device control unit 2 controls the sending and receiving of data exchanged between the main control unit 1 and the nonvolatile memory 3.
The nonvolatile memory 3 is a storage device that stores therein information. For example, the nonvolatile memory 3 is a storage device that uses a NAND-type flash memory device (hereinafter, referred to as a “NAND device”).
There are various limitations in an access method of the nonvolatile memory 3. For example, if a nonvolatile memory is a NAND device, data may sometimes be read or written in page units. The size of the page is, for example, 1 to 16 kilobytes; however, the size varies in accordance with the type of nonvolatile memory. At this point, if data is once written to a page, the data is not able to be overwritten on that page. With the nonvolatile memory, such as a NAND device, when new data is written to a page to which data is once written, the data stored in that page is erased and then data is newly written. However, with the nonvolatile memory such as a NAND device, when data stored in a page is erased, the data is not able to be erased in page units and thus the data is erased in block units, which is an assembly of one or more pages. The size of the block varies in accordance with the type of nonvolatile memory. In general, one block is constituted of, for example, 64 to 256 pages.
The main control unit 1 includes an arithmetic processing unit 11 and an interface (IF) control unit 12. Furthermore, the arithmetic processing unit 11 includes an OS execution unit 13 and an application execution unit 14.
The OS execution unit 13 executes an OS. Furthermore, the OS execution unit 13 includes a file system execution unit 131 and a driver execution unit 132.
The OS execution unit 13 includes the file system execution unit 131 that performs management by using data stored in the nonvolatile memory 3. The file system execution unit 131 manages the data stored in the nonvolatile memory 3 by using logical addresses.
The driver execution unit 132 instructs the IF control unit 12 to read and write data from and to the nonvolatile memory 3.
The arithmetic processing unit 11 reads and writes data from and to a logical address by using the file system execution unit 131, thereby, in practical, operating the reading and writing data from and to the physical addresses in the nonvolatile memory 3. Specifically, by instructing the file system execution unit 131 to read or write data from or to the data, the arithmetic processing unit 11 instructs the IF control unit 12 to read or write the data by using the driver execution unit 132.
For example, by sending a command for reading data, i.e., by sending a read instruction to read data, to the IF control unit 12, the arithmetic processing unit 11 instructs the IF control unit 12 to read the data. Furthermore, by sending a write instruction for writing data, i.e., by sending a write instruction to write data, to the IF control unit 12, the arithmetic processing unit 11 instructs the IF control unit 12 to write the data.
The application execution unit 14 executes an application or the like in an OS executed by the OS execution unit 13.
If a move instruction is prescribed in communication between a host IF control unit 21 in the device control unit 2 and the IF control unit 12, the arithmetic processing unit 11 sends a move instruction to the IF control unit 12, thereby the arithmetic processing unit 11 instructs the moving of data. Furthermore, if a SWAP instruction is prescribed in communication between the host IF control unit 21 in the device control unit 2 and the IF control unit 12, the arithmetic processing unit 11 sends the SWAP instruction to the IF control unit 12, thereby the arithmetic processing unit 11 instructs the replacement of data.
The IF control unit 12 manages input and output of data, which is stored in the main control unit 1, to and from the device control unit 2. The IF control unit 12 receives an instruction to operate data by receiving, from the arithmetic processing unit 11, various operation commands, such as the writing and reading of data from and to the nonvolatile memory 3. Then, the IF control unit 12 outputs the received command to the host IF control unit 21 in the device control unit 2.
For example, the IF control unit 12 receives an input of a write instruction or a read instruction from the arithmetic processing unit 11. When the IF control unit 12 receives a read instruction to read data, the IF control unit 12 outputs, to the host IF control unit 21, the received read instruction to read the data. Similarly, when the IF control unit 12 receives a write instruction to write data, the IF control unit 12 outputs, to the host IF control unit 21, the received write instruction to write the data.
Furthermore, the IF control unit 12 receives a response to the output command from the host IF control unit 21. Then, the IF control unit 12 outputs the received response to the arithmetic processing unit 11. For example, when a command for reading data is output, if the reading of the data has been successful, the IF control unit 12 receives an input of the specified data from the host IF control unit 21. Then, the IF control unit 12 outputs the received data to the arithmetic processing unit 11. Furthermore, when a command for writing data is output, if the writing of the data has been successful, the IF control unit 12 receives a notification from the host IF control unit 21 indicating that the writing of the data has been completed. Then, the IF control unit 12 outputs the received notification to the arithmetic processing unit 11 indicating that the writing of the data has been completed.
The device control unit 2 includes the host IF control unit 21, an address conversion table control unit 22, a device access control unit 23, and an access control unit 24.
The host IF control unit 21 receives an input of a command from the IF control unit 12. The host IF control unit 21 analyzes the received command and then determines that the command indicates an access to the nonvolatile memory 3. Then, the host IF control unit 21 outputs, together with the command, a notification of the access to the nonvolatile memory 3 to the address conversion table control unit 22 and the access control unit 24.
Furthermore, the host IF control unit 21 receives a response to the received command from the address conversion table control unit 22. Then, the host IF control unit 21 outputs the received response to the IF control unit 12.
The access control unit 24 receives an input of a command from the host IF control unit 21. Then, on the basis of the type of input command, the previous and subsequent relationship of the command, the content of the command, or the like, the access control unit 24 determines whether an instruction received from the arithmetic processing unit 11 indicates the moving of data.
For example, if the access control unit 24 continuously receives a read command and a write command and if the access control unit 24 writes data that has been read in response to the read command, the access control unit 24 determines that the data, which is instructed to read, is to be moved. Specifically, if the access control unit 24 continuously receives a read command indicating that data is to be read from an address A1 in the nonvolatile memory 3 to an address B in the main memory and a write command indicating that data in the address B is to be written to an address A2 in the nonvolatile memory 3, the access control unit 24 can determine that the data is to be moved. Furthermore, when it is detected that identification information, which indicates that a read command and a write command are continuous instructions, is attached to the continuous read commands and the write commands, the access control unit 24 may also determine that the data is to be moved.
Furthermore, if a move instruction is prescribed in communication between the host IF control unit 21 and the IF control unit 12, when the access control unit 24 receives a move instruction, the access control unit 24 determines that the data, which is instructed by the move instruction, is to be moved. Similarly, if a SWAP instruction is prescribed in communication between the host IF control unit 21 and the IF control unit 12, when the access control unit 24 receives a SWAP instruction, the access control unit 24 determines that the data, which is instructed by the SWAP instruction, is to be moved. The SWAP instruction mentioned here is, for example, an instruction to swap data stored in an address in a memory for data stored in another address in the memory.
Furthermore, similar determination is also performed when a rewrite instruction to rewrite a table that is dedicated to the information processing apparatus 100 is prescribed, as an instruction to rewrite a table without actually moving data, in communication between the host IF control unit 21 and the IF control unit 12. Specifically, when the access control unit 24 receives a dedicate table rewrite instruction, the access control unit 24 determines that the data, which is instructed by the dedicated table rewrite instruction, is to be moved.
If the access control unit 24 determines that the data is to be moved, the access control unit 24 sends, to the address conversion table control unit 22, a request for a physical address of the data to be moved. Then, the access control unit 24 acquires the physical address of the data to be moved from the address conversion table control unit 22.
Then, the access control unit 24 instructs the address conversion table control unit 22 to associate the acquired physical address with the logical address that is obtained after the moving. Furthermore, the access control unit 24 notifies the address conversion table control unit 22 of an instruction indicating that the association relationship between the logical address and the physical address before the data, which is instructed to move, is made invalid.
For example, when the access control unit 24 determines, on the basis of the read command and the write command, that the data is to be moved, the access control unit 24 acquires, from the address conversion table control unit 22, the physical address that is associated with the logical address of the data that is specified by the read command. Then, the access control unit 24 instructs the address conversion table control unit 22 to associate the acquired physical address with the logical address at the destination to which the data is written and that is specified by the write command. Furthermore, the access control unit 24 notifies the address conversion table control unit 22 of an instruction indicating that the association relationship between the logical address and the physical address of the data specified by the read command is made invalid. Specifically, in this case, the logical address of the data that is specified by the read command becomes a logical address at the move source and the logical address of the data that is specified by the write command becomes a logical address at the move destination.
Furthermore, when the access control unit 24 determines, on the basis of a command for the move instruction, that the data is to be moved, the access control unit 24 acquires, from the address conversion table control unit 22, the physical address that is associated with the logical address at the move source that is specified by the move instruction. Then, the access control unit 24 instructs the address conversion table control unit 22 to associates the acquired physical address with a logical address at the move destination that is specified by the move instruction. Furthermore, the access control unit 24 notifies the address conversion table control unit 22 of an instruction indicating that the association relationship between the physical address and the logical address at the move source specified by the move instruction is made invalid. The same process is also used when, for example, a SWAP instruction or a dedicate table rewrite instruction is performed by the information processing apparatus 100.
The address conversion table control unit 22 includes an address conversion table that represents the association relationship between the physical addresses and the logical addresses. Because no limit is set to the amount of overwriting or writing of data to a hard disk drive or the like, no problem occurs even if the file system execution unit 131 manages stored data using a physical address of the hard disk. However, if the amount of overwriting or writing of data is limited, such as a nonvolatile memory, when software, such as a file system, manages physical addresses, it takes a long time to perform an arithmetic operation, a memory access, or the like, and thus the load applied to the arithmetic processing unit 11 is increased. Consequently, the address conversion table control unit 22 manages, by using an address conversion table, data by associating the logical address that is managed by the file system execution unit 131 and the physical address stored in the nonvolatile memory 3 in which data is actually stored.
The address conversion table control unit 22 receives, from the host IF control unit 21, a notification of an access to the nonvolatile memory 3 together with an input of a command. If no request for a physical address is received from the access control unit 24 thereafter, the address conversion table control unit 22 executes a process in accordance with the received command.
For example, if a read command is received, the address conversion table control unit 22 acquires, from the address conversion table, the physical address that is associated with the logical address specified by the command. Then, the address conversion table control unit 22 instructs the device access control unit 23 to acquire data from the acquired physical address. Then, the address conversion table control unit 22 acquires the data from the device access control unit 23. Then, the address conversion table control unit 22 outputs the acquired data to the host IF control unit 21.
Furthermore, if an erase instruction is received, the address conversion table control unit 22 acquires, from the address conversion table, the physical address that is associated with the logical address in which the data specified by the command is stored. Then, the address conversion table control unit 22 instructs the device access control unit 23 to invalidate the page that includes the acquired physical address.
At this point, if the address conversion table control unit 22 receives an erase instruction to erase the data due to the limit of the overwriting of data to the nonvolatile memory described above, the page in which the data instructed to erase is stored is made invalid until the data can be erased in block units. Hereinafter, the page that is made invalid is referred to as an “invalid page”.
Furthermore, the address conversion table control unit 22 invalidates the physical address, which is associated with the logical address in the page that was made invalid in the address conversion table. For example, the address conversion table control unit 22 sets a flag indicating that the physical address is invalid in the logical address in the page that is made invalid in the address conversion table. Alternatively, the address conversion table control unit 22 may also invalidate a physical address by associating a value that is set in advance. For example, “all f” may set in the logical addresses in a page that is made invalid in the address conversion table.
Furthermore, if a write command is received, the address conversion table control unit 22 searches the address conversion table for a logical address at the write destination and then determines whether the write command indicates a new command or indicates a command to update data that has already been written.
If the write command is a new command, the address conversion table control unit 22 selects a physical address that is used to store therein the data from among the pages that are not invalid page (hereinafter, referred to as a “free page”) in the address conversion table. Then, the address conversion table control unit 22 registers, in the address conversion table, the selected physical address such that the address is associated with the logical address that is specified by the command. Then, the address conversion table control unit 22 instructs the device access control unit 23 to write the data to the selected physical address.
Furthermore, if the commands indicates an update of the data that has already been written, the address conversion table control unit 22 selects, from among the free pages, a physical address that is used to store the data. Then, the address conversion table control unit 22 registers, in the address conversion table, the selected physical address such that the address is associated with the logical address that is specified by the command. Then, the address conversion table control unit 22 instructs the device access control unit 23 to write the data to the selected physical address. Furthermore, the address conversion table control unit 22 acquires the physical address associated with the logical address that is specified by the command from the address conversion table. Then, the address conversion table control unit 22 instructs the device access control unit 23 to invalidate the page that includes the acquired physical address. Consequently, the page in which the data before the update is stored is made invalid.
Furthermore, with a nonvolatile memory, such as a NAND device, the number of invalid pages are increased because the address conversion table control unit 22 invalidates a page when data is erased and updated and thus the number of free pages to which data can be written is decreased. Accordingly, in order to erase data in an invalid page to make the page free, the address conversion table control unit 22 collects invalid pages into the same block and then erases the data. This process may also be referred to as garbage collection. In the garbage collection, the address conversion table control unit 22 extracts a block that has a lot of invalid pages and then moves valid data present in the extracted block to a free page in another block. Consequently, all the pages in the extracted block become invalid pages. Then, the address conversion table control unit 22 erases the data in the block that stores therein all the pages are made invalid. Consequently, all the pages in the block in which data is erased become free pages and thus the address conversion table control unit 22 can newly write data to all of the pages in the extracted blocks.
When the access control unit 24 determines that data is to be moved, the address conversion table control unit 22 receives a request for a physical address from the access control unit 24. At this point, the address conversion table control unit 22 also receives the logical address of the data from the access control unit 24. Then, the address conversion table control unit 22 acquires the physical address that is associated with the logical address of the data from the data conversion table. Then, the address conversion table control unit 22 sends the acquired physical address to the access control unit 24.
Then, the address conversion table control unit 22 receives, from the access control unit 24, an instruction to associate the physical address of the data before a move with the logical address of the data after the move. Then, the address conversion table control unit 22 registers, in the address conversion table, the association relationship between the physical address and the logical address instructed by the access control unit 24.
Furthermore, the address conversion table control unit 22 receives, from the access control unit 24, an instruction to invalidate the association relationship between the logical address of the moved data before a move and the physical address of the moved data. Then, the address conversion table control unit 22 invalidates, in the address conversion table, the logical address of the moved data before the move and the physical address of the moved data. For example, the address conversion table control unit 22 sets, in the logical address before the move stored in the address conversion table, a flag indicating that the physical address is valid.
The device access control unit 23 receives, from the address conversion table control unit 22, a read instruction to read data, a write instruction to write data, an invalid instruction to invalidate a page, or the like together with the physical address of the target data.
If a read instruction to read data is received, the device access control unit 23 reads the data from the physical address that is specified by the nonvolatile memory 3 and then sends the data to the address conversion table control unit 22. If a write instruction to write data is received, the device access control unit 23 writes the data to the physical address that is specified by the nonvolatile memory 3. If an invalid instruction to invalidate a page is received, the device access control unit 23 invalidates the page associated with the specified physical address.
Furthermore, the device access control unit 23 receives, from the address conversion table control unit 22, an erase instruction to erase data in a block that is specified together with the instruction. Then, the device access control unit 23 erases data in all of the pages included in the specified block.
An example of the auxiliary storage unit 508 includes a hard disk, a nonvolatile memory, and the like. The auxiliary storage unit 508 implements the function performed by the nonvolatile memory 3 illustrated in
The CPU 501 is connected to the memory control unit 502. The memory control unit 502 is connected to the main memory 504 and the IO unit 503.
The CPU 501, the memory control unit 502, and the main memory 504 implement the function performed by, for example, the arithmetic processing unit 11 or the IF control unit 12 in the main control unit 1 illustrated in
The IO unit 503 includes a micro processing unit (MPU) 510. Furthermore, the IO unit 503 is connected to the memory control unit 502 and sends and receives data. Furthermore, the IO unit 503 is connected to the IO adapters 505 to 507. The device control unit 2 is connected to the auxiliary storage unit 508 via the IO adapter 505.
The IO unit 503 and the IO adapter 507 implement the functions performed by, for example, the host IF control unit 21, the address conversion table control unit 22, the device access control unit 23, and the access control unit 24 illustrated in
Furthermore, the IO unit 503 is connected to a local area network (LAN) 509 via, for example, the IO adapter 506.
In the following, the relationship between the logical addresses and the physical addresses when data is moved by the information processing apparatus according to the embodiment will be described with reference to
In the following, a description will be given of a case in which the following process is performed. Namely, the arithmetic processing unit 11 performs arithmetic processing by using data (hereinafter, referred to as “original data”) that is stored in the nonvolatile memory 3. Then, the arithmetic processing unit 11 temporarily stores the data that is updated during the process in the file system 133 and then formally stores the updated data in the file system 133 after the process has been completed. In a description below, this process is referred to as a “data move process performed when the process has been completed”.
As illustrated in
The nonvolatile memory 3 illustrated in
As illustrated in
In the state illustrated in
Then, the access control unit 24 requests the physical address of the update data 102 from the address conversion table control unit 22. The address conversion table control unit 22 acquires, from the address conversion table 220, the physical address that is associated with the logical address in which the update data 102 is stored. In this case, because the logical addresses in which the update data 102 is stored is L6-0 to L7-1, the address conversion table 220 searches the address conversion table 220 for the logical addresses L6-0 to L7-1. Then, the address conversion table control unit 22 acquires the physical address 104 associated with the logical addresses L6-0 to L7-1. Then, the address conversion table control unit 22 sends the physical addresses P2-2 to P3-3 indicated by the physical address 104 to the access control unit 24.
The access control unit 24 acquires the physical address P2-2 to P3-3 from the address conversion table control unit 22. Then, the access control unit 24 notifies the address conversion table control unit 22 that the physical addresses P2-2 to P3-3 is associated with the logical addresses L3-0 to L4-1 in the area 107 in the file system 133.
The address conversion table control unit 22 receives, from the access control unit 24, an instruction to associate the logical addresses L3-0 to L4-1 with the physical addresses P2-2 to P3-3. Then, as illustrated in
Furthermore, the access control unit 24 notifies the address conversion table control unit 22 of an instruction to invalidate the association relationship between the physical address 104 and the logical address before a move. In response to the received instruction indicating that the association relationship between the physical address 104 and the logical address before the move is made invalid, as illustrated in
In the following, the use of a bus due to a move of data according to the embodiment will be described with reference to
Update data 301 that is temporarily stored is placed in the nonvolatile memory 3 illustrated in
In this process, because the IO unit 503 only rewrites the address conversion table, a process 601 that reads or writes data between the nonvolatile memory 3 and the IO unit 503 does not occur. Furthermore, a process 602 that reads or writes data between the IO unit 503 and the memory control unit 502 does not also occur. Consequently, no access due to the moving of the data occurs among the CPU 501, the memory control unit 502, and the IO unit 503. Thus, it is possible to reduce the use of a bus 511 performed by the IO unit 503.
In the following, a process performed by the information processing apparatus 100 when the moving of data has occurred will be described with reference to
The arithmetic processing unit 11 moves data stored in the management area in the file system execution unit 131 (Step S1). In this case, the arithmetic processing unit 11 outputs, to the device control unit 2 by using the driver execution unit 132, a command, such as a read and write instruction, a move instruction, a SWAP instruction, or an instruction to rewrite table that is dedicated to the information processing apparatus.
Then, the main control unit 1 waits until the process performed by the device control unit 2 has been completed (Step S2).
Thereafter, after a completion notification is received from the device control unit 2, the file system execution unit 131 updates its own file system in accordance with the change, due to the moving of the data, in the logical address of the data (Step S3).
In response to the command received from the main control unit 1, the access control unit 24 detects the moving of the data from the type of received command, the previous and subsequent relationship of the command, the content of the command, or the like (Step S11). If the access control unit 24 detects the moving of the data, the access control unit 24 requests, from the address conversion table control unit 22, the physical address that stores therein the data to be moved.
Then, the address conversion table control unit 22 receives, from the access control unit 24, a request for the physical address in which the data to be moved is stored. Then, the address conversion table control unit 22 searches the address conversion table for the logical address at the move source of the data (Step S12). The address conversion table control unit 22 sends, to the access control unit 24, the physical address of the data that is to be moved and that is acquired from the address conversion table.
The access control unit 24 acquires, from the address conversion table control unit 22, the physical address of the data to be moved (Step S13).
Then, the access control unit 24 instructs the address conversion table control unit 22 to associate the physical address of the data to be moved with the logical address of the data at the move destination. In response to the instruction received from the access control unit 24, the address conversion table control unit 22 associates the physical address of the data to be moved with the logical address at the move destination in the address conversion table (Step S14).
Furthermore, the access control unit 24 instructs the address conversion table control unit 22 to invalidate the association relationship between the physical address of the data to be moved and the logical address at the move source. In response to the instruction received from the access control unit 24, the address conversion table control unit 22 invalidates the association relationship, in the address conversion table, between the physical address of the data to be moved and the logical address at the move source (Step S15).
Then, the address conversion table control unit 22 sends a completion notification to the arithmetic processing unit 11 via the host IF control unit 21 (Step S16).
In the following, a description will be given by comparing a case in which data is moved by using a conventional technology with a case in which data is moved by using the information processing apparatus 100 according to the embodiment.
A main control unit 71 in an information processing apparatus 700 used in the conventional technology includes the same function as that performed by the main control unit 1 according to the embodiment. An arithmetic processing unit 711 corresponds to the arithmetic processing unit 11 in
When data is moved, similarly to the embodiment, in addition to rewriting an address conversion table, an address conversion table control unit 722 reads and writes data from and to the nonvolatile memory 3.
A nonvolatile memory 73 has the same function as that performed by the nonvolatile memory 3 according to the embodiment.
Furthermore, it is assumed that the hardware configuration of the conventional information processing apparatus has the same hardware configuration as that in the embodiment illustrated in
In the following, a description will be given, with reference to
As illustrated in
Then, in the address conversion table 720, the association relationship between the logical address at the move source and the physical address in the area 112 is made invalid. Furthermore, the logical address of the update data 110 at the move destination is associated with a physical address 113 of the update data 111 that has been moved.
As described above, with the conventional information processing apparatus, an invalid page is created in the nonvolatile memory. However, with the information processing apparatus according to the embodiment, because the moving of data does not occur in a nonvolatile memory when the data is moved, it is possible to reduce the number of invalid pages created in the nonvolatile memory. Consequently, when compared with the conventional information processing apparatus, it is possible to reduce a decrease in the number of free pages to which data can be written.
In the following, a description will be given, with reference to
In this case, as illustrated in
Thereafter, as illustrated in
As described above, with the conventional technology, when an arithmetic processing unit 711 moves update data, the moving of the update data occurs between the IO unit 503 and the main memory 504 and thus an access via the bus 511 occurs. In contrast, with the information processing apparatus 100 according to the embodiment, when the arithmetic processing unit 11 moves update data, as described above, the occurrence of access via the bus 511 can be reduced. Specifically, with the information processing apparatus 100 according to the embodiment, when compared with the conventional technology, it is possible to reduce the number of accesses between the memory control unit 502 and the IO unit 503 via the bus 511 when the move processes 603 and 604 are performed and thus the use of the bus 511 can be reduced.
Furthermore, with the information processing apparatus 100 according to the embodiment, when the arithmetic processing unit 11 moves update data, a process for reading and writing the update data between the IO unit 503 and the nonvolatile memory 3 and a process for invalidating a page are not performed. Specifically, with the information processing apparatus 100 according to the embodiment, when compared with the conventional technology, it is possible to reduce the number of accesses to the nonvolatile memory 3 occurring due to the process for reading and writing update data between the IO unit 503 and the nonvolatile memory 3 and occurring due to the process for invalidating a page. More specifically, with the information processing apparatus 100 according to the embodiment, when compared with the conventional technology, it is possible to improve the performance of accessing the nonvolatile memory 3.
In the following, a case in which data is moved by using another conventional technology will be described with reference to
In this case, as illustrated in
Thereafter, as illustrated in
With the conventional technology that uses a temporary save area in the IO unit 503, when the arithmetic processing unit 711 moves update data, no access via the bus 511 occurs. However, the data move processes 605 and 606 occur between the IO unit 503 and the nonvolatile memory 73 and an invalidating process occurs and thus an access to the nonvolatile memory 73 occurs. In contrast, with the information processing apparatus 100 according to the embodiment, when the arithmetic processing unit 11 moves update data, a process for reading and writing update data does not occur between the IO unit 503 and the nonvolatile memory 3 and, furthermore, an invalidating process is not performed on a page. Specifically, with the information processing apparatus 100 according to the embodiment, when compared with the conventional technology that uses a temporary save area in the IO unit 503, it is possible to reduce the number of accesses to the nonvolatile memory 3. More specifically, with the information processing apparatus 100 according to the embodiment, when compared with the conventional technology that uses a temporary save area in the IO unit 503, it is possible to improve the performance of accessing the nonvolatile memory 3.
In the following, a data move process performed by the conventional technology that temporarily stores update data in the main memory 504 and then moves the data will be described with reference to
The arithmetic processing unit 711 sends, to the file system execution unit 731, an instruction as a notification indicating the reading of data (Step S101). Hereinafter, target data that is to be read is referred to as “read target data”. In this case, the arithmetic processing unit 711 outputs, by using a driver execution unit 732, a read instruction to the device control unit 72. The file system execution unit 731 reads the data from the specified logical address. After sending the instruction as the notification indicating the reading of the data, the arithmetic processing unit 711 waits until the read target data is received from the device control unit 72.
Subsequently, the arithmetic processing unit 711 notifies the file system execution unit 731 of an instruction to write the data (Step S102). Hereinafter, the target data that is to be written is referred to as “write target data”. In this case, the arithmetic processing unit 711 outputs, by using the driver execution unit 732, a write instruction to the device control unit 72. The file system execution unit 731 writes the read data to a logical address that is different from the logical address at the read source. After sending a notification as the instruction to write the data, the main control unit 71 waits until a completion notification is received from the device control unit 72.
Then, after the file system execution unit 731 receives the completion notification from the device control unit 72, the file system execution unit 731 updates, due to the change in the logical address in which the data is stored, the file system that is managed by the file system execution unit 731 (Step S103).
In response to the read instruction received from the main control unit 71, the address conversion table control unit 722 searches the address conversion table for a logical address of the read target data (Step S111).
Then, the address conversion table control unit 722 acquires the physical address in which the read target data is to be stored (Step S112).
Then, the address conversion table control unit 722 reads, from the acquired physical address, the read target data in the nonvolatile memory 73 (Step S113).
Then, the address conversion table control unit 722 sends the read target data to the main control unit 71 (Step S114).
In response to the write instruction received from the main control unit 71, the address conversion table control unit 722 searches the address conversion table for the logical address to which the write target data is to be written (Step S121).
The address conversion table control unit 722 acquires the physical address of the write target data to be stored (Step S122).
Then, the address conversion table control unit 722 determines whether the specified writing of the data is a new writing (Step S123). If it is a new writing (Yes at Step S123), the address conversion table control unit 722 proceeds to Step S126.
In contrast, if already existing data is to be updated (No at Step S123), the address conversion table control unit 722 reads the data from the acquired physical address in the nonvolatile memory 73 (Step S124).
Then, the address conversion table control unit 722 updates the read data to the acquired write target data (Step S125).
Then, the address conversion table control unit 722 extracts, from the address conversion table, the physical address in a free page (Step S126).
Thereafter, the address conversion table control unit 722 writes the write target data to the free page of the extracted physical address in the nonvolatile memory 73 (Step S127).
Furthermore, the address conversion table control unit 722 associates the logical address at the writing destination of the write target data with the physical address to which the write target data has been written and then registers the addresses in the address conversion table (Step S128).
Furthermore, the address conversion table control unit 722 invalidates the page from which data before the update is read (Step S129).
Then, the address conversion table control unit 722 sends a completion notification to the arithmetic processing unit 711 via the host IF control unit 721 (Step S130).
As described above, if the conventional technology is used, when compared with the flow of the process performed by the information processing apparatus 100 according to the embodiment illustrated in
In the following, a data move process performed in the conventional technology in which update data is temporarily stored in a temporary save area in the device control unit 72 will be described with reference to
The arithmetic processing unit 711 notifies the file system execution unit 731 of a move instruction for data in a management area in the file system execution unit 731 (Step S201). In this case, the arithmetic processing unit 711 outputs a move instruction to the device control unit 72 by using the driver execution unit 732.
Then, the main control unit 71 waits until the process performed by the device control unit 72 has been completed (Step S202).
Then, after receiving a completion notification from the device control unit 72, the file system execution unit 731 updates the file system, which is managed by the file system execution unit 731, in accordance with the change in the logical address in which the data is stored due to the moving of the data (Step S203).
In response to the move instruction received from the main control unit 71, the address conversion table control unit 722 searches the address conversion table for a logical address to which the write target data is written (Step S211).
The address conversion table control unit 722 acquires the physical address of the data at the storage destination (Step S212).
Then, the address conversion table control unit 722 reads the data from the acquired physical address in the nonvolatile memory 73 (Step S213).
Then, the address conversion table control unit 722 updates the read data to the acquired data (Step S214).
Then, the address conversion table control unit 722 extracts, from the address conversion table, a physical address in a free page (Step S215).
Then, the address conversion table control unit 722 writes the write target data to the free page of the extracted physical address in the nonvolatile memory 73 (Step S216).
Furthermore, the address conversion table control unit 722 associates the logical address to which the write target data is to be written with the physical address to which the write target data has been written and then registers the addresses in the address conversion table (Step S217).
Furthermore, the address conversion table control unit 722 invalidates the page from which the data before an update is read (Step S218).
Then, the address conversion table control unit 722 sends a completion notification to the arithmetic processing unit 711 via the host IF control unit 721 (Step S219).
As described above, even when the conventional technology that includes a temporary save area is used, when compared with the information processing apparatus 100 according to the embodiment illustrated in
As described above, the information processing apparatus according to the embodiment determines whether data is to be moved on the basis of the type of command, the previous and subsequent relationship of the command, and the content of the command, and then rewrites the association relationship between the logical address and the physical address in the address conversion table. Specifically, with the information processing apparatus according to the embodiment, when data is moved, the moving of the data does not performed inside a nonvolatile memory. Consequently, it is possible to reduce the use of a system bus due to an access performed between the nonvolatile memory and the main memory and thus it is possible to improve the performance of the system.
Furthermore, because the information processing apparatus according to the embodiment moves data by only rewriting the address conversion table, the data can be moved more quickly.
Furthermore, with the information processing apparatus according to the embodiment, a process for reading and writing data from and to a nonvolatile memory can be eliminated; therefore, it is possible to improve the performance of accessing the nonvolatile memory. Furthermore, because the number of accesses to the nonvolatile memory can be reduced, it is possible to prevent the nonvolatile memory from being degraded.
Furthermore, in the above explanation, a description has been given of a case of using the information processing apparatus that has the hardware configuration illustrated in
For example, as in a first modification illustrated in
Furthermore, for example, as in a second modification illustrated in
According to an aspect of an embodiment of the information processing apparatus, the memory control device, the data transfer control method, and the data transfer control program disclosed in the present invention, an advantage is provided in that the performance of the system can be improved.
All examples and conditional language recited herein are intended for pedagogical purposes of aiding the reader in understanding the invention and the concepts contributed by the inventor to further the art, and are not to be construed as limitations to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiment of the present invention has been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2013-081652 | Apr 2013 | JP | national |