×

Determining whether a CPU stalling a current RCU grace period had interrupts enabled

  • US 10,268,610 B1
  • Filed: 08/16/2018
  • Issued: 04/23/2019
  • Est. Priority Date: 08/16/2018
  • Status: Active Grant
First Claim
Patent Images

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 all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×