bheap: Add bheap_for_each()

Extend bheap to apply a generic function to all nodes in a bheap.
Beware that the function is recursive, so this should only be
called in cases where the bheap is known to be limited in size.
Otherwise, the stack could get overrun.
binheap: Add binheap_for_each().

Add method to apply a function to every node in
a binary heap. Beware that the function is recursive,
so the function should only be called when the heap
is known to be limited in size. Otherwise, there is a
danger of running out of stack space.
hrtimer: Ignore hrtimer requeue when not in CB.

This patch removes a BUG_ON in the hrtimer root
callback. Allows the hook to be called when
not actually in the callback state. A BUG_ON
forbid this state when a timer needed to be
rearmed. Instead, we just ignore the rearm
gracefully.

This feature is needed for budget enforcement
under bandwidth-inheritance.
NEW: Recurisve spinlocks.

Add implementation of recursive spinlocks. Allows
the same CPU to take, and retake, the same spinlock.
The recursive spinlock still counts the number of times
it's been taken, so every lock() must still be matched
with an unlock().

Although ugly, recursive spinlocks make nested priority
inheritance propagation (and esp. nested 'un-'inheritance
under bandwidth inheritance) much easier to implement.
Bring in all of GPUSync Kconfig.

Patch brings in all the Kconfig options needed
by GPUSync. It would be nice to have this broken
up into a series patches, but that would take quite
a lot of work.
Extend sched_plugin API for GPUSync.

Patch adds new interfaces to the sched_plugin struct/API.
New interfaces expose task prioritization and inheritance
routines of a scheduler to external components. For example,
a single locking protocol implementation can support both FIFO
and EDF prioritization via this API ("litmus->compare(a, b)").
Update core locking components.

Extends the core parts of locking protocols in Litmus.
* Adds dynamic group lock interface (internal and sys calls).
* Adds helper functions for waking tasks.
* Adds tracing for these new features.
Add nest- and dgl-supporting FIFO and PRIOQ locks.

This patch adds a FIFO and PRIOQ mutex. These locks
support nesting and DGLs.
Add k-exclusion affinity observer infra.

Adds interfaces for k-exclusion affinity
observers. Observers are created in the
same manner as locks (via FDSO operations).
Add kfmlp.

Adds an implementation of the kfmlp.  Supports affinity, but
not nesting.
Add ikglp.

Adds an implementation of the ikglp.  Supports both affinity and
nesting of other locks within the ikglp (the ikglp itself must
be an outer-most lock).
Add fdso handles for fifo, prioq, kfmlp, and ikglp

Add the fdso identifiers needed for userspace to create
instances of the fifo, prioq, kfmlp, and ikglp semaphores.
Add core nvidia GPU ownership components.

Adds two major components to GPU management (for NVIDIA
GPUs): (1) Routines to extract device ID from NVIDIA tasklet
private data. (2) Routines for tracking ownership/assignment
of tasks to GPUs.
Add GPU affinity tracking.

Adds GPU affinity tracking/prediction routines. Tracking
uses a process-chart method whereby observations over two
standard deviations below or above the average are discarded.
Add klmirqd interrupt handling (w/ GPU support)

This patch adds klmirqd, which can be used to implement
real-time threaded interrupt handling and workqueue
handling. Patch includes added hooks into Linux's
interrrupt/tasklet/workqueue implementations.

This patch also includes interrupt handling and work
queue handling for GPU tasklets and work_structs.
Add auxiliary task support.

Auxiliary tasks helper threads to real-time tasks. These helper
tasks may inherit the priority of the real-time task(s) in the
process only if that real-time task is blocked/suspended (and it
is not suspending because the job has completed). Otherwise,
these threads are scheduled with a default priority greater than
normal Linux threads, but lower than any other real-time task, including
klmirqd threads.
Clean up locking.c

Clean up formatting in locking.c
Add more robust budget tracking/enforcement.

This patch adds more feature-rich budget tracking/enforcement
features. Budget tracking is now controlled by a state machine.
Each task can elect to use a different budget policy. Hooks
are in place to implement bandwidth inheritance (BWI) and
virtually exclusive resources.
Add gpusync syscalls to arch syscall tables.

Earlier patches forgot to update the arch-specific syscall
tables. That is done here.
Misc. integration fixes to litmus.c

This patch updates litmus.c to integrate prior GPUSync
patches. Fixes include:
1) klmirqd-aware plugin switching
2) sched_trace event injection from user space
3) proper (re-)initialization of GPUSync data structures in task_struct