Storage control system and storage control method

The data storage control system addresses cache hit misses by pre-loading priority application data into cache memory using LRU counters and cache maintenance applications, ensuring rapid execution during emergency scenarios.

JP7590852B2Active Publication Date: 2024-11-27HITACHI LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2020189185
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-11-13
Publication Date
2024-11-27
Estimated Expiration
2040-11-13

AI Technical Summary

Technical Problem

Existing systems face challenges in maintaining cache memory for priority application programs, leading to cache hit misses and delays during emergency control scenarios, as dummy execution cannot cover all branches and addresses, especially in situations where actual conditions differ from programmed rules.

Method used

A data storage control system that includes a first controller executing priority applications and a second controller maintaining necessary data in cache memory accessible by the priority application before execution, using cache management techniques like LRU counters and cache maintenance applications to ensure data availability.

Benefits of technology

This approach effectively suppresses cache hit misses, ensuring priority applications execute at high speed by pre-loading necessary data into cache memory, thereby preventing delays during emergency operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007590852000001
    Figure 0007590852000001
  • Figure 0007590852000002
    Figure 0007590852000002
  • Figure 0007590852000003
    Figure 0007590852000003
Patent Text Reader

Abstract

To provide a control technique for achieving high speed of a priority application by suppressing cache hit miss during operation of the priority application regardless of an operation timing of the priority application.MEANS FOR SOLVING THE PROBLEM: A first controller executes at least one priority application that is prioritized over other applications under predetermined conditions. A second controller causes a cache memory to which the priority application can access to keep data necessary for execution of the priority application prior to execution of the priority application.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a storage control system and a storage control method, and more particularly to a storage control system and a storage control method for executing a prioritized application program at high speed by suppressing cache misses of the prioritized application program that is executed with priority over other application programs. [Background technology]

[0002] In recent years, in the development of embedded systems that support industrial electronic control devices, the load on embedded system software, programs, and application programs has been increasing due to factors such as the need to improve the control performance of the systems, compliance with increasingly strict environmental regulations, and the need to add new control calculation processes to accompany the autonomous control of the systems.

[0003] For example, in many cases, in autonomous control, rules are set based on the situation in which the embedded system is active, and the normal operation of the device is programmed on the assumption that the object to be controlled (e.g., a vehicle) will operate according to these rules. When a situation occurs that deviates from these rules, emergency control of the object is required to deal with the situation.

[0004] However, application programs that are not involved in emergency control consume cache memory, which may result in cache misses for priority application programs that are essential for emergency control, making it impossible to speed up the priority application programs and ultimately making it impossible to handle emergency control.

[0005] Japanese Patent Laid-Open No. 2007-200277 (Patent Document 1) discloses a microcomputer that dummy executes a high priority process while the CPU is performing idle processing, placing the high priority process program in an instruction cache memory, and then, when the high priority process is executed at the regular timing, the hit rate is high because the high priority process program has already been placed in the instruction cache memory, thereby shortening the execution time of the high priority process. [Prior art documents] [Patent documents]

[0006] [Patent Document 1] JP 2007-200277 A Summary of the Invention [Problem to be solved by the invention]

[0007] In order to realize high-speed system, not only the priority application program but also the data must be maintained in the cache memory, but the latter is not taken into consideration in the above-mentioned Patent Document 1. For example, even if a priority application program for collision avoidance in an automatic driving of a car is dummy executed before the normal timing, the situation differs from the actual situation during emergency control, such as no obstacles to be avoided in the vicinity, and the input information is also different from the actual information, so that the instructions and data required for emergency control cannot be maintained in the cache memory. In the first place, all the branches and addresses of the priority application program cannot be covered by dummy execution.

[0008] The present invention aims to provide a storage control technology that suppresses cache misses during operation of a priority application program, regardless of the operation timing of the priority application program, thereby achieving faster operation of the priority application program. [Means for solving the problem]

[0009] In order to achieve the above-mentioned object, the present invention provides a data storage control system comprising a plurality of controllers, a first controller among the plurality of controllers executes at least one priority application program that is prioritized over other application programs under a specified condition, and a second controller among the plurality of controllers that is a controller other than the first controller maintains data required for execution of the priority application program in a cache memory accessible by the priority application program prior to execution of the priority application program. Effect of the Invention

[0010] According to the present invention, cache misses during the operation of a priority application program are suppressed regardless of the operation timing of the priority application program, thereby achieving high speed execution of the priority application program. [Brief description of the drawings]

[0011] [Figure 1] 1 is a hardware block diagram of a control system according to a first embodiment of the present invention. [Diagram 2] 13 is a table for explaining a cache management method using an LRU counter. [Diagram 3] 2 is a functional block diagram of the control system of FIG. 1. [Figure 4] 13 shows an example of a management table as core placement management information. [Diagram 5] 1 is an example of a management table as management information of data to be maintained. [Figure 6] 10 is a flowchart illustrating an example of the operation of a cache maintenance application program. [Figure 7] 2 is a block diagram showing a first manner of maintaining data in a cache memory. FIG. [Figure 8]FIG. 11 is a block diagram showing a second manner of maintaining data in a cache memory. [Figure 9] 11 is a timing chart of a plurality of application programs. [Figure 10] FIG. 11 is a functional block diagram of a control system according to a second embodiment. [Figure 11] 13 is a maintenance target management table according to the second embodiment. [Figure 12] 13 is a maintenance target management table according to the third embodiment. [Figure 13] 13 is a flowchart illustrating the operation of a cache maintenance application program according to the third embodiment. [Figure 14] 13 is a time chart showing the transition of an application program in which target data is maintained in a cache memory in the third embodiment. [Figure 15] FIG. 13 is a functional block diagram of a control system according to a fourth embodiment. [Figure 16] 13 shows an example of maintenance target management information according to the fourth embodiment. [Figure 17] 13 is a flowchart showing the operation of a cache maintenance application program in the fourth embodiment. [Figure 18] This is a hardware block diagram of a control system showing an example in which the L1 cache is configured outside the core and within the CPU, similar to the L2 cache. [Figure 19] FIG. 11 is a hardware block diagram of a control system showing an example in which both the L1 cache and the L2 cache are configured within each core of a multi-core processor. [Figure 20] FIG. 2 is a hardware block diagram of a control system illustrating an example in which an L3 cache is added within the CPU outside each core in addition to the L1 and L2 caches of FIG. 1. [Figure 21] FIG. 20 is a hardware block diagram of the control system showing an example in which an L3 cache is added in the CPU outside each core of the control system of FIG. 19. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] The present invention relates to a control system and a control method for controlling the storage of information necessary for executing software, such as data, parameters, and commands, for example, a control system that controls the storage of information necessary for driving a controlled object such as an automobile, a train, an aircraft, a robot, a communication device, a network device, or building facilities. The control system constitutes an entire system together with the controlled object. The control system is a microcomputer, a personal computer, or a server. Note that information necessary for executing software, such as data, parameters, and commands, are collectively referred to as "data" and are described in the claims and in the embodiments.

[0013] An embodiment of the control system will be described with reference to the drawings. FIG. 1 shows a hardware block diagram of a control system (control device) 101 equipped with a multi-core processor. The control system 101 includes a CPU 102, a main memory 103, and a peripheral device 104. The CPU 102 is equipped with N cores 105-107 each of which executes an application program (task), and each core is provided with an L1 cache 108-110. The core is an example of a controller described in the claims. The main memory and the cache memory are each storage resources. In the following embodiments and claims, an application program will be abbreviated to application. Data in the main memory is read from a non-portable storage medium such as a HDD or a flash memory drive and set.

[0014] Apart from each core, an L2 cache 111 exists in the CPU 102. The L1 caches 108-110 and the L2 cache 111 constitute a cache memory. The L1 caches 108-110 and the L2 cache 111 temporarily hold instructions and data stored in the main memory 103, respectively. The L1 caches 108-110 can complete writing and reading in a shorter time than the L2 cache 111. The L2 cache 111 is located between the L1 caches 108-110 and the main memory 103 and has a function of connecting the two. The arrangement of the L1 caches 108-110 and the L2 cache 111 is not limited to the example in FIG. 1, and other forms may be used, such as a form in which the L1 caches 108-110 are collectively managed by all the cores, or the L2 cache 111 is managed by each core. Other forms will be described later.

[0015] The control system 101 communicates with the outside via the peripheral device 104. For example, as a control unit of an automobile, the control system 101 obtains image data from a camera and detection data from an ultrasonic sensor, a radar sensor, a speed sensor, an acceleration sensor, etc. via the peripheral device 104, and transmits a control signal to an operating system (such as a brake device, a steering device, a suspension device, etc.) of the controlled object so as to execute emergency control (such as collision avoidance) for the automobile as the controlled object. Note that, since commands stored in the main memory or cache memory can also be treated as a sequence of 0 / 1, as described above, in addition to "data" in the narrow sense, programs and commands are also included in "data" in the broad sense.

[0016] The L1 caches 108 to 110 and the L2 cache 111 store at least a portion of the data stored in the main memory 103. If the required data is not present in the L1 cache, the core reads data from the L2 cache, and if the data is not present in the L2 cache either, it reads data from the main memory 103. The core replaces the data in the L1 cache with the read data. A method commonly used for this replacement is LRU (Least Recently Used). This is a management method in which an LRU counter is provided for each piece of data stored in the cache memory, and the order in which the data was last accessed is managed, so that frequently accessed data is preferentially left in the cache memory.

[0017] An overview of a cache memory management method using an LRU counter is shown in Figure 2. As an example of a management method, Figure 2 shows the full set associative method, which is one of the cache memory implementation methods. In this method, data in the cache memory is managed by TAG instead of address information. An application refers to the data at the location where the TAG is hit. For example, when an application reads data, it accesses the L1 cache 108 of the core 1 (105) that executes the application, and uses the data if it exists. The application sets the LRU counter of the accessed data to 0, and increments the LRU counters of other data by 1. Note that LRU counters with values ​​greater than the accessed data are not incremented.

[0018] If the target data does not exist in the L1 cache 108, the application accesses the L2 cache 111, and uses the data if it exists. The application deletes the data with the largest LRU counter from among the data stored in the L1 cache 108, stores the data read from the L2 cache 111 in the L1 cache 108, sets the LRU counter of the data to 0, and increments the LRU counters of the other data by 1.

[0019] When the number of data stored in the cache memory exceeds the number of lines in the cache memory, the core deletes the data from the cache memory. The data deleted from the L1 cache 108 is stored in the L2 cache 111.

[0020] If the required data is not present in the L2 cache 111, the application accesses the main memory 103 to obtain the desired data. At this time, the application deletes the data with the largest LRU counter value among the data stored in the L1 cache 108, stores the data read from the main memory 103, sets the LRU counter of the data to 0, and increments the LRU counters of the other data by 1.

[0021] Furthermore, the core deletes the data with the largest LRU counter value among the data stored in the L2 cache 111, stores the data read from the main memory 103 in the L2 cache 111, sets the LRU counter value of that data to 0, and increments the LRU counter values ​​of the other data by 1.

[0022] The application stores the data deleted from the L2 cache 111 in the main memory 103. The application deletes the data with the largest LRU counter among the data stored in the L2 cache 111, stores the data read from the main memory 103, sets the LRU counter of the data to 0, and increments the values ​​of the LRU counters of the other data by 1.

[0023] If the access is a write, the application stores the write data in the L1 cache 108. At that time, if the data exists in the L1 cache 108, the application sets the LRU counter of the data to "0" and increments the LRU counters of other data by 1. Although the value of the LRU counter is larger than that of the accessed data, no increment is executed.

[0024] If the write data is not present in the L1 cache 108, the application deletes the data with the largest LRU counter, then stores the write data, sets its LRU counter to "0", and increments the LRU counters of the other data by 1. Data deleted from the cache memory is handled in the same way as when data is read, as described above.

[0025] As mentioned above, write data is managed by a method called write-back, but this does not deny the application of a write-through method in which data is written not only to the L1 cache 108 but also to the L2 cache 111 and main memory 103 every time data is written.

[0026] There are set associative methods, in which the cache memory is divided into blocks and the LRU is managed for each block, and full set associative methods, in which the cache memory is not divided. The basic operation of the LRU counter is the same for both. The control system in Figure 1 can adopt any of the full set associative method, the set associative method, and the direct map method.

[0027] In addition to LRU, methods for managing data replacement in cache memory include round robin and random, but are not limited to any of these. The line size of a cache memory is usually 32 to 64 bytes, and the size is not limited.

[0028] When data required by an application is not present in the L1 caches 108-110 and the L2 cache 111 and there is a large amount of data that must be accessed from the main memory 103 by the application, a significant delay occurs in the execution of the application. Therefore, it is preferable that data required by an application that must be processed quickly in an emergency (priority application) is maintained as much as possible in the L1 caches 108-110 and / or the L2 cache 111. This will be explained based on Fig. 3, which is a functional block diagram of the control system.

[0029] 3 shows the software configuration inside the CPU 102 and a part of the data structure in the main memory 103. The CPU 102 runs a mixture of priority applications 301, which should be executed with priority when necessary, for example, in an emergency, and other applications (normal applications) 302, in the core 1 (105). A priority application is, for example, an application with a relatively high priority, and a normal application is an application with a relatively low to medium priority. The priority application 301 may be called a high priority application, and the normal application 302 may be called a low priority application.

[0030] Furthermore, the CPU 102 operates a scheduling module 303 in one or more cores other than the core 1 (105). Fig. 3 shows that the scheduling module 303 is executed in the core 2 (106). The scheduling module 303 controls the timing of starting and suspending the operation of each of a plurality of applications. In other words, the scheduling module 303 controls the timing of operation of the priority application 301, the normal application 302, and the cache maintenance application 304 (described later) of the core 1.

[0031] The scheduling module 303, under a predetermined condition, for example, in an emergency, causes the core 1 to suspend the normal application 302 even when the normal application 302 is running, and executes the priority application 301 with priority. The scheduling module 303 can know the implementation form of the application for each core based on the core allocation management information 309 described later. Note that the "module" means a function executed by software. The "module" may be replaced with other terms such as "means", "function", "element", "circuit", or "part". The module may be realized by hardware or by cooperation between software and hardware. The application to be allocated to which core may be set or changed as appropriate according to the load of the core.

[0032] Based on the core allocation management information 309, the scheduling module 303 runs the cache maintenance application 304 on a core (core 2) other than the core 1 on which the priority application 301 and the normal application 302 are running. FIG. 4 shows a management table as the core allocation management information 309. The core allocation management information 309 specifies the relationship between the type of application and the core that executes the application. The core allocation management information 309 is stored in the main memory 103 of the control system 101. The core allocation management information 309 may be registered in the main memory 103 by an administrator of the control system 101.

[0033] The cache maintenance application 304 maintains, stores, registers, memorizes, holds, retains, or sets in advance data required by the priority application 301 (maintenance target data) in the cache memory based on the maintenance target management information 308 so that the priority application 301 does not experience a cache hit miss in an emergency, causing an operational delay. This operation of the cache maintenance application 304 is referred to as “cache maintenance.” The maintenance target management information 308 is recorded in the main memory 103.

[0034] 3, the cache maintenance application 304 includes a data access module 306 and a maintenance target management module 307. The maintenance target management module 307 references maintenance target management information 308 in the main memory 103, passes the reference information to the data access module 306, and the data access module 306 accesses the cache memory and stores the maintenance target data in the cache memory. The cache memory in which the data is stored may be at least one of the L1 cache 108, the L2 cache 111, and the L1 cache 108. In short, it may be any cache memory that can be accessed by the priority application 301.

[0035] The cache maintenance application 304 may be continuously executed, for example, by a timer interrupt process. Although the cache maintenance application 304 is not prevented from being executed while the priority application 301 is running, the scheduling module 303 may suspend the cache maintenance application 304 while the priority application 301 is running to prevent conflicts caused by simultaneous access to the same data, which may cause delays in the operation of the priority application.

[0036] In the core 2, the scheduling module 303 gives priority to running the cache maintenance application 304. The scheduling module 303 can run other applications 305 while the cache maintenance application 304 is not running. The scheduling module 303 may always operate the cache maintenance application 304 with high priority. Furthermore, the scheduling module 303 may run the cache maintenance application 304 during a spare time when the other applications 305 are not running, and further, the scheduling module 303 may run the cache maintenance application 304 periodically.

[0037] 5 shows an example of a management table as management information for data to be maintained (maintenance target management information 308). In the management table, a target number (entry), a main memory address where the data is stored, and a variable type of the data are recorded. By using this management information, the data access module 306 can identify the data to be maintained.

[0038] Since the data required by the priority application 301 is known in advance, the maintenance target management module 307 can set (register) the maintenance target data in advance in the main memory 103 as maintenance target management information 308 and update this. The data access module 306 accesses the main memory 103 based on the maintenance target management information 308, retrieves the data, and records the data in the cache memory.

[0039] A detailed description will be given of the cache maintenance application 304. Fig. 6 is a flowchart illustrating an example of the operation of the cache maintenance application 304. The cache maintenance application 304 executes a maintenance target management module 307 to determine a maintenance target, and then causes the data access module 306 to perform cache maintenance.

[0040] The maintenance target management module 307 holds a selection number for selecting a maintenance target as a variable, and sets this to 0 after the flowchart starts (S401). Thereafter, the maintenance target management module 307 refers to a portion where the selection number matches the target number in the maintenance target management table (maintenance target management information 308), and acquires the address and data type information of the target (S402).

