Determining whether a CPU stalling a current RCU grace period had interrupts enabled
First Claim
1. A method for determining if a CPU stalling a read-copy update (RCU) grace period has interrupts enabled, the method comprising:
- incorporating into per-CPU state information maintained on behalf of the CPU, an RCU grace-period number snapshot that serves as an interrupt work-state grace period indicator for the CPU, the RCU grace-period number snapshot being occasionally set to a current RCU grace period number, and an interrupt work state of the CPU being implicitly initialized by virtue of the RCU grace period number being incremented during initialization of a new RCU grace period so as to be greater than the RCU grace-period number snapshot;
incorporating into the per-CPU state information an interrupt work-request indicator that indicates whether the CPU has an interrupt work request pending;
determining if a current RCU grace period has endured for a predetermined time period relative to an RCU CPU stall-warning timeout interval;
if so, using the RCU grace-period number snapshot, a current RCU grace period number and the interrupt work-request indicator to determine if an interrupt work request for handling by the CPU has been generated during the current RCU grace period;
if not, generating an interrupt work request for handling by the CPU if it is fully online;
updating the interrupt work-request indicator to indicate that the CPU has a pending interrupt work request;
in response to an RCU CPU stall-warning condition, checking the interrupt work-request indicator to determine if the interrupt work request has been handled;
issuing an RCU CPU stall-warning message that reports an interrupt-handling status of the CPU according to whether the interrupt work request was handled, the CPU interrupt-handling status indicating that interrupts were enabled if the interrupt work request was handled, or indicating that interrupts were disabled if the interrupt work request was not handled; and
in response to the interrupt work request not being handled, using the RCU grace-period snapshot and a current grace period number to determine how many RCU grace periods elapsed while the interrupt work request was pending, and reporting the number of elapsed RCU grace periods in the RCU CPU stall-warning message.
1 Assignment
0 Petitions
Accused Products
Abstract
A technique for determining if a CPU stalling an RCU grace period has interrupts enabled. Per-CPU state information is maintained for the CPU, including an RCU grace-period number snapshot and an interrupt work-request indicator. If a current RCU grace period has endured for a predetermined time period, it is determined if there is a pending interrupt work request for the CPU. If not, an interrupt work request is generated and the interrupt work-request indicator is updated accordingly. In response to an RCU CPU stall-warning condition, it is determined if the interrupt work request was handled. An RCU CPU stall-warning message reports an interrupt-handling status of the CPU according to the interrupt work request handling determination. If the interrupt work request was not handled, the RCU CPU stall-warning message reports how many RCU grace periods elapsed while the interrupt work request was pending.
-
Citations
20 Claims
-
1. A method for determining if a CPU stalling a read-copy update (RCU) grace period has interrupts enabled, the method comprising:
-
incorporating into per-CPU state information maintained on behalf of the CPU, an RCU grace-period number snapshot that serves as an interrupt work-state grace period indicator for the CPU, the RCU grace-period number snapshot being occasionally set to a current RCU grace period number, and an interrupt work state of the CPU being implicitly initialized by virtue of the RCU grace period number being incremented during initialization of a new RCU grace period so as to be greater than the RCU grace-period number snapshot; incorporating into the per-CPU state information an interrupt work-request indicator that indicates whether the CPU has an interrupt work request pending; determining if a current RCU grace period has endured for a predetermined time period relative to an RCU CPU stall-warning timeout interval; if so, using the RCU grace-period number snapshot, a current RCU grace period number and the interrupt work-request indicator to determine if an interrupt work request for handling by the CPU has been generated during the current RCU grace period; if not, generating an interrupt work request for handling by the CPU if it is fully online; updating the interrupt work-request indicator to indicate that the CPU has a pending interrupt work request; in response to an RCU CPU stall-warning condition, checking the interrupt work-request indicator to determine if the interrupt work request has been handled; issuing an RCU CPU stall-warning message that reports an interrupt-handling status of the CPU according to whether the interrupt work request was handled, the CPU interrupt-handling status indicating that interrupts were enabled if the interrupt work request was handled, or indicating that interrupts were disabled if the interrupt work request was not handled; and in response to the interrupt work request not being handled, using the RCU grace-period snapshot and a current grace period number to determine how many RCU grace periods elapsed while the interrupt work request was pending, and reporting the number of elapsed RCU grace periods in the RCU CPU stall-warning message. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system, comprising:
-
a plurality of CPUs; a memory coupled to the CPUs, the memory including a computer readable storage medium tangibly embodying at least one program of instructions executable by the CPUs to perform operations for determining if a CPU stalling a read-copy update (RCU) grace period has interrupts enabled, the operations comprising; incorporating into per-CPU state information maintained on behalf of the CPU, an RCU grace-period number snapshot that serves as an interrupt work-state grace period indicator for the CPU, the RCU grace-period number snapshot being occasionally set to a current RCU grace period number, and an interrupt work state of the CPU being implicitly initialized by virtue of the RCU grace period number being incremented during initialization of a new RCU grace period so as to be greater than the RCU grace-period number snapshot; incorporating into the per-CPU state information an interrupt work-request indicator that indicates whether the CPU has an interrupt work request pending; determining if a current RCU grace period has endured for a predetermined time period relative to an RCU CPU stall-warning timeout interval; if so, using the RCU grace-period number snapshot, a current RCU grace period number and the interrupt work-request indicator to determine if an interrupt work request for handling by the CPU has been generated during the current RCU grace period; if not, generating an interrupt work request for handling by the CPU if it is fully online; updating the interrupt work-request indicator to indicate that the CPU has a pending interrupt work request; in response to an RCU CPU stall-warning condition, checking the interrupt work-request indicator to determine if the interrupt work request has been handled; issuing an RCU CPU stall-warning message that reports an interrupt-handling status of the CPU according to whether the interrupt work request was handled, the CPU interrupt-handling status indicating that interrupts were enabled if the interrupt work request was handled, or indicating that interrupts were disabled if the interrupt work request was not handled; and in response to the interrupt work request not being handled, using the RCU grace-period snapshot and a current grace period number to determine how many RCU grace periods elapsed while the interrupt work request was pending, and reporting the number of elapsed RCU grace periods in the RCU CPU stall-warning message. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer program product, comprising:
-
one or more non-transitory computer readable data storage media; program instructions stored on the one or more computer readable data storage media for programming a data processing platform having a plurality of CPUs to perform operations for determining if a CPU stalling a read-copy update (RCU) grace period has interrupts enabled, the operations comprising; incorporating into per-CPU state information maintained on behalf of the CPU, an RCU grace-period number snapshot that serves as an interrupt work-state grace period indicator for the CPU, the RCU grace-period number snapshot being occasionally set to a current RCU grace period number, and an interrupt work state of the CPU being implicitly initialized by virtue of the RCU grace period number being incremented during initialization of a new RCU grace period so as to be greater than the RCU grace-period number snapshot; incorporating into the per-CPU state information an interrupt work-request indicator that indicates whether the CPU has an interrupt work request pending; determining if a current RCU grace period has endured for a predetermined time period relative to an RCU CPU stall-warning timeout interval; if so, using the RCU grace-period number snapshot, a current RCU grace period number and the interrupt work-request indicator to determine if an interrupt work request for handling by the CPU has been generated during the current RCU grace period; if not, generating an interrupt work request for handling by the CPU if it is fully online; updating the interrupt work-request indicator to indicate that the CPU has a pending interrupt work request; in response to an RCU CPU stall-warning condition, checking the interrupt work-request indicator to determine if the interrupt work request has been handled; issuing an RCU CPU stall-warning message that reports an interrupt-handling status of the CPU according to whether the interrupt work request was handled, the CPU interrupt-handling status indicating that interrupts were enabled if the interrupt work request was handled, or indicating that interrupts were disabled if the interrupt work request was not handled; and in response to the interrupt work request not being handled, using the RCU grace-period snapshot and a current grace period number to determine how many RCU grace periods elapsed while the interrupt work request was pending, and reporting the number of elapsed RCU grace periods in the RCU CPU stall-warning message. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification