Input/output (I/O) interrupts are avoided at the completion of I/O operations. A task requests (implicitly or explicitly) an I/O operation, and processing of the task is suspended awaiting completion of the I/O operation. At the completion of the I/O operation, instead of an I/O interrupt, an indicator associated with the task is set. Then, when the task once again becomes the current task to be executed, the indicator is checked. If the indicator indicates the I/O operation is complete, execution of the task is resumed.
|
1. A method of facilitating processing in a processing environment, said method comprising:
responsive to occurrence of a page fault associated with a data request of a task currently executing, suspending execution of the task, indicating the task as being currently suspended for page fault processing, and placing the suspended task at an end of a dispatch structure of tasks ready for execution by a processor;
performing, by one or more components of the processing environment, a page fault operation for the suspended task, wherein the suspended task remains on the dispatch structure during performance of the page fault operation for the suspended task;
based on retrieving data to satisfy the page fault, indicating completion of the page fault operation by setting, by a first processor of the processing environment, a completion indicator associated with the suspended task, the completion indicator indicating that execution of the suspended task may be resumed based on identifying the suspended task as potentially next for dispatching from the dispatch structure; and
performing dispatching of tasks from the dispatch structure, wherein at least one suspended task for which an operation has yet to be completed remains on the dispatch structure while at least one other task on the dispatch structure is selected for potentially resuming execution thereof, and wherein the performing comprises:
responsive to identifying, on the dispatch structure, the suspended task as potentially next for execution, checking prior to dispatching of the suspended task, the completion indicator associated with the suspended task to determine whether the completion indicator is set indicating completion of the page fault operation, and, based on the checking indicating completion of the page fault operation, dispatching the suspended task from the dispatch structure to a second processor of the processing environment, to resume execution of the suspended task, wherein the first processor may be the same or different from the second processor.
11. A computer system for facilitating processing in a processing environment, said computer system comprising:
a memory; and
at least one processor, in communications with the memory, wherein the computer system is configured to perform a method comprising:
responsive to occurrence of a page fault associated with a data request of a task currently executing, suspending execution of the task, indicating the task as being currently suspended for page fault processing, and placing the suspended task at an end of a dispatch structure of tasks to ready for execution by a processor;
performing, by one or more components of the processing environment, a page fault operation for the suspended task, wherein the suspended task remains on the dispatch structure during performance of the page fault operation for the suspended task;
based on retrieving data to satisfy the page fault, indicating completion of the page fault operation by setting, by a first processor of the processing environment, a completion indicator associated with the suspended task, the completion indicator indicating that execution of the suspended task may be resumed based on identifying the suspended task as potentially next for dispatching from the dispatch structure; and
performing dispatching of tasks from the dispatch structure, wherein at least one suspended task for which an operation has yet to be completed remains on the dispatch structure while at least one other task on the dispatch structure is selected for potentially resuming execution thereof, and wherein the performing comprises:
responsive to identifying, on the dispatch structure, the suspended task as potentially next for execution, checking prior to dispatching of the suspended task, the completion indicator associated with the suspended task to determine whether the completion indicator is set indicating completion of the page fault operation, and, based on the checking indicating completion of the page fault operation, dispatching the suspended task from the dispatch structure to a second processor of the processing environment, to resume execution of the suspended task, wherein the first processor may be the same or different from the second processor.
15. A computer program product for facilitating processing in a processing environment, the computer program product comprising:
a non-transitory computer readable storage medium readable by a processor and storing instructions for execution by the processor to perform a method comprising:
responsive to occurrence of a page fault associated with a data request of a task currently executing, suspending execution of the task, indicating the task as being currently suspended for page fault processing, and placing the suspended task at an end of a dispatch structure of tasks ready for execution by a processor;
performing, by one or more components of the processing environment, a page fault operation for the suspended task, wherein the suspended task remains on the dispatch structure during performance of the page fault operation for the suspended task;
based on retrieving data to satisfy the page fault, indicating completion of the page fault operation by setting, by a first processor of the processing environment, a completion indicator associated with the suspended task, the completion indicator indicating that execution of the suspended task may be resumed based on identifying the suspended task as potentially next for dispatching from the dispatch structure; and
performing dispatching of tasks from the dispatch structure, wherein at least one suspended task for which an operation has yet to be completed remains on the dispatch structure while at least one other task on the dispatch structure is selected for potentially resuming execution thereof and wherein the performing comprises:
responsive to identifying on the dispatch structure the suspended task as potentially next for execution, checking prior to dispatching of the suspended task, the completion indicator associated with the suspended task to determine whether the completion indicator is set indicating completion of the page fault operation, and, based on the checking indicating completion of the page fault operation, dispatching the suspended task from the dispatch structure to a second processor of the processing environment, to resume execution of the suspended task, wherein the first processor may be the same or different from the second processor.
2. The method of
3. The method of
4. The method of
5. The method of
6. The method of
7. The method of
8. The method of
9. The method of
10. The method of
12. The computer system of
13. The computer system of
14. The system of
16. The computer program product of
17. The article of manufacture of
|
This invention relates, in general, to facilitating processing within a processing environment, and in particular, to improving efficiency of the processing environment by avoiding I/O interrupts in particular situations.
I/O interrupts are common in many processing environments that suspend processing waiting for required I/O operations to complete. Examples of such processing environments are those that have a limited amount of real memory, and therefore, take advantage of virtual memory. Virtual memory makes it seem as if there is more real memory in a system than really exists. With virtual memory, areas of real memory that have not been recently used are paged out to storage freeing up space in real memory.
In such virtual memory-based systems, a paging mechanism is used to share real memory resources with multiple executing tasks in a system. The virtual memory space is mapped onto the real memory space and the computer hardware uses this map to resolve virtual addresses into real addresses. Real memory resources are usually over committed in such an environment and, as previously stated, inactive portions of real memory are paged out to a device (usually a disk drive). The relevant areas are then marked as invalid. When a task requests data that has an address marked invalid, a page fault occurs causing an I/O interrupt for the task and suspending execution of the task. The virtual memory contents are then retrieved from the device. When the virtual memory page is once again resident in real memory, the task can resume execution.
The retrieval operation from the disk drive requires additional disruption of usable work due to the requirement of the operating system to acknowledge the completion of the disk I/O and to mark the virtual page available. This negatively impacts system performance.
Based on the foregoing, a need exists for a capability that eliminates the additional I/O interrupt to acknowledge completion of an I/O operation. In particular, a need exists for a capability that eliminates an I/O interrupt to indicate completion of an I/O operation and to mark a virtual page available. A need exists for a capability that allows an operating system to know when an I/O operation is complete enabling processing of a suspended task to be resumed. A need exists for a capability that allows an operating system to know when paging operations for a virtual memory page fault are complete without requiring the disruption and overhead of an I/O interrupt.
The shortcomings of the prior art are overcome and additional advantages are provided through the provision of a method of facilitating processing in a processing environment. The method includes, for instance, performing, by one or more components of the processing environment, an I/O operation for a task of the processing environment, wherein execution of the task has been interrupted; indicating completion of the I/O operation absent use of an I/O interrupt, wherein indicating completion includes setting, by a first processor of the processing environment, an indicator associated with task; and resuming, by a second processor of the processing environment, execution of the task, in response to an indication of completion, wherein the first processor may be the same or different from the second processor.
Systems and program products relating to one or more aspects of the present invention are also described and claimed herein.
Additional features and advantages are realized through the techniques of the present invention. Other embodiments and aspects of the invention are described in detail herein and are considered a part of the claimed invention.
One or more aspects of the present invention are particularly pointed out and distinctly claimed as examples in the claims at the conclusion of the specification. The foregoing and other objects, features, and advantages of the invention are apparent from the following detailed description taken in conjunction with the accompanying drawings in which:
In accordance with an aspect of the present invention, a capability is provided that avoids an I/O interrupt at completion of an I/O operation. In one example, a capability is provided that avoids an I/O interrupt at completion of an I/O operation to satisfy a page fault. A capability is provided that allows an operating system to know when paging operations for a page fault are complete without requiring the disruption and overhead of an I/O interrupt. A page fault is an interrupt that occurs when a task (i.e., an executable unit of work) requests data that is not currently in real memory. Although the term “page” is used herein, one or more aspects of the present invention are not limited to memory sizes of pages. The term page fault is to include a fault that causes an interrupt for any size of memory. Further, the size of memory requested need not be a page, but can be other sizes of memory.
One embodiment of a processing environment to incorporate and use one or more aspects of the present invention is depicted in
Operating system 106 includes one or more channel programs (or other paging I/O segments) 108, which are fetched by one or more channel processors (also referred to herein as channels) 110 coupled to processor 102. The fetched channel programs are executed by the channel processors which, in one example, are subordinate or assist processors to central processor 102 and share memory with the central processing unit. The channel processors, when executing the channel programs, retrieve data from one or more devices 112, such as disk storage devices, solid state drives, or other storage devices.
When a task 104 attempts to access data that is not in real memory, a page fault 114 occurs. In response to the page fault, an interrupt occurs to enable the operating system to retrieve the virtual memory contents from a device. One embodiment of the logic associated with page fault processing is described with reference to
Referring to
Additionally, a real page frame is allocated, STEP 206. The real page frame holds the data in real memory when it is brought in from storage. The real page frame is allocated from a list of frames. Further, an attempt is made to allocate a position in a defer data structure, STEP 208. This data structure holds those tasks that have been deferred because of, for instance, a page fault.
One example of a defer data structure is depicted in
Returning to
Referring to
Referring to
Returning to
Although, in the above example, one channel and one device are indicated, it is understood that multiple channels (or other components) can be used to execute the commands, and that each channel has access to one or more devices. The devices accessed by a channel can be homogeneous or heterogeneous. Many types of devices can be used.
Returning to
Returning to
In parallel to the interrupt handling processing described above, dispatch processing is also taking place. One embodiment of this processing is described with reference to
Referring to
Returning to INQUIRY 708, if the task is not ready to be dispatched, then it is deferred again, STEP 712, by adding it to the end of the dispatch data structure. Processing then continues with STEP 700.
In a further embodiment, instead of using a defer data structure, a field within the existing task structure or control block is marked as deferred for paging operation. This mark is placed in a specific location within the structure or control block and includes the marker value (for example, xFFFFFFFF).
As described above, in response to a page fault, processing of a task is deferred until the page fault is handled. However, at the completion of the page fault, instead of an I/O interrupt, an indicator associated with the task is set specifying that the data is available and the task can now be dispatched. The indicator is set by a component of the processing environment, such as by a channel processor executing the commands; or in an example in which the indicator is included in a structure of the task (e.g., control block) by the operating system of the processor. Other components may also be used.
In one example, it is assumed that a high percentage of I/O will complete in a certain time and that the interrupted process can be re-dispatched at that point. There is low overhead in handling the case where the I/O did not complete. There is also low overhead in re-dispatching the process at a time later than the expected time. Therefore, there is a net increase in performance by eliminating the interrupt at the end of the I/O.
Although the examples describe avoiding I/O interrupts at completion of I/O operations, in response to a page fault, one or more aspects of the present invention are applicable to avoiding I/O interrupts at the completion of I/O for reasons other than page faults, and these are considered a part of the claimed invention.
With reference to
Although in the above examples, particular processors or other components are specified as performing a function, other processors or components can also perform those functions without departing from the spirit of the present invention.
One or more aspects of the present invention can be included in an article of manufacture (e.g., one or more computer program products) having, for instance, computer readable media. The media has therein, for instance, computer readable program code means or logic (e.g., instructions, code, commands, etc.) to provide and facilitate the capabilities of the present invention. The article of manufacture can be included as a part of a computer system or sold separately.
One example of an article of manufacture or a computer program product incorporating one or more aspects of the present invention is described with reference to
The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. Examples of a computer readable medium include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disk and an optical disk. Examples of optical disks include compact disk-read only memory (CD-ROM), compact disk-read/write (CD-R/W) and DVD.
A sequence of program instructions or a logical assembly of one or more interrelated modules defined by one or more computer readable program code means or logic direct the performance of one or more aspects of the present invention.
Advantageously, a capability is provided that eliminates an I/O interrupt at the completion of an I/O. As one example, the I/O interrupt at the completion of an I/O used to acknowledge such completion and to mark a virtual page available is eliminated. This enhances system performance by allowing an operating system to know when paging operations for a virtual memory page fault are complete without requiring the disruption and overhead of an I/O interrupt.
Although various embodiments are described above, these are only examples. Many variations may be made without departing from the spirit of the present invention. For example, redispatching of the interrupted task can be handled in a manner different than described above. In one embodiment, the faulted task, while task switched out, is kept in the queue of dispatchable processes. In this embodiment, the level of system activity will ensure that with high probability the fault will be resolved by the time this task is redispatched. If the fault is not resolved by this time, then the original page fault occurs a second time. If a second page fault occurs, the task can be treated in one of two ways. It can be reappended to the end of the dispatch list or removed from the dispatch list to a list to wait for an interruption indicating the return of the page, as examples.
As a further example, instead of automatically attempting to redispatch a task when it comes to the head of the dispatch queue (after being deferred), timestamps and a tunable parameter are used to determine when a redispatch of the task is to be attempted. For instance, when the task is deferred, a defer timestamp is provided for the task (e.g., in a control block associated with the task, in the dispatch data structure, in the defer data structure, etc.) that indicates the beginning of the defer, and then when the task is the next task to be dispatched, the defer timestamp is compared to current time. If the difference is less than a tunable parameter, then the task would still be deferred. Otherwise, the task is attempted to be redispatched, including, for instance, checking the defer data structure to see if the I/O is complete and redispatching, if I/O is complete.
The tunable parameter can be set to any desired value. The setting may depend on the type of storage devices being used. For example, for conventional disk storage, it may be set to 10-15 milliseconds; for faster storage, it may be set to 1 millisecond. It may also be set to zero or any other desired value. It can be set automatically or manually based on rules or set by an operator.
When, based on the tunable parameter, the task is ready to be checked for redispatch, the dispatch may be attempted at that time or at a later time. For instance, the task may be placed at the end of the dispatch queue, and redispatched later. As a further example, all the tasks ready to be redispatched, based on the tunable parameter, may be redispatched, in response to invoking the operating system or dispatcher for one or more reasons. In that case, when the operating system or redispatcher is invoked it checks for any tasks in which redispatching is past due.
Yet further, instead of checking the tunable parameter when the task comes up in the queue, it may be checked at a predefined time, in which all the deferred tasks (or a subset thereof) are checked. Many other variations are possible.
Additionally, environments other than those based on the z/Architecture® may incorporate and use one or more aspects of the present invention. The central processor may be executing an operating system other than z/OS®. Further, the environment may include more than one central processor and the processors may be homogeneous or heterogeneous. Yet further, the environment can be other than a mainframe environment. Further, the paging I/O segments can be other than channel programs and a device other than a channel processor may execute the paging I/O segments. Channels other than z/Architecture® channels, such as SCSI or other channels, can use one or more aspects of the present invention. Different types of devices may be used to store the data. Further, the data structures described herein can be of a different format, length or include different information than described herein. Further, the examples of values used to mark entries of the defer data structure can be different than described herein. Moreover, the dispatch data structure and defer data structure can be one structure, and the deferred tasks are just marked as deferred in that one structure. Many other variations also exist.
Moreover, other types of computing environments can benefit from one or more aspects of the present invention. As an example, an environment may include an emulator (e.g., software or other emulation mechanisms), in which a particular architecture (including, for instance, instruction execution, architected functions, such as address translation, and architected registers) or a subset thereof is emulated (e.g., on a native computer system having a processor and memory). In such an environment, one or more emulation functions of the emulator can implement one or more aspects of the present invention, even though a computer executing the emulator may have a different architecture than the capabilities being emulated. As one example, in emulation mode, the specific instruction or operation being emulated is decoded, and an appropriate emulation function is built to implement the individual instruction or operation.
In an emulation environment, a host computer includes, for instance, a memory to store instructions and data; an instruction fetch unit to fetch instructions from memory and to optionally, provide local buffering for the fetched instruction; an instruction decode unit to receive the instruction fetch unit and to determine the type of instructions that have been fetched; and an instruction execution unit to execute the instructions. Execution may include loading data into a register from memory; storing data back to memory from a register; or performing some type of arithmetic or logical operation, as determined by the decode unit. In one example, each unit is implemented in software. For instance, the operations being performed by the units are implemented as one or more subroutines within emulator software.
Further, a data processing system suitable for storing and/or executing program code is usable that includes at least one processor coupled directly or indirectly to memory elements through a system bus. The memory elements include, for instance, local memory employed during actual execution of the program code, bulk storage, and cache memory which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.
Input/Output or I/O devices (including, but not limited to, keyboards, displays, pointing devices, DASD, tape, CDs, DVDs, thumb drives and other memory media, etc.) can be coupled to the system either directly or through intervening I/O controllers. Network adapters may also be coupled to the system to enable the data processing system to become coupled to other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, cable modems, and Ethernet cards are just a few of the available types of network adapters.
The capabilities of one or more aspects of the present invention can be implemented in software, firmware, hardware, or some combination thereof. At least one program storage device readable by a machine embodying at least one program of instructions executable by the machine to perform the capabilities of the present invention can be provided.
The flow diagrams depicted herein are just examples. There may be many variations to these diagrams or the steps (or operations) described therein without departing from the spirit of the invention. For instance, the steps may be performed in a differing order, or steps may be added, deleted, or modified. All of these variations are considered a part of the claimed invention.
Although embodiments have been depicted and described in detail herein, it will be apparent to those skilled in the relevant art that various modifications, additions, substitutions and the like can be made without departing from the spirit of the invention and these are therefore considered to be within the scope of the invention as defined in the following claims.
Willner, Barry E., Rogers, Roger W.
Patent | Priority | Assignee | Title |
10810096, | Jan 08 2016 | Microsoft Technology Licensing, LLC | Deferred server recovery in computing systems |
9632826, | Jun 05 2012 | MAPLEBEAR INC | Prioritizing deferred tasks in pending task queue based on creation timestamp |
Patent | Priority | Assignee | Title |
4685125, | Jun 28 1982 | NCR Corporation | Computer system with tasking |
5016161, | Apr 12 1989 | Sun Microsystems, Inc. | Method and apparatus for the flow control of devices |
5491824, | Apr 20 1992 | International Business Machines Corporation | System and method for improved efficiency and deadlock prevention in communication interfaces utilizing a first-in-first-out action queue |
5566338, | Jun 01 1993 | Matsushita Electric Industrial Co. Ltd. | Interrupt control method and interrupt control circuit in a processor |
5584039, | Nov 08 1993 | International Business Machines Corporation | System for coordinating execution of multiple concurrent channel programs without host processor involvement using suspend and resume commands to control data transfer between I/O devices |
5671365, | Oct 20 1995 | AVAGO TECHNOLOGIES GENERAL IP SINGAPORE PTE LTD | I/O system for reducing main processor overhead in initiating I/O requests and servicing I/O completion events |
5710909, | Jan 23 1996 | International Business Machines Corporation | Data compression utilization method and apparatus for computer main store |
5758184, | Apr 24 1995 | Microsoft Technology Licensing, LLC | System for performing asynchronous file operations requested by runnable threads by processing completion messages with different queue thread and checking for completion by runnable threads |
5799305, | Nov 02 1995 | International Business Machines Corporation | Method of commitment in a distributed database transaction |
5949977, | Oct 08 1996 | AUBETA NETWORKS CORPORATION | Method and apparatus for requesting and processing services from a plurality of nodes connected via common communication links |
6058426, | Jul 14 1997 | International Business Machines Corporation | System and method for automatically managing computing resources in a distributed computing environment |
6185639, | Jun 05 1998 | International Business Machines Corporation | System and method to reduce a computer system's interrupt processing overhead |
6223207, | Apr 24 1995 | Microsoft Technology Licensing, LLC | Input/output completion port queue data structures and methods for using same |
6675238, | Sep 03 1999 | Intel Corporation | Each of a plurality of descriptors having a completion indicator and being stored in a cache memory of an input/output processor |
6697959, | Dec 20 2000 | Bull HN Information Systems Inc.; BULL HN INFORMATION SYSTEMS INC | Fault handling in a data processing system utilizing a fault vector pointer table |
6718413, | Aug 31 1999 | PMC-SIERRA, INC | Contention-based methods for generating reduced number of interrupts |
6748472, | Feb 28 2001 | OSRAM OLED GmbH | Method and system for an interrupt accelerator that reduces the number of interrupts for a digital signal processor |
7003646, | Mar 27 2002 | HEWLETT-PACKARD DEVELOPMENT COMPANY, L P | Efficiency in a memory management system |
7073043, | Apr 28 2003 | International Business Machines Corporation | Multiprocessor system supporting multiple outstanding TLBI operations per partition |
8028298, | Aug 16 2002 | Synaptics Incorporated | Systems and methods for managing shared resources in a computer system |
20020136130, | |||
20040225850, | |||
20050125793, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Dec 11 2008 | ROGERS, ROGER W | International Business Machines Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 021970 | /0309 | |
Dec 11 2008 | WILLNER, BARRY E | International Business Machines Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 021970 | /0309 | |
Dec 12 2008 | International Business Machines Corporation | (assignment on the face of the patent) | / | |||
Dec 24 2016 | International Business Machines Corporation | ServiceNow, Inc | CORRECTIVE ASSIGNMENT TO CORRECT THE 1ST ASSIGNEE NAME 50% INTEREST PREVIOUSLY RECORDED AT REEL: 043418 FRAME: 0692 ASSIGNOR S HEREBY CONFIRMS THE ASSIGNMENT | 044348 | /0451 | |
Dec 24 2016 | International Business Machines Corporation | International Business Machines Corporation | CORRECTIVE ASSIGNMENT TO CORRECT THE 1ST ASSIGNEE NAME 50% INTEREST PREVIOUSLY RECORDED AT REEL: 043418 FRAME: 0692 ASSIGNOR S HEREBY CONFIRMS THE ASSIGNMENT | 044348 | /0451 | |
Jul 31 2017 | International Business Machines Corporation | ServiceNow, Inc | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 043418 | /0692 |
Date | Maintenance Fee Events |
Mar 03 2017 | REM: Maintenance Fee Reminder Mailed. |
Jul 20 2017 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Jul 20 2017 | M1554: Surcharge for Late Payment, Large Entity. |
Mar 15 2021 | REM: Maintenance Fee Reminder Mailed. |
Aug 30 2021 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Date | Maintenance Schedule |
Jul 23 2016 | 4 years fee payment window open |
Jan 23 2017 | 6 months grace period start (w surcharge) |
Jul 23 2017 | patent expiry (for year 4) |
Jul 23 2019 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jul 23 2020 | 8 years fee payment window open |
Jan 23 2021 | 6 months grace period start (w surcharge) |
Jul 23 2021 | patent expiry (for year 8) |
Jul 23 2023 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jul 23 2024 | 12 years fee payment window open |
Jan 23 2025 | 6 months grace period start (w surcharge) |
Jul 23 2025 | patent expiry (for year 12) |
Jul 23 2027 | 2 years to revive unintentionally abandoned end. (for year 12) |