KernelNewbies:

There are a number of possible projects surrounding RCU, with varying levels and types of challenges. Here they are!

TableOfContents(2)

What Is RCU?

Automatically Locate RCU Abuses

Create Coccinelle scripts or use other tools to automatically detect abuses of RCU, and provide fixes for any bugs found. Candidate bugs include:

  1. Mismatch between read-side protection and grace period.

Inline __rcu_read_lock()

The rcu_read_lock() function is currently located in kernel/rcu/update.c is an ideal candidate for inlining. Except for one thing, namely that exporting include/linux/sched.h's task_struct to every file that needs rcu_read_lock() results in very ugly circular include-file dependencies. The goal is therefore to get rid of these circular dependencies. There are two known approaches:

  1. Replace a few key inline functions with C-preprocessor macros. These functions are identified by doing randconfig builds of the kernel and fixing issues as they arise.
  2. Split the data structure definitions out into a parallel set of include files. This approach is in some sense cleaner than replacing inline functions with C-preprocessor macros, but requires careful handling of conflicting patches that are affected by the wholesale changes.

Add kmem_cache_free_rcu()

Validate RCU Algorithms

Decrease RCU/Scheduler Entanglement

Automate Testing of RCU CPU Stall Warnings

Port RCU's KVM Scripts

Miscellaneous Fixes to RCU

  1. Remove "extern" from function declarations in include/linux/*rcu*.h and kernel/rcu/*.h files.
  2. The code protected by CONFIG_NO_HZ_FULL_SYSIDLE introduced a new pointer rcu_sysidle_state that references either rcu_preempt_state or rcu_sched_state. Remove this variable and replace it with the rcu_state pointer that has identical definitions earlier in kernel/rcu/tree_plugin.h.
  3. Protect uses of ->jiffies_stall with ACCESS_ONCE().

  4. Review rcu_torture_shuffle_tasks() in kernel/rcu/torture.c. If it turns out to be able to pass all-zero cpumasks to set_cpus_allowed_ptr(), fix this bug.
  5. Check to see whether the rcu_data structure's ->preemptible field is unused. If so, remove it.

  6. Exercise RCU's debugfs tracing, and fix any bugs in either the implementation or the documentation. The debugfs tracing is normally located in /sys/kernel/debug/rcu, and the documentation is in Documentation/RCU/trace.txt.
  7. Add event tracing to dyntick_save_progress_counter() in the case where it returns 1. See calls to trace_rcu_fqs() in rcu_implicit_dynticks_qs() for a template.
  8. Look for and fix any kernel/rcu/torture.c printing that is subject to buffer overflow (but note that Gang Chen already fixed the SRCU printing).
  9. Compare the dmesg output of rcutorture runs to Documentation/RCU/torture.txt and fix any mismatches.

KernelNewbies: OPWIntro-RCU (last edited 2013-11-08 22:40:56 by PaulMcKenney)