# US 2021/0064446 A1 · Determining when it is safe to use scheduler lock-acquiring wakeups to defer quiescent states in real-time preemptible read-copy update

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0064446 A1
- Document ID: US20210064446A1
- Status: Published application
- Kind: A1
- Application number: 16/555,269
- Filed: 2019-08-29
- Published: 2021-03-04
- Earliest claimed: 2019-08-29
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Paul E. McKenney
- Web page: https://patentgrep.com/patent/US20210064446A1

## CPC

- G06F 9/526: {Mutual exclusion algorithms}
- G06F 9/461: {Saving or restoring of program or task context}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 9/545: {where tasks reside in different layers, e.g. user- and kernel-space}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A technique for determining when it is safe to use scheduler lock-acquiring wakeups to defer quiescent states in real-time preemptible read-copy update (RCU). A determination may be made whether a deferred quiescent-state reporting request that defers the reporting of an RCU quiescent state on behalf of a target computer task is warranted. If so, it may be determined whether a previous deferred quiescent-state reporting request on behalf of the target computer task remains pending. A request may be issued for deferred quiescent-state report processing that reports a deferred quiescent state. The request for deferred quiescent-state report processing may be issued in a manner selected according to a result of the determining whether a previous deferred quiescent-state reporting request remains pending.

## Claims

### Claim 1

A computer-implemented method, comprising:
determining whether a deferred quiescent-state reporting request that defers the reporting of a read-copy update (RCU) quiescent state on behalf of a target computer task is warranted;
in response to the deferred quiescent-state reporting request being warranted, determining whether a previous deferred quiescent-state reporting request on behalf of the target computer task remains pending; and
issuing a request for deferred quiescent-state report processing that reports a deferred quiescent state, the request for deferred quiescent-state report processing being issued in a manner selected according to a result of the determining whether a previous deferred quiescent-state reporting request remains pending.

### Claim 2 (depends on 1)

The method of claim 1, wherein in response to there being no previous deferred quiescent-state reporting request on behalf of the target computer task that remains pending, issuing a lock-acquiring wakeup request for deferred quiescent-state report processing that reports a deferred quiescent state, the lock-acquiring wakeup request being implemented in a manner that acquires one or both of an operating system scheduler's run-queue or priority-inheritance locks, the deferred quiescent-state report processing performed as a result of the lock-acquiring wakeup request including either kernel thread processing or softirq processing.

### Claim 3 (depends on 1)

The method of claim 1, wherein in response to there being a previous deferred quiescent-state reporting request on behalf of the target computer task that remains pending, issuing a non-lock-acquiring wakeup request for deferred quiescent-state report processing that reports a deferred quiescent state, the non-lock-acquiring wakeup request being implemented in a manner that does not acquire the operating system scheduler's run-queue or priority-inheritance locks, the deferred quiescent-state report processing performed as a result of the non-lock-acquiring wakeup request including softirq processing.

### Claim 4 (depends on 3)

The method of claim 3, wherein the non-lock-acquiring wakeup request for deferred quiescent-state-report softirq processing is conditioned on the method being performed by an interrupt handler running as a result of the target computer task being interrupted.

### Claim 5 (depends on 1)

The method of claim 1, wherein in response to there being a previous deferred quiescent-state reporting request on behalf of the target computer task that remains pending, issuing a non-lock-acquiring wakeup request for deferred quiescent-state report processing, the non-lock-acquiring wakeup request being implemented in a manner that does not acquire the operating system scheduler's run-queue or priority-inheritance locks, the deferred quiescent-state processing performed as a result of the non-lock-acquiring wakeup request including rescheduling the target computer task to produce a local context switch that results in the deferred quiescent state being reported.

### Claim 6 (depends on 5)

The method of claim 5, wherein the non-lock-acquiring wakeup request for deferred quiescent-state report processing that includes rescheduling the target computer task to produce a local context switch that results in the deferred quiescent state being reported is conditioned on the target computer task or its processor not blocking an expedited RCU grace period and the processor being a non-tickless processor that receives regular scheduling clock tick interrupts.

### Claim 7 (depends on 1)

The method of claim 1, wherein determining whether a previous deferred quiescent-state reporting request remains pending includes checking a deferred quiescent-state reporting indicator associated with the target computer task or a processor on which it runs.

### Claim 8

A system, comprising:
a plurality of processors;
a memory coupled to the processors, the memory including a computer readable storage medium tangibly embodying at least one program of instructions executable by the processors to perform operations comprising:
determining whether a deferred quiescent-state reporting request that defers the reporting of a read-copy update (RCU) quiescent state on behalf of a target computer task is warranted;
in response to the deferred quiescent-state reporting request being warranted, determining whether a previous deferred quiescent-state reporting request on behalf of the target computer task remains pending; and
issuing a request for deferred quiescent-state report processing that reports a deferred quiescent state, the request for deferred quiescent-state report processing being issued in a manner selected according to a result of the determining whether a previous deferred quiescent-state reporting request remains pending.

### Claim 9 (depends on 8)

The system of claim 8, wherein in response to there being no previous deferred quiescent-state reporting request on behalf of the target computer task that remains pending, issuing a lock-acquiring wakeup request for deferred quiescent-state report processing that reports a deferred quiescent state, the lock-acquiring wakeup request being implemented in a manner that acquires one or both of an operating system scheduler's run-queue or priority-inheritance locks, the deferred quiescent-state report processing performed as a result of the lock-acquiring wakeup request including either kernel thread processing or softirq processing.

### Claim 10 (depends on 8)

The system of claim 8, wherein in response to there being a previous deferred quiescent-state reporting request on behalf of the target computer task that remains pending, issuing a non-lock-acquiring wakeup request for deferred quiescent-state report processing that reports a deferred quiescent state, the non-lock-acquiring wakeup request being implemented in a manner that does not acquire the operating system scheduler's run-queue or priority-inheritance locks, the deferred quiescent-state report processing performed as a result of the non-lock-acquiring wakeup request including softirq processing.

### Claim 11 (depends on 10)

The system of claim 10, wherein the non-lock-acquiring wakeup request for deferred quiescent-state-report softirq processing is conditioned on the method being performed by an interrupt handler running as a result of the target computer task being interrupted.

### Claim 12 (depends on 8)

The system of claim 8, wherein in response to there being a previous deferred quiescent-state reporting request on behalf of the target computer task that remains pending, issuing a non-lock-acquiring wakeup request for deferred quiescent-state report processing, the non-lock-acquiring wakeup request being implemented in a manner that does not acquire the operating system scheduler's run-queue or priority-inheritance locks, the deferred quiescent-state processing performed as a result of the non-lock-acquiring wakeup request including rescheduling the target computer task to produce a local context switch that results in the deferred quiescent state being reported.

### Claim 13 (depends on 12)

The system of claim 12, wherein the non-lock-acquiring wakeup request for deferred quiescent-state report processing that includes rescheduling the target computer task to produce a local context switch that results in the deferred quiescent state being reported is conditioned on the target computer task or its processor not blocking an expedited RCU grace period and the processor being a non-tickless processor that receives regular scheduling clock tick interrupts.

### Claim 14 (depends on 8)

The system of claim 8, wherein determining whether a previous deferred quiescent-state reporting request remains pending includes checking a deferred quiescent-state reporting indicator associated with the target computer task or a processor on which it runs.

### Claim 15

A computer program product, comprising:
one or more 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 processors to perform operations comprising:
determining whether a deferred quiescent-state reporting request that defers the reporting of a read-copy update (RCU) quiescent state on behalf of a target computer task is warranted;
in response to the deferred quiescent-state reporting request being warranted, determining whether a previous deferred quiescent-state reporting request on behalf of the target computer task remains pending; and
issuing a request for deferred quiescent-state report processing that reports a deferred quiescent state, the request for deferred quiescent-state report processing being issued in a manner selected according to a result of the determining whether a previous deferred quiescent-state reporting request remains pending.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein in response to there being no previous deferred quiescent-state reporting request on behalf of the target computer task that remains pending, issuing a lock-acquiring wakeup request for deferred quiescent-state report processing that reports a deferred quiescent state, the lock-acquiring wakeup request being implemented in a manner that acquires one or both of an operating system scheduler's run-queue or priority-inheritance locks, the deferred quiescent-state report processing performed as a result of the lock-acquiring wakeup request including either kernel thread processing or softirq processing.

### Claim 17 (depends on 15)

The computer program product of claim 15, wherein in response to there being a previous deferred quiescent-state reporting request on behalf of the target computer task that remains pending, issuing a non-lock-acquiring wakeup request for deferred quiescent-state report processing that reports a deferred quiescent state, the non-lock-acquiring wakeup request being implemented in a manner that does not acquire the operating system scheduler's run-queue or priority-inheritance locks, the deferred quiescent-state report processing performed as a result of the non-lock-acquiring wakeup request including softirq processing.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein the non-lock-acquiring wakeup request for deferred quiescent-state-report softirq processing is conditioned on the method being performed by an interrupt handler running as a result of the target computer task being interrupted.

### Claim 19 (depends on 15)

The computer program product of claim 15, wherein in response to there being a previous deferred quiescent-state reporting request on behalf of the target computer task that remains pending, issuing a non-lock-acquiring wakeup request for deferred quiescent-state report processing, the non-lock-acquiring wakeup request being implemented in a manner that does not acquire the operating system scheduler's run-queue or priority-inheritance locks, the deferred quiescent-state processing performed as a result of the non-lock-acquiring wakeup request including rescheduling the target computer task to produce a local context switch that results in the deferred quiescent state being reported.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein the non-lock-acquiring wakeup request for deferred quiescent-state report processing that includes rescheduling the target computer task to produce a local context switch that results in the deferred quiescent state being reported is conditioned on the target computer task or its processor not blocking an expedited RCU grace period and the processor being a non-tickless processor that receives regular scheduling clock tick interrupts.