[0041] Based on the acquired information, the data access module 306 specifies the target data type and address and performs data access (S403). The data access module 306 stores data from the main memory 103 to the L1 cache or the L2 cache by the data access, and updates the LRU counters of these cache memories so that the target data is maintained in the cache memories so that the data required by the priority application 301 is not deleted from the cache memories when the priority application 301 is executed. Next, the maintenance target management module 307 increments the selection number by 1 (S404).

[0042] When the value of the selection number reaches the same number as the number of cache maintenance targets, that is, when the data access module 306 has finished accessing all the maintenance targets (S405: Yes), the data access module 306 sets the selection number to 0. If the value of the selection number does not reach the number of cache maintenance targets (S405: No), step S407 checks whether the end sequence is entered, and if this is affirmative, the flowchart ends (S407: Yes). If step S407 judges No, the process returns to step S402 (S407: No). According to the flowchart in FIG. 4, all the maintenance target data registered in the management table 308 is set in the cache memory, and it is possible to prevent a cache hit miss from occurring even if the priority application 301 suddenly operates.

[0043] The management of the end of a flowchart is not particularly limited to a management method using a flag, a mechanism in which the maintenance target management module 307 receives a signal such as a kill signal or pthread_cancel and calls a cancel handler, etc. Also, the data size instead of the data type may be registered in the maintenance target management information 308, and the data access module 306 may execute data read and write by specifying the size regardless of the variable type such as memcopy.

[0044] The above-mentioned data access (FIG. 6: S403) will be explained in detail. The data access of the data access module 306 includes reading and writing. Data reading is realized by referencing with an if statement or copying to the zero register, etc. Although it depends on the programming language, there is a load command etc. when an assembly can be directly specified.

[0045] In addition, for example, the prefetch command implemented in ARM CPUs can achieve the same effect as reading. The line size of cache memory is usually 32 to 64 bytes, and it is not necessary to access all the data stored in the cache memory line, but by accessing one piece of data per line, it is possible to maintain the cache of the data stored in the same line.

[0046] Data writing is realized by writing the same data to the target itself, for example in the form of target_data = target_data + 0;. If the assembly can be specified directly, it may be realized by the store command.

[0047] Maintaining data in the cache memory based on data access (S403) includes registering the data to be maintained in the L1 cache 109 and / or the L2 cache 111. For example, in Fig. 7, the data access module 306 updates an LRU counter if the data to be maintained exists in the L1 cache 109, and if the data does not exist in the L1 cache 109 but exists in the L2 cache 111, reads the data from the L2 cache, updates the LRU counter, and stores the data. If the data does not exist in the L2 cache 111 either, the data access module 306 reads the data from the main memory 103, updates the LRU counter, and stores the data in the L2 cache 111 (S1).

[0048] As a result, it is possible to create a state in which data required by the priority application 301 is maintained at least in the L2 cache 111 before the priority application 301 operates. Note that although the L2 cache 111 requires more time to access than the L1 cache 109, it can be said that the load on the cache maintenance application 304 is smaller.

[0049] Also, as shown in FIG. 8, the data access module 306 can store the data to be persisted in the L1 cache 109 by reading the data to be persisted from the main memory 103 and writing the data to the same address in the L1 cache 109 (S2).

[0050] Meanwhile, a predetermined application in core 1 can read the data to be maintained from the L1 cache 109 in core 2 based on the snoop function and maintain the data in the L1 cache 108 (S3). Although the load on the cache maintenance application 304 increases due to the snoop function, the priority application 301 can access the data to be maintained in the L1 cache 108 of its own core 1 (105), improving real-time performance when the priority application 301 is executed. Since it may be difficult to maintain the target data in the L2 cache 111 depending on the cache implementation method and application configuration, it is desirable to store the data to be maintained in the L1 cache 109.

[0051] Fig. 9 shows a comparison result in a timing chart between the mode in which core 2 is executing cache maintenance application 304 (Fig. 3) and a conventional mode in which cache application 304 is not added. The upper part of Fig. 9 shows the latter chart, and the lower part of Fig. 9 shows the former chart. The vertical axis of Fig. 9 indicates the priority of the application, and the horizontal axis indicates the passage of time. The direction of the arrow on the vertical axis indicates higher priority. As already mentioned, 301 is a priority application, and 302 is a normal application, both of which belong to core 1. As already mentioned, 304 is a cache maintenance application.

[0052] 9 is the difference between the time required for the priority application 301 in the former case and the time required for the priority application 301 in the latter case. In the latter case, since the cache maintenance application 304 does not exist in the core 2, this becomes overhead, and the time from the start to the end of the priority application 301 is longer by the time width indicated by H.

[0053] Conventionally, when normal application 302 uses a huge amount of data and uses up the cache, data related to priority application 301 is deleted from the cache memory, which leads to delays in priority application 301 and does not guarantee real-time performance. By running cache maintenance application 304 in a core other than the core in which priority application 301 and other applications 302 coexist, it is possible to maintain in the cache memory all data (instructions and data) that priority application 301 may use without interfering with the priority processing of priority application 301.

[0054] As in the conventional example described above, even if a priority application is executed in a non-emergency to prevent a cache miss for the priority application, the input values ​​for the priority application during emergency control are different, so that ultimately, when emergency control becomes necessary, the instructions and data required for the priority application cannot be maintained in the cache.

[0055] On the other hand, according to the embodiment described above, the cache maintenance application 304 can maintain commands and data required for the priority application in the cache memory until just before the emergency occurs. The control system according to Fig. 1 can be applied to various technical fields requiring emergency control, such as automatic driving of automobiles, power supply unit control, robot control, etc.

[0056] One method of speeding up applications in a multi-core control system is to port single-core applications, but when running a group of programs made for a single core on a multi-core, there is a risk of deadlocks between tasks or bugs being induced due to changes in execution timing, etc., and it becomes necessary to redesign and verify the programs. In contrast, according to the above-described embodiment, it is possible to achieve speed-up of priority applications without the need for such measures.

[0057] Next, a second embodiment will be described. Fig. 10 is a functional block diagram of a control system according to the second embodiment, and Fig. 11 shows maintenance target management information 308 according to the second embodiment. The second embodiment differs from the first embodiment in that a cache maintenance application 304 includes a maintenance request management module 901. In response to a request from a priority application 301, the maintenance request management module 901 adds, changes, or deletes an application as a destination of the maintenance target data in the maintenance target management information 308 via a maintenance target management module 307.

[0058] The application name is registered in the maintenance target management information 308 in Fig. 11. The request contents include the application ID, the number of data items to be maintained, the address of each data item to be maintained, and the variable type. The application ID may be changed to a thread ID, a process ID, or the like, depending on the form in which the application is implemented on the core 1. The variable type of the data item to be maintained may be replaced with the size of the data.

[0059] When a change in circumstances means that it is no longer necessary to maintain the data to be maintained in the cache memory, the priority application 301 may be able to cancel the cache maintenance. The maintenance request management module 901 receives a cancellation request from the priority application 301, and deletes the information of the application related to the cancellation request from the maintenance target management information 308 via the maintenance target management module 307. The contents of the cancellation request include the ID of the application, the number of data to be canceled, and the address and variable type of each of the data to be canceled.

[0060] To simplify the data specification at the time of cancellation, the maintenance request management module 901 may generate a label associated with the data group to be maintained at the time of the request, return the label to the requesting application, and specify the label at the time of cancellation. Furthermore, to prevent the normal application 302 from erroneously canceling the request, the maintenance request management module 901 may adopt a format that rejects cancellation notifications from applications other than the priority application 301, or a format that specifies an application that can accept the cancellation notification.

[0061] According to the second embodiment, it is possible to change the priority application to be accelerated from among a plurality of priority applications according to the change in the system situation. For example, in an automatic driving system for an automobile, the applications that are necessary or important may be different in a mode that supports manual driving by a driver and an automatic driving mode in which the system drives. Not limited to automobiles, in any system in which the application that should be guaranteed real-time performance changes due to a change in the situation or a transition of the mode, it is possible to accelerate the application appropriate to the situation by changing the cache maintenance target according to a request from the application.

[0062] Next, a third embodiment of the control system will be described. The third embodiment is characterized in that the order and frequency of storing the target data of each of the multiple priority applications in the cache memory is determined based on the priority of the multiple priority applications 301. When there is a large amount of target data to be maintained in the cache memory, such as when there are multiple priority applications, it may not be possible to store all of the data in the cache memory. Therefore, the maintenance target management module 307 (FIGS. 3 and 10) determines, judges, or selects the priority application whose target data should be maintained in the cache memory, for example, according to the priority of each of the multiple priority applications. This will be described with reference to FIGS. 12 to 14.

[0063] Fig. 12 is an example of the maintenance target management information 308 according to the third embodiment. The priority of the priority application is added to this management table 308. Fig. 13 is a flowchart explaining the operation of the cache maintenance application 304. Fig. 14 is a time chart showing the transition of the application whose target data is maintained in the cache memory by the cache maintenance application 304.

[0064] 12, the maintenance target management information 308 includes the application priority, index, target number, and continuous maintenance number, and links each data item to the application by a tag (index). The maintenance target management information 308 holds the maintenance number and a selection number for each target application.

[0065] 13, first, the maintenance target management module 307 sets the maintenance count and each selection number to 0 (S1201). After that, the maintenance target management module 307 compares the priorities of the target applications managed in the maintenance target management information 308 (FIG. 12) and determines the continuous maintenance count for each application according to the priority ratio (S1202).

[0066] 12, when the priority ratio between applications (App_A:App_B) is 2:1, the maintenance target management module 307 sets the ratio of the number of targets for continuous cache maintenance for application A and application B to 2:1, which is the same as the priority ratio. Then, the data access module 306 selects applications in order from the highest priority (S1203).

[0067] The data access module 306 refers to the index of the selected application, selects data that matches the selection number from the selected application (S1204), and obtains the address and variable type information of the target data (S1205). The data access module 306 accesses the data based on the obtained data information (S1206).

[0068] The data access module 306 increments the maintenance count and the selection number by 1 (S1207), and if the selection number reaches the target number of selected applications (S1208: Yes), resets the selection number to 0 (S1209). If the selection number has not reached the target number of selected applications, proceed directly to the next step (S1208: No).

[0069] If the maintenance count reaches the continuous maintenance count of the selected application (S1210: Yes), the data access module 306 changes the selected application to the application of the next priority (S1211). If the maintenance count has not reached the continuous maintenance count of the selected application, the cache maintenance application 304 proceeds to the next step (S1210: No).

[0070] Thereafter, the data access module 306 checks whether the system is in a shutdown sequence, and if so, shuts down the system (S1212: Yes). If the system is not shutting down, the cache maintenance application 304 returns to S1204 and repeats S1204 to S1212 until the system is shut down (S1212: No).

[0071] As shown in Fig. 14, the data access module 306 accesses all of the data to be maintained for App_A (application A) and then accesses part of the data to be maintained for App_B (application B). Next, the cache maintenance application 304 returns to maintaining data for App_A, and when this is completed, continues maintaining data for the remainder of App_B. This process is repeated thereafter. The ratio between application A and application B may be determined not by the priority of the applications, but by the time from the occurrence of an event to the deadline, frequency, etc. Furthermore, the continuous maintenance number may be replaced with a continuous maintenance time.

[0072] According to the third embodiment, by controlling the order and frequency of storing data to be maintained in the cache of an application based on the priority of the application, even if there are multiple priority applications, it is possible to hold data to be maintained in the cache memory with priority given to the application with the higher importance among them. Note that data maintenance in the cache memory may be performed by setting priority or other priority between multiple data to be maintained for the same application.

[0073] Next, a fourth embodiment will be described. This embodiment is characterized in that, when there are multiple applications whose data should be maintained in the cache memory, the priority of the order of data maintenance among the multiple applications is determined based on the time until the application is started. Fig. 15 is a functional block diagram of a control system according to the fourth embodiment. Fig. 16 shows an example of maintenance target management information 308 according to the fourth embodiment. Fig. 17 is a flowchart showing the operation of a cache maintenance application 304 in the fourth embodiment.

[0074] The cache maintenance application 304 includes, in addition to the functional blocks of the control system according to the second embodiment described above, a cycle / time management module 1401 and a timer setting module 1402. As shown in maintenance target management information 308 in Fig. 16, the cycle / time management module 1401 manages, for each application, the application execution cycle and the time until each application is started based on the cycle and the time.

[0075] The cycle / time management module 1401 first updates the next startup time from the cycle and previous startup time of each application, and selects the application with the closest startup time (S1601). After that, the data access module 306 acquires the data to be maintained information of the selected application in the same manner as in the third embodiment (S1602), and performs data access (S1603). This is repeated until the system is shut down (S1604).

[0076] When selecting a specific application from among a plurality of applications, the cycle / time management module 1401 may select an application that can complete cache maintenance before the selected application is started, based on the time required for cache maintenance. Also, instead of constantly running the cache maintenance application 304, the start time required for maintenance may be calculated from the next start time of the target application, and a timer 1403 may be set by a timer setting function 1402, thereby controlling the operation time of the cache maintenance application.

[0077] According to the fourth embodiment, the order of cache maintenance for a plurality of applications is determined based on the next start time of each of the applications to be cached, i.e., the drive timing of each application, thereby enabling the application with the closest execution timing to be given priority and speeding up to be achieved. Also, by managing the drive timing using the cache maintenance time and a timer, it is possible to keep the load on the cache maintenance application 304 to a necessary minimum.

