Apparatus and method for high performance implementation of system calls
First Claim
1. A method for improving an execution time of a system call issued by a software thread in a data processing system, comprising:
- initiating the system call of the software thread; and
performing the system call, including checking whether a slow path flag for the thread is set, performing, when the slow path flag is set, instructions placed in a slow instruction path, and performing, when the slow path flag is clear, instructions placed in a fast instruction path to avoid at least one of a pre-test or a post-test in connection with the system call when the at least one pre-test or post-test is known to be inapplicable.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for bypassing multiple pre-tests and post-tests during a system call when those tests are known to be inapplicable. One or more slow path flags are checked during a system call or TRAP. If the slow path flag is clear, execution follows a fast instruction path, resulting in faster execution for the system call or TRAP. Otherwise execution follows a slow instruction path. The slow path flags are set, cleared, and checked at appropriate times. The invention improves the execution time of a thread in a software process and may be used in a data processing system employing multiple threads. Each thread in the data processing system has its own set of slow path flags. The invention can set, clear and check the slow path flags of each thread independently, in subsets of threads, or in all threads.
-
Citations
27 Claims
-
1. A method for improving an execution time of a system call issued by a software thread in a data processing system, comprising:
-
initiating the system call of the software thread; and
performing the system call, including checking whether a slow path flag for the thread is set, performing, when the slow path flag is set, instructions placed in a slow instruction path, and performing, when the slow path flag is clear, instructions placed in a fast instruction path to avoid at least one of a pre-test or a post-test in connection with the system call when the at least one pre-test or post-test is known to be inapplicable. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20)
-
-
12. A method for improving an execution time of a TRAP that is caused by a system event in a data processing system, comprising:
-
recognizing that an event causing a TRAP condition has occurred, wherein the event interrupts execution of a software thread by the data processing system; and
processing the TRAP condition, including checking whether a slow path flag for the thread is set, performing when the slow path flag is set, instructions placed in a slow instruction path, and performing, when the slow path flag is clear, instructions placed in a fast instruction path to avoid at least one of a pre-test or a post-test in connection with the system call when the at least one pre-test or post-test is known to be inapplicable. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19)
performing a function to process a pending signal;
determining whether there are more pending signals in the data processing system corresponding to the thread; and
setting the signal-check flag if there are more pending signals.
-
-
21. A method for improving an execution time of a system call issued by a software process in a data processing system, comprising:
- initiating the system call; and
performing the system call, including checking whether a slow path flag for the software process is set, performing, when the slow path flag is set, instructions placed in a slow instruction path, and performing, when the slow path flag is clear, instructions placed in a fast instruction path to avoid at least one of a pre-test or a post-test in connection with the system call when the at least one pre-test or post-test is known to be inapplicable.
- initiating the system call; and
-
22. An apparatus for improving an execution time of a system call issued by a software thread in a data processing system, comprising:
-
circuitry performing one or more software thread instructions forming a part of the software thread, where the software thread instructions include the system call;
circuitry checking whether a slow path flag corresponding to the software thread is set;
circuitry performing, when the slow path flag is set, instructions placed in a slow instruction path of the system call; and
circuitry performing, when the slow path flag is clear, instructions placed in a fast instruction path of the system call to avoid at least one of a pre-test or a post-test in connection with the system call when the at least one pre-test or post-test is known to be inapplicable.
-
-
23. An apparatus for improving the execution time of a TRAP that is caused by a system event in a data processing system, comprising:
-
a memory storing a slow path flag for a software thread;
circuitry recognizing that an event causing a TRAP condition has occurred, wherein the event causes execution of the software thread to become interrupted;
circuitry checking whether a slow path flag corresponding to the thread is set;
circuitry performing, when the slow path flag is set, instructions placed in a slow instruction path of the TRAP; and
circuitry performing, when the slow path flag is clear, instructions in placed a fast instruction path of the TRAP to avoid at least one of a pre-test or a post-test in connection with the system call when the at least one pre-test or post-test is known to be inapplicable.
-
-
24. An apparatus for improving an execution time of a system call issued by a software process, comprising:
-
a memory storing a slow path flag for the software process;
circuitry performing software process instructions of the software process, the software process instructions including the system call;
circuitry checking whether a slow path flag for the process is set;
circuitry performing, when the slow path flag is set, instructions placed in a slow instruction path of the system call; and
circuitry performing, when the slow path flag is clear, instructions placed in a fast instruction path of the system call to avoid at least one of a pre-test or a post-test in connection with the system call when the at least one pre-test or post-test is known to be inapplicable.
-
-
25. A computer system executing a plurality of software threads, comprising:
-
a memory storing a first slow path flag corresponding to a first thread and a second slow path flag corresponding to a second thread;
circuitry performing first thread instructions of the first software thread, the first thread instructions including a first system call;
circuitry performing second thread instructions of the second software thread, the second thread instructions including a second system call;
circuitry checking whether a slow path flag corresponding to the first thread is set;
circuitry checking whether a slow path flag corresponding to the second thread is set;
circuitry performing, when the first slow path flag is set, instructions placed in a slow instruction path corresponding to the first system call;
circuitry performing, when the first slow path flag is clear, instructions placed in a fast instruction path corresponding to the first system call to avoid at least one of a pre-test or a post-test in connection with the first system call when the at least one pre-test or post-test is known to be inapplicable;
circuitry performing, when the second slow path flag is set, instructions placed in a slow instruction path corresponding to the second system call; and
circuitry performing, when the first slow path flag is clear, instructions placed in a fast instruction path corresponding to the second system call to avoid at least one of a pre-test or a post-test in connection with the second system call when the at least one pre-test or post-test is known to be inapplicable.
-
-
26. A method, in a processing system employing threads and at least one of system calls and TRAPs that is capable of being initiated in conjunction with execution of a plurality of the threads, comprising:
-
determining at least one of a pre-test and a post-test that, while executed in conjunction with performing at least one of the system calls and TRAPs during ongoing processing system operation, can be rendered inapplicable during a selectable processing of the at least one of the system calls and TRAPs;
providing a slow instruction path and a fast instruction path;
placing the at least one of a pre-test and a post-test in the slow instruction path and excluding the at least one of a pre-test and a post-test from the fast instruction path;
designating a slow path flag that is capable of being set such that instructions in the slow instruction path will be executed during the at least one of the system calls and TRAPs, and that is capable of being cleared such that instructions in the fast instruction path will be executed during the at least one of the system calls and TRAPs. - View Dependent Claims (27)
-
Specification