主权项 |
1. A method for handling a page fault while executing a cross-platform system call with a shared page cache in a hybrid system that comprises at least one processor, said method comprising:
said at least one processor sending, by a first kernel running in a first computer system of the hybrid system to a second kernel running in a second computer system of the hybrid system, a system call comprising a parameter referring to a memory page of raw data, said memory page denoted by a first validity flag to be currently available to the first computer system in a first copy of the shared page cache in the first computer system and denoted by a second validity flag to be currently unavailable to the second computer system in a second copy of the shared page cache in the second computer system, said system call being sent from the first kernel to the second kernel with the parameter and without the memory page, wherein a result from execution of the system call depends on the raw data in the memory page; after said sending the system call to the second kernel, said at least one processor receiving, by the first kernel from the second kernel, a request for the memory page which had been determined by the second kernel to be a faulted memory page in the second computer system; in response to the request for the memory page, said at least one processor: (i) transferring, by the first kernel, the memory page from the first copy of the shared page cache in the first computer system to the second kernel for insertion, by the second kernel, of the transferred memory page into the second copy of the shared page cache in the second computer system and for updating, by the second kernel, the second validity flag to denote that the memory page is currently available to the second computer system in the second copy of the shared page cache; and (ii) updating, by the first kernel, the first validity flag to denote that the memory page is currently unavailable to the first computer system in the first copy of the shared page cache; and after said transferring the memory page to the second kernel, said at least one processor receiving, by the first kernel from the second kernel, the result from the second kernel having executed the system call. |