[0078] Next, another example of the hardware configuration of the control system according to the present invention is shown in the drawings. FIG. 18 is a block diagram showing an example in which the L1 cache 108 is configured in the CPU outside the core, similar to the L2 cache 111. FIG. 19 is a block diagram showing an example in which both the L1 cache 108 and the L2 cache 111 are configured in each core of a multi-core. FIG. 20 is a block diagram showing an example in which an L3 cache 117 is added in the CPU 102 outside each core in addition to the L1 cache 108 and the L2 cache 111 in FIG. 1. FIG. 21 is a block diagram showing an example in which an L3 cache 117 is added in the CPU 102 outside each core of the control system in FIG. 19. In a form in which the CPU 102 has an L3 cache, the data to be maintained may be maintained in the L3 cache 117. [Explanation of symbols]

[0079] 101 Control System 102 CPU 103 Main Memory 104 Peripheral Devices 105 Core 1 106 Core 2 107 Core N 108 L1 cache (in core 1) 109 L1 cache (in core 2) 110 L1 cache (in core N) 111 L2 Cache 301 Priority Application 302 Normal Application 303 Scheduling Module 304 Cache Maintenance Application 305 Other Applications 306 Memory Access Module 307 Maintenance Management Module 308 Management Information to be Maintained 309 Core Allocation Management Information 901 Maintenance Request Management Module 1401 Cycle / Time Management Module 1402 Timer Setting Module 1403 Timer

Claims

1. A data storage control system, comprising: With multiple controllers, a first controller of the plurality of controllers executes at least one priority application that is prioritized over other applications under a predetermined condition; a second controller, which is a controller other than the first controller among the plurality of controllers, maintains data required for execution of the priority application in a cache memory accessible by the priority application before execution of the priority application; the second controller continues to maintain the necessary data in the cache memory from before the priority application is executed, and suspends the maintenance of the necessary data at a timing when the priority application is started; Storage control system.

2. It has a main memory, the first controller and the second controller are each a core of a multi-core CPU, the main memory has management information for the necessary data; the second controller maintains the necessary data in the cache memory based on the management information; 2. The storage control system according to claim 1.

3. the cache memory includes an L1 cache and an L2 cache; the second controller reads the necessary data from the main memory and stores the necessary data in the L1 cache and / or the L2 cache; 3. The storage control system according to claim 2.

4. The first controller and the second controller each include the L1 cache, and the second controller maintains the necessary data stored in its own L1 cache in the L1 cache of the first controller via the L2 cache.

4. The storage control system according to claim 3.

5. the first controller is capable of executing a plurality of applications as the priority applications; the main memory has management information that associates the necessary data with each of the plurality of applications; the second controller updates the management information based on a request from at least one application of the plurality of applications as the priority application.

2. The storage control system according to claim 1.

6. the second controller deletes the application that issued the request from the management information; 6. The storage control system according to claim 5.

7. the first controller is capable of executing a plurality of applications as the priority applications; the main memory has management information that associates the necessary data with each of the plurality of applications; the second controller maintains the necessary data in the cache memory in a manner that prioritizes an application having a higher priority in accordance with the priority of each of the plurality of applications as the priority applications; 3. The storage control system according to claim 2.

8. the first controller is capable of executing a plurality of applications as the priority applications; the main memory has management information that associates the necessary data with each of the plurality of applications; the second controller determines whether it is appropriate to maintain the necessary data for the plurality of applications in the cache memory in accordance with a time period required for each of the plurality of applications as the priority applications to be started.

3. The storage control system according to claim 2.

9. A storage control method in which a plurality of controllers executes control for storing data, comprising: a first controller of the plurality of controllers executes at least one priority application that is prioritized over other applications under a predetermined condition; a second controller, which is a controller other than the first controller among the plurality of controllers, maintains data required for execution of the priority application in a cache memory accessible by the priority application before execution of the priority application; the second controller continues to maintain the necessary data in the cache memory from before the priority application is executed, and suspends the maintenance of the necessary data at a timing when the priority application is started; Storage control method.

Citation Information

Patent Citations

  • microcomputer

    JP2007200277A

  • Task management device

    JP2008015668A

  • Processor, information processing device, information processing method, and system start program

    JP2012155439A

  • Multi-core processor system, and control method and control program of multi-core processor system

    JP2014146366A

  • Cache memory controller and method for controlling cache memory

    WO2014030387A1