Data transfer control apparatus, data transfer control method, and computer product
A data transfer control apparatus includes a transferring unit that transfers data from a transfer source memory to a transfer destination memory, according to an instruction from a first processor; and a first processor configured to detect a process execute by the first processor, determine whether transfer of the data is urgent, based on the type of the detected process, and control the transferring unit or the first processor to transfer the data, based on a determination result.
Latest FUJITSU LIMITED Patents:
- SIGNAL RECEPTION METHOD AND APPARATUS AND SYSTEM
- COMPUTER-READABLE RECORDING MEDIUM STORING SPECIFYING PROGRAM, SPECIFYING METHOD, AND INFORMATION PROCESSING APPARATUS
- COMPUTER-READABLE RECORDING MEDIUM STORING INFORMATION PROCESSING PROGRAM, INFORMATION PROCESSING METHOD, AND INFORMATION PROCESSING APPARATUS
- COMPUTER-READABLE RECORDING MEDIUM STORING INFORMATION PROCESSING PROGRAM, INFORMATION PROCESSING METHOD, AND INFORMATION PROCESSING DEVICE
- Terminal device and transmission power control method
This application is a continuation application of International Application PCT/JP2010/060560, filed on Jun. 22, 2010 and designating the U.S., the entire contents of which are incorporated herein by reference.
FIELDThe embodiments discussed herein are related to a data transfer control apparatus, a data transfer control method, and a computer product that control a data transfer.
BACKGROUNDConventionally, direct memory access (DMA) transfer technologies have been disclosed for high speed data transfer between memories. A direct memory access controller (DMAC) is used as a dedicated controller to execute the DMA transfer. The DMAC has a function of executing data transfer from memory to memory, or from memory to a peripheral device without passing through a CPU.
For example, among various types of multi-core processor systems, in a distributed-memory multi-core processor system having memories respectively corresponding to a core, calculation results obtained by each core are stored to the memory corresponding to the core. After the storage, the multi-core processor system executes a DMA transfer to the memory of a master core, using the DMAC. Alternatively, when a process assigned to a different core uses the calculation results, the multi-core processor system executes a DMA transfer to the memory corresponding to that core.
DMAC control has been disclosed where a CPU transfers small amounts of data or discrete data and the DMAC executes transfers of large amounts of continuous data, whereby, higher data transfer speeds are realized (see, e.g., Japanese Laid-Open Patent Publication No. 2007-58276).
Another technique of DMAC control has been disclosed where distributed shared memories are used to efficiently execute a pipeline process for a data transfer process executed by the DMAC and an image process executed by a CPU, using (see, e.g., Japanese Laid-Open Patent Publication No. 2008-90455).
However, with the techniques according to Japanese Laid-Open Patent Publication Nos. 2007-58276 and 2008-90455, the bus is occupied due to a burst transfer by the DMAC and the CPU stands by until completion of the transfer by the DMAC. Therefore, a problem arises that the throughput of the CPU is degraded. When an interruption process occurs, the CPU tries to read an interruption handler present on a memory. However, the CPU reads the interruption handler after the completion of the DMA transfer executed by the DMAC. Therefore, a problem arises in that responsiveness with respect to real-time processes is degraded.
SUMMARYAccording to an aspect of an embodiment, a data transfer control apparatus includes a transferring unit that transfers data from a transfer source memory to a transfer destination memory, according to an instruction from a first processor; and a first processor configured to detect a process execute by the first processor, determine whether transfer of the data is urgent, based on the type of the detected process, and control the transferring unit or the first processor to transfer the data, based on a determination result.
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.
Preferred embodiments of a data transfer control apparatus, a data transfer control method, and a computer product according to the present invention will be described in detail with reference to the accompanying drawings.
The CPUs #0 and #1 supervise the overall control of the data transfer control apparatus 100. The ROM 101 stores programs such as a boot program. The MEMs #0 and #1 are storage apparatuses such as random access memories (RAMs) that respectively are used as work areas of the CPUs #0 and #1. The DMACs #0 and #1 transfer data between the MEMs #0 and #1. The CPU #0 mainly controls the DMAC #0. The CPU #1 controls the DMAC #1. The data transfer control apparatus 100 according to the embodiment is a computer system that includes a processor having multiple cores. Although the data transfer control apparatus 100 according to the embodiment has the two CPUs, the data transfer control apparatus 100 may have three or more CPUs. A case where the data transfer control apparatus 100 has three or more CPUs will be described in detail with reference to
The keyboard 103 includes keys to input numbers, various kinds of instructions, etc., and is used to input data. The keyboard 103 may be an input pad or a numerical keyboard of a touch-panel type. The display 104 displays data such as documents, images, and functional information in addition to a cursor, an icon, and a tool box. For example, a TFT liquid crystal display can be employed as the display 104.
The I/F 105 is connected to a network 106 such as a local area network (LAN), a wide area network (WAN), or the Internet through a communication line, and is also connected to other devices through the network 106. The I/F 105 manages an internal interface with the network 106 and controls the input and output of data with respect to external devices. For example, a modem or a LAN adaptor can be employed as the I/F 105.
A conventional data transfer control apparatus includes hardware identical to that of the data transfer control apparatus 100 according to the embodiment. However, in a conventional data transfer control apparatus, during data transfer from the MEM #1 to the MEM #0 by the DMAC #0, the CPU #1 can not access the MEM #1 and must wait to access the data.
Functions of the data transfer control apparatus 100 will be described.
The data transfer control apparatus 100 can access a data transfer table 201 storing data transfer schemes that correspond to changes in the states of processes executed in the data transfer control apparatus 100. The data transfer table 201 will be described in detail with reference to
The scheduler 202 is software included in an OS and has a function of determining a process to be assigned to a CPU. For example, the scheduler 202 determines a process to be assigned to a CPU next based on the priority, etc., set for the process. At a predetermined time, the scheduler 202 assigns the process determined by a dispatcher to the CPU. Configuration may be such that the scheduler includes the dispatcher as a function of the scheduler. In the embodiment, the scheduler 202 includes a function of the dispatcher.
Although
The transferring unit 203 has a function of transferring the data to be transferred, from a transfer source memory to a transfer destination memory according to an instruction of the processor. For example, the DMAC #0 transfers streaming data as the data to be transferred, from the MEM #1 that is the transfer source memory to the MEM #0 that is the transfer destination memory according to an instruction by the CPU #0.
The transfer instructing unit 204 has a function of instructing the transferring unit 203 to transfer the data to be transferred. For example, the transfer instructing unit 204 notifies the DMAC #0 of the address of the MEM #1 as the transfer source memory and the address of the MEM #0 as the transfer destination memory, and instructs the DMAC #0 to transfer the data. The content of the instruction, including the addresses of the transfer source memory and the transfer destination memory, and the data size of the data to be transferred, to be may be stored to a storage area such as in a register or a local memory of the CPU that executes the transfer instructing unit 204.
The detecting unit 205 has a function of detecting a process executed by a processor. A “process” is an execution unit of a program. Each application in the embodiment retains therein one process. Each process retains therein one or more threads. The detecting unit 205 may detect a change in the state of a process. The detecting unit 205 may detect that the state of the process changes, for example, from “active” to “inactive” or from “inactive” to “active”. When the state of the process is “active”, the process requires the user to input data into or perform an operation. When the state of the process is “inactive”, the process does not require the user to input data into or perform an operation.
A “change in the state” refers to a case where an event is detected that the process is started up or comes to an end. Changes in the state may also include cases where the state of the process changes to “active” or “inactive” by switching consequent to dispatching. A change in the state may also be a change in the utilization state of data that is to be transferred to the process. For example, in a case where the data to be transferred is a streaming moving image, if a change occurs such as a change in the playback of the moving image from “play” to “pause” or to “rewind and play”, the detecting unit 205 may detect such changes as a change in the state.
For example, the detecting unit 205 detects an application executed by the CPU #0. The detecting unit 205 detects each occurrence of the starting up, ending, and switching of the application. Detection results are stored to a storage area such as a register or local memory of the CPU that executes the detecting unit 205.
The determining unit 206 has a function of determining whether the transfer by the transferring unit 203 is urgent, based on the process type detected by the detecting unit 205. If the detecting unit 205 detects a change in the state of the process, the determining unit 206 may determine the urgency of the transfer of the data, based on the process type and the change in the state. The determining unit 206 may further determine whether storing of the data to be transferred, by the other processor into the transfer source memory is urgent. The other processor: is a processor that stores the data to be transferred, into the transfer source memory; and is a processor different from the processor that detects the process using the detecting unit 205; but may be the same processor as the processor that detects the process.
“Urgency” refers to a time restriction and an “urgent data transfer” refers to a data transfer of a real-time process and having a time restriction. The determining unit 206 may determine that, for a real-time process, a data transfer requires a large amount of processing, has a high priority and thus, is an urgent data transfer; and may determine that a data transfer having a time restriction further has sufficient time until the processing comes to an end and thus, is not urgent. If a setting is made by the user for a data transfer that although is not a real-time process, requires the data to be transferred as soon as possible, the determining unit 206 may determine that the transfer to be urgent.
The playback of a streaming moving image through the network 106 is an example of a transfer of data to that is urgent. If the transfer of data is urgent, storage of the data into the transfer source memory has to be executed before the playback and at a high speed. In the example of a streaming moving image, the data to be transferred has to be transferred at a bit rate that is greater than or equal to that of the streaming moving image and therefore, the data transfer control apparatus 100 has to store the data to be transferred by executing a communication process at a high speed. The data transfer control apparatus 100 has to further transfer the streaming moving image at a high speed to the work area of the CPU that is to playback the streaming moving image.
A communication process through the network 106 is an example where the transfer of the data is not urgent while the storage of the data is urgent. Time-out may occur to the communication process if the process is not completed within a specific time period, and the counterpart terminal of the communication process may cause the communication to come to an end. Therefore, the data transfer control apparatus 100 has to store the data to be transferred at a high speed and perform the communication process also at a high speed.
For example, the determining unit 206 acquires from among the records in the data transfer table 201, a record whose application type and application state of “active” or “inactive” coincide. According to the data transfer scheme described in the record acquired, the determining unit 206 determines whether the transfer of the data is urgent or whether storage of the data into the transfer source memory is urgent.
For example, when “Scheme A” is described in the record acquired, the determining unit 206 determines that the transfer of the data to be transferred is urgent and when “Scheme B” is described in the record acquired, the determining unit 206 determines that the transfer of the data is not urgent. When “Scheme B” is described in the record acquired, the determining unit 206 determines that the storage of the data to be transferred is not urgent and the transfer of the data to be transferred is also not urgent. When “Scheme C” is described in the record acquired, the determining unit 206 determines that the storage of the data is not urgent and the transfer of the data is urgent. Determination results restored to a storage area such as a register or local memory of the CPU that executes the determining unit 206.
The control unit 207 has a function of controlling the transferring unit 203 or the processor to transfer the data to be transferred. The control unit 207 performs this control based on determination results of the determining unit 206. If the determining unit 206 determines that the transfer of the data is urgent, the control unit 207 may control the transferring unit 203 to transfer the data to be transferred.
If the determining unit 206 determines that the storage and the transfer of the data are not urgent, the control unit 207 may control another processor storing data to be transferred, to transfer the data to the transfer source memory. If the determining unit 206 determines that the storage of the data to be transferred is urgent and the transfer of the data is not urgent, the control unit 207 may control the processor detecting the process to transfer the data.
For example, if the data transfer scheme is the “Scheme A”, the control unit 207 controls the DMAC #0 that corresponds to the CPU #0 to transfer the data to be transferred. If the data transfer scheme is the “Scheme B”, the control unit 207 controls the CPU #1 that stores the data to be transferred in the MEM #1 (transfer source memory), to transfer the data. In this case, the CPU #1 does not store the data into the MEM #1 and directly writes the data into the MEM #0 (transfer destination memory).
For example, when the data transfer scheme is the “Scheme C”, the control unit 207 controls the CPU #0 to transfer the data to be transferred, from the MEM #1 (transfer source memory). In this case, after reading the data from the MEM #1, the CPU #0 does not store the data into the MEM #0, but rather stores the data into the register, etc. of the CPU #0 and transfers the data to a program, etc. that directly accesses the data.
For example, in a record 301, the scheduler 202 determines whether an application #0 is started up and becomes “active”, from “active” of an application-#0 attribute. If the scheduler 202 determines that the application #0 becomes “active”, the scheduler 202 sets the data transfer scheme to be the scheme A, from “Scheme A” of a data-#0 attribute.
From the third to the fifth lines of the record 301, the scheduler 202 executes a thread #0 set in the “src” attribute using the CPU #1 set in an “exec” attribute, and sets the write destination of data #0 to be the data to be transferred, to be the MEM #1 set in a “mem” attribute. From the sixth to the eighth lines of the record 301, the scheduler 202 executes a thread #1 set in a “dest” attribute using the CPU #0 and sets the read destination of the data #0 to be the MEM #0.
The scheduler 202 controls the DMAC #0 set in the “transfer” attribute to transfer the data #0 written in the MEM #1 to the MEM #0. The specific example of the data transfer scheme A will be described in detail with reference to
For each of records 302 to 304, the scheduler 202 also executes the setting method similarly to that for the record 301. For example, the scheduler 202 sets the data transfer scheme to be the scheme B based on the record 302 when the application #0 becomes “inactive”.
The scheduler 202 causes the CPU #1 to execute the thread #0 set in the “src” attribute; determines that the write destination of the data #0 (data to be transferred) is the MEM #0, which is same as the read destination; and controls the CPU #1 to directly write thereinto. The scheduler 202 causes the CPU #0 to execute the thread #0 set in the “dest” attribute and controls the CPU #0 to read the data #0 written by the CPU #1. The “transfer” attribute has the CPU #1 set therein that directly writes into the read destination of the “dest” attribute. An example of the data transfer scheme B will be described in detail with reference to
The scheduler 202 sets the data transfer scheme to be the scheme C based on the record 304 when an application #2 becomes “active” or “inactive”. The scheduler 202 executes a thread #4 set in the “src” attribute using the CPU #1 and sets the write destination of the data #2 to be the data to be transferred, to be the MEM #1. The scheduler 202 executes a thread #5 set in the “dest” attribute using the CPU #0 and controls the CPU #0 to directly read the data #2 written by the CPU #1 into the MEM #1. The “transfer” attribute has the CPU #0 set therein that directly reads into the write destination of the “src” attribute. An example of the data transfer scheme C will be described in detail with reference to
After the execution of the application comes to an end, the scheduler 202 resets the settings of the CPUs to the initial values. Thereafter, when the application that changes the data transfer scheme is again started up, the scheduler 202 reads the data transfer table 201 to change the data transfer scheme. The application to which the thread set in the “src” attribute belongs and the application to which the thread set in the “dest” attribute belongs may be the same application or respectively different applications.
For example, the scheduler 202 sets the data transfer scheme to be the scheme A based on the record 402 when the application #0 becomes “active”. The scheduler 202 executes the thread #0 set in the “src” attribute using any one of the CPUs belonging to CPU B set in the “exec” attribute, and sets the write destination of the data to be transferred to be the MEM #1 set in the “mem” attribute.
The scheduler 202 executes the thread #1 set in the “dest” attribute using any one of the CPUs belonging to CPU A, and sets the read destination of the data #0 to be the MEM #0. In the example of
For each of records 403 to 405, the scheduler 202 also executes the setting method similarly to that for the record 301. For example, the scheduler 202 sets the data transfer scheme to be the scheme B based on the record 403 when the application #0 becomes “inactive”. The scheduler 202 executes the thread #0 set in the “src” attribute using any one of the CPUs of CPU B, determines that the write destination of the data #0 (data to be transferred) is the MEM #0, and controls the CPU that executes the thread #0 to write thereinto. The scheduler 202 executes the thread #1 set in the “dest” attribute using any one of the CPUs of CPU A and controls the CPU that executes the thread #1 to read the data #0 written by any one of the CPUs of CPU B. The “transfer” attribute has CPU B set therein that is directly written into the read destination of the “dest” attribute.
Based on the record 301, the scheduler 202 controls the CPU #1 to write the data #0 (data to be transferred) into the MEM #1 that corresponds to the CPU #1 currently executing the tread #0, to execute the communication at a high speed for the thread #0. To read at a high speed the result for the thread #1, the scheduler 202 controls the DMAC #0 to transfer the data #0 from the MEM #1 to the MEM #0. The scheme A is applicable to, for example, streaming playback of a moving image. The data transfer according to the scheme A can transfer at a high speed, the data to be transferred using burst transfer executed by the DMAC. During the transfer of the data, the bus 107 is occupied by the transfer.
In this case, based on the record 302, the scheduler 202 does not have to execute the communication at a high speed for the thread #0 and therefore, controls the CPU #1 to write the data #0 into the MEM #0 that is not the memory dedicated to the CPU #0. The scheduler 202 also controls the CPU #0 to read the data #0 from the MEM #0 into the thread #1. The scheme B is applicable to, for example, a process of downloading a file that is executed in the background.
Based on the record 304, the scheduler 202 controls the CPU #1 to write the data #2 (data to be transferred) into the MEM #1 dedicated to the CPU #1 currently executing the thread #4, to execute the communication at a high speed for the thread #4. The result of the thread #5 does not have to be read at a high speed and therefore, the scheduler 202 prohibits use of the DMAC #0 and controls the CPU #0 to read the data #2. The scheme C is applicable to, for example, reception of electronic mail.
For example, it is assumed that the application #2 is electronic mail software; the thread #4 is a download thread; and the thread #5 is an electronic mail acquisition thread. The CPU #1 receives mail data from the network 106 through the I/F 105 using the download thread and writes the mail data into the MEM #1. The CPU #0 uses the electronic mail acquisition thread to read from the MEM #1.
According to a data transfer scheme acquired by combining the schemes B and C, the data is transferred by the CPU and consequently, the transfer speed of the data is low compared to that of the transfer by the DMAC, but the bus 107 is not occupied. Therefore, drops in throughput caused by the CPU waiting for the transfer can be prevented. When an interruption occurs, the reaction time to execute context switching is shortened, whereby response can be improved.
In the state depicted in
After the writing of the streaming data, the DMAC #0 transfers the streaming data from the MEM #1 to the MEM #0 and the moving image playback thread 801 reads the streaming data from the MEM #0 and displays the moving image on the display 104.
In a case where the streaming data is played back, the moving image cannot be displayed normally if the data is not transferred at a bit rate that is greater than or equal to the bit rate of the streaming data. Therefore, the scheme A capable of transferring the data at a high speed is suitable as the data transfer scheme in this case.
In the state depicted in
At this time, drawing on the display 104 is under execution by the game thread 901 and the moving image playback thread 801 does not draw consequent to being in standby. In this case, the download thread 802 transfers the streaming data to the MEM #0 while the moving image playback application is standing by. When the state of the moving image playback application becomes “active” during this transfer, the moving image playback thread 801 plays back the streaming data accumulated and thereby, can execute smooth moving image playback. The data transfer executed while the moving image playback application is standing by has no time restriction and is not urgent and therefore, the scheme B, which does not cause the bus 107 to become occupied, is suitable.
In the state depicted in
The data transfer control apparatus 100 may switch the transfer scheme based on a state change other than changes between “active” and “inactive”. Such a state change is, for example, a case where a change in the state occurs that the moving image playback application is “active” while the user, etc., changes the moving image playback to pause, or to rewind and play. In this case, the playback can be executed using the streaming data accumulated and therefore, the data does not have to be transferred at a high speed. Therefore, the data transfer control apparatus 100 may set the data transfer scheme to be the scheme B.
Each of the CPUs determines whether a state change has occurred (step S1101). A state change refers to the starting up and ending of an application, and the switching of the application. If a CPU determines that no state change has occurred (step S1101: NO), the CPU again executes the process executed at step S1101. If the CPU determines that a state change has occurred (step S1101: YES), the CPU determines whether the state change is the ending of the execution of an application (step S1102).
If the CPU determines that the state change is the ending of the execution of an application (step S1102: YES), the CPU determines whether an application employing the data transfer scheme C has ended (step S1103). If the CPU determines that an application employing the data transfer scheme C has ended (step S1103: YES), the CPU releases the prohibition of the use of the DMAC that corresponds to the CPU (step S1104) and progresses to the process executed at step S1101. If the CPU determines that an application employing a data transfer scheme other than the data transfer scheme C has ended (step S1103: NO), the CPU progresses to the process executed at step S1101. When the execution of the application has ended, the CPU progresses to the process to be executed when “step S1101: YES” is established, to switch to the application currently executed.
If the CPU determines that the state change is not the ending of the execution of an application (step S1102: NO), the CPU determines whether an unanalyzed application is present (step S1105). If the CPU determines that an unanalyzed application is present (step S1105: YES), the CPU selects an unanalyzed application from among the applications that are currently executed (step S1106). After the selection, the CPU notifies the CPU #0 of information concerning the selected application.
The CPU #0 receives the notification and determines whether the selected application is registered in the data transfer table 201 (step S1107). If the CPU #0 determines that the selected application is registered in the data transfer table 201 (step S1107: YES), the CPU #0 selects the record of the selected application, from the data transfer table 201 (step S1108) and transmits the record to the notification source CPU. If multiple records are registered for the selected application, the CPU #0 may select from among records indicating conditions that coincide with the selected application, a record describing a state that matches the active/inactive state of the selected application.
The CPU receives the record and determines whether the data transfer scheme of the selected application changes consequent to the starting-up of a new application (step S1109). If the CPU determines that the data transfer scheme changes (step S1109: YES), the CPU executes a data transfer scheme setting process (step S1110). The data transfer scheme setting process will be described in detail with reference to
After the execution of the data transfer scheme or if the CPU determines that the data transfer scheme does not change (step S1109: NO), the CPU sets the state of the selected application as “analyzed” (step S1111) and progresses to the process executed at step S1105.
If the CPU #0 determines that the selected application is not registered in the data transfer table 201 (step S1107: NO), the CPU #0 transmits to the notification source CPU, a report indicating that the selected application is not registered. The CPU receives the report indicating that the selected application is not registered and progresses to the process at step S1111.
If the CPU determines that no unanalyzed application is present (step S1105: NO), the CPU requests the CPU #0 to determine whether the state change is the starting-up of a new application (step S1112). If the CPU #0 determines that the state change is the starting-up of a new application (step S1112: YES), the CPU #0 determines whether the new application is registered in the data transfer table 201 (step S1113). If plural records of the selected application are present, the CPU #0 may select from among records indicating conditions that coincide with the selected application, a record describing a state that matches the active/inactive state of the selected application.
If the CPU #0 determines that the new application is registered in the data transfer table 201 (step S1113: YES), the CPU #0 selects the record of the new application from the data transfer table 201 (step S1114). After selecting the record, the CPU #0 executes the data transfer scheme setting process (step S1115). The data transfer scheme setting process will be described in detail with reference to
After the execution of the data transfer scheme setting process comes to an end, the CPU #0 dispatches the new application using the scheduler 202 (step S1116). If the CPU #0 determines that the new application is not registered in the data transfer table 201 (step S1113: NO), the CPU #0 progresses to the process at step S1116. If the CPU #0 determines that the state change is not the starting-up of a new application (step S1112: NO), the CPU #0 executes normal scheduling using the scheduler 202 (step S1117). An application that is not registered in the data transfer table 201 may be, for example, an application downloaded by the user.
After the execution of the process at step S1116 comes to an end or after the process at step S1117 comes to an end, the CPU #0 progresses to the process executed at step S1101. For example, after progressing to the process, the CPU #0 instructs each of the CPUs to determine whether a state change has occurred.
The CPU #0 determines the data transfer scheme from the selected record (step S1201). If the data transfer scheme of the selected record is the scheme A (step S1201: SCHEME A), the CPU #0 determines that the transfer of the data to be transferred is urgent and therefore, the CPU #0 makes a setting of the DMAC (step S1202) and causes the data transfer scheme setting process to come to an end. If the data transfer scheme is dispatched from an application employing the scheme C to an application employing the scheme A, the CPU #0 releases the prohibition of the use of the DMAC #0 and makes a setting of the DMAC.
If the data transfer scheme of the selected record is the scheme B (step S1201: SCHEME B), the CPU #0 determines that the storage and the transfer of the data are not urgent and therefore, the CPU #0 makes a setting of a transfer destination address (step S1203) and causes the data transfer scheme setting process to come to an end. For example, the CPU #0 sets the transfer destination address in the CPU that stores the data to the transfer source memory. For example, in the case of
If the data transfer scheme of the selected record is the scheme C (step S1201: SCHEME C), the CPU #0 determines that the storage of the data to be transferred is urgent and the transfer thereof is not urgent and therefore, the CPU #0 makes a setting of prohibition of use of the DMAC (step S1204). After the setting, the CPU #0 causes the data transfer scheme setting process to come to an end. For example, the CPU #0 sets the prohibition of use of the DMAC #0 that corresponds to the CPU #0.
In
When the burst transfer is prohibited and the data is transferred using the single transfer, the DMAC does not occupy the bus and therefore, the data transfer control apparatus 100 can maintain the throughput without drops caused by the CPU waiting for data transfer. Even when an interruption occurs, the data transfer control apparatus 100 can shorten the response time to execute context switching and thereby, can improve responsiveness.
Although the data transfer control apparatus 100 according to the embodiment employs the multi-core form, the data transfer control apparatus 100 may employ a single-core form. For example, a state is assumed where, for the application #0 described with reference to
In this case, if the state of the application #0 is “active”, the scheme A may be employed as the data transfer scheme and the DMAC may transfer the data from the work area of the thread #1 to the work area of the thread #0. If the state of the application #0 is “inactive”, the scheme B may be employed as the data transfer scheme and the thread #1 may directly write the data to be transferred into the work area of the thread #0.
Even if the scheme C is employed as the data transfer scheme executed by the single core, the example of the application #2 described with reference to
As described, according to the data transfer control apparatus, the data transfer control method, and the data transfer control program, it is determined whether the data transfer is urgent, based on the type of the application currently executed and if it is determined that the data transfer is not urgent, use of the DMAC is prohibited. Thereby, the data transfer control apparatus can reduce frequent DMA transfers, whereby drops in throughput caused by the processor having to wait for the data transfer, can be prevented. The data transfer control apparatus can reduce the frequency DMA transfers and therefore, the response time for an interrupt process requiring context switching can be shortened and the response to a real-time process can be improved.
The data transfer control apparatus may determine whether the data transfer is urgent based on the type of the application and state changes. Thus, the data transfer control apparatus can prevent drops in throughput caused by the processor having to wait for the data transfer and can improve the response to a real-time process. The data transfer control apparatus makes determinations based on state changes of the application and thus, can change the data transfer scheme more dynamically than by determinations based on the type of the application. Consequently, the data transfer control apparatus can further increase the states where drops in throughput can be prevented and the response to a real-time process can be improved.
The data transfer control apparatus may determine whether the data transfer is urgent, based on the type of the application and state changes when the state of the application is changed from “active” to “inactive” or from “inactive” to “active”. Thereby, the data transfer control apparatus can prevent drops in throughput caused by the processor for the transfer and can improve the response property having to wait for a real-time process.
When the data transfer control apparatus is implemented by a mobile terminal, the display area of the display employed by the mobile terminal is small and for example, a quarter video graphics array (QVGA) may be employed that includes 320×240 pixels. For such a display having a small display area, an application becoming “inactive” is highly likely to be entirely hidden by an application that becomes “active”. The application entirely hidden is invisible from the user and therefore, the user may suffer no inconvenience even if the data transfer is slowed down. In this case, instead of reducing the transfer speed of the data, the data transfer control apparatus can prevent drops in throughput of the processor and can facilitate improvement of responses in real-time.
The data transfer control apparatus may transfer data by using the DMAC when it is determined that the transfer of the data is urgent. Thereby, the data transfer control apparatus can transfer the data at a high speed only when the transfer is urgent. For example, when the application becomes “active” and the urgency is enhanced, the data transfer control apparatus can transfer the data at a high speed using the DMAC.
The data transfer control apparatus determines whether the storage of the data by another processor into the transfer source memory is urgent and if the data transfer control apparatus determines that the storage and the transfer of the data to be stored are not urgent, the data transfer control apparatus may cause the other processor to transfer the data. Thus, when the storage and the transfer are not urgent, the data transfer control apparatus can prevent drops in the throughput of the processor and can facilitate improvement of responses in real-time.
If it is determined that the storage of the data to be transferred is urgent and the transfer of the data is not urgent, the data transfer control apparatus may cause the processor detecting the process to transfer the data. Thus, the data transfer control apparatus can prevent drop in the throughput of the processor and can facilitate improvement of responses in real-time response property, while executing the storage of the data at a high speed.
The data transfer control method described in the present embodiment may be implemented by executing a prepared program on a computer such as a personal computer and a workstation. The program is stored on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, read out from the computer-readable medium, and executed by the computer. The program may be distributed through a network such as the Internet.
According to the data transfer control apparatus, the data transfer control method, and the data transfer control program, drops in throughput caused by the CPU standing by while waiting for transfers can be prevented and the response to real-time processes can be improved.
All examples and conditional language provided 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 one or more embodiments of the present invention have 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.
Claims
1. A data transfer control apparatus comprising:
- a transferring unit configured to transfer data from a transfer source memory to a transfer destination memory, according to an instruction from a first processor; and
- a first processor configured to:
- detect a process being executed by the first processor,
- determine whether transfer of the data is urgent, based on the type of the detected process, and
- control the transferring unit to transfer the data or control the first processor to read the data from the transfer source memory or the transfer destination memory, based on a determination result, wherein the first processor further detects that a state of the process changes from an active state to an inactive state or from the inactive state to the active state, and the first processor determines whether the transfer of the data is urgent, based on the type of the process and a detection result concerning the state of the process.
2. The data transfer control apparatus according to claim 1, wherein
- the first processor further detects a state change of the first processor, and
- the first processor determines whether the transfer of the data is urgent, based on the type of the process and a state change of the process.
3. The data transfer control apparatus according to claim 1, wherein
- the first processor upon determining that the transfer is urgent, controls the transferring unit such that the data is transferred.
4. The data transfer control apparatus according to claim 1, wherein
- the first processor determines whether storage of the data into the transfer source memory by a second processor is urgent, and
- the first processor upon determining that the storage and the transfer of the data are not urgent, controls the second processor to transfer the data to the transfer destination memory.
5. The data transfer control apparatus according to claim 1, wherein
- the first processor further determines whether storage of the data into the transfer source memory by a second processor is urgent, and
- the first processor upon determining that the storage of the data is urgent and the transfer of the data is not urgent, controls the first processor to transfer the data.
6. A data transfer control method executed by a processor for controlling a transferring apparatus that transfers data from a transfer source memory to a transfer destination memory, the data transfer control method comprising:
- detecting a process executed by the processor;
- determining whether transfer of the data by the transferring apparatus is urgent, based on the type of the detected process;
- instructing the transferring apparatus to transfer the data, when the transfer is determined to be urgent; and
- reading the data from the transfer source memory or the transfer destination memory by the processor when the transfer is determined to not be urgent, wherein the first processor further detects that a state of the process changes from an active state to an inactive state or from the inactive state to the active state, and the first processor determines whether the transfer of the data is urgent, based on the type of the process and a detection result concerning the state of the process.
7. A multi processors system comprising:
- a plurality of cores,
- a plurality of memories configured to store processed data processed by the plurality of cores, respectively, and
- a transferring apparatus configured to conduct data transferring processes between the plurality of memories
- wherein, one of the plurality of cores
- sets priority of the data transferring processes between the memories, the data transferring processes being processed by the transferring apparatus based on type of the processes processed by the plurality of cores and
- changes, based on the priority, between a writing process of the processed data from the plurality of cores to the plurality of memories and the data transferring process by the transferring apparatus, wherein the first processor further detects that a state of the process changes from an active state to an inactive state or from the inactive state to the active state, and the first processor determines whether the transfer of the data is urgent, based on the type of the process and a detection result concerning the state of the process.
8. A method for controlling a multi processors system that includes a plurality of cores and a plurality of memories configured to store processed data processed by the plurality of cores, respectively, the method comprising:
- sets priority of data transferring processes between the plurality of memories, to be processed by the transferring apparatus based on type of the processes processed by the plurality of cores, and
- changes, based on the priority, between a writing process of the processed data from the plurality of cores to the plurality of memories and the data transferring processes, wherein the first processor further detects that a state of the process changes from an active state to an inactive state or from the inactive state to the active state, and the first processor determines whether the transfer of the data is urgent, based on the type of the process and a detection result concerning the state of the process.
6148381 | November 14, 2000 | Jotwani |
7360035 | April 15, 2008 | Jenkins et al. |
7487503 | February 3, 2009 | Accapadi et al. |
20050120151 | June 2, 2005 | Furukawa et al. |
20060224785 | October 5, 2006 | Nakashima et al. |
20060230404 | October 12, 2006 | Sato et al. |
20070074219 | March 29, 2007 | Ginsberg |
20070162658 | July 12, 2007 | Furukawa et al. |
20070226739 | September 27, 2007 | Dodge et al. |
20080109576 | May 8, 2008 | Furukawa et al. |
20090259789 | October 15, 2009 | Kato et al. |
1-305461 | December 1989 | JP |
11-237960 | August 1999 | JP |
2002-217920 | August 2002 | JP |
2005-165439 | June 2005 | JP |
2006-285341 | October 2006 | JP |
2007-58276 | March 2007 | JP |
2008-90455 | April 2008 | JP |
- International Preliminary Report on Patentability mailed Jan. 24, 2013, issued in corresponding PCT Patent Application No. PCT/JP2010/060560.
- “Fully Using DMC”, Retrieved on May 6, 2010, http://jp.fujitsu.com/microelectronics/products/micom/support/knowhow/fr-hard05.html , © 1994.
- International Search Report of PCT/JP2010/060560 mailed Sep. 21, 2010.
- Chinese Office Action for corresponding Chinese Patent Application No. 201080067574.0, issued Dec. 3, 2014, 21 pages.
- U.S. Office Action mailed Apr. 27, 2015 in related U.S. Appl. No. 14/630,235.
Type: Grant
Filed: Dec 18, 2012
Date of Patent: Jun 30, 2015
Patent Publication Number: 20130111078
Assignee: FUJITSU LIMITED (Kawasaki)
Inventors: Hiromasa Yamauchi (Kawasaki), Koichiro Yamashita (Hachioji), Takahisa Suzuki (Kawasaki), Koji Kurihara (Kawasaki)
Primary Examiner: Elias Mamo
Application Number: 13/718,302
International Classification: G06F 13/28 (20060101);