11 May, 2010

11 commits

  • TINY_RCU does not need rcu_scheduler_active unless CONFIG_DEBUG_LOCK_ALLOC.
    So conditionally compile rcu_scheduler_active in order to slim down
    rcutiny a bit more. Also gets rid of an EXPORT_SYMBOL_GPL, which is
    responsible for most of the slimming.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • The addition of preemptible RCU to treercu resulted in a bit of
    confusion and inefficiency surrounding the handling of context switches
    for RCU-sched and for RCU-preempt. For RCU-sched, a context switch
    is a quiescent state, pure and simple, just like it always has been.
    For RCU-preempt, a context switch is in no way a quiescent state, but
    special handling is required when a task blocks in an RCU read-side
    critical section.

    However, the callout from the scheduler and the outer loop in ksoftirqd
    still calls something named rcu_sched_qs(), whose name is no longer
    accurate. Furthermore, when rcu_check_callbacks() notes an RCU-sched
    quiescent state, it ends up unnecessarily (though harmlessly, aside
    from the performance hit) enqueuing the current task if it happens to
    be running in an RCU-preempt read-side critical section. This not only
    increases the maximum latency of scheduler_tick(), it also needlessly
    increases the overhead of the next outermost rcu_read_unlock() invocation.

    This patch addresses this situation by separating the notion of RCU's
    context-switch handling from that of RCU-sched's quiescent states.
    The context-switch handling is covered by rcu_note_context_switch() in
    general and by rcu_preempt_note_context_switch() for preemptible RCU.
    This permits rcu_sched_qs() to handle quiescent states and only quiescent
    states. It also reduces the maximum latency of scheduler_tick(), though
    probably by much less than a microsecond. Finally, it means that tasks
    within preemptible-RCU read-side critical sections avoid incurring the
    overhead of queuing unless there really is a context switch.

    Suggested-by: Lai Jiangshan
    Acked-by: Lai Jiangshan
    Signed-off-by: Paul E. McKenney
    Cc: Ingo Molnar
    Cc: Peter Zijlstra

    Paul E. McKenney
     
  • Make naming line up in preparation for CONFIG_TINY_PREEMPT_RCU.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Because synchronize_rcu_bh() is identical to synchronize_sched(),
    make the former a static inline invoking the latter, saving the
    overhead of an EXPORT_SYMBOL_GPL() and the duplicate code.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • The rcu_scheduler_active check has been wrapped into the new
    debug_lockdep_rcu_enabled() function, so update the comments to
    reflect this new reality.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • It is CONFIG_DEBUG_LOCK_ALLOC rather than CONFIG_PROVE_LOCKING, so fix it.

    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • Offline CPUs are not in nohz_cpu_mask, but can be ignored when checking
    for the last non-dyntick-idle CPU. This patch therefore only checks
    online CPUs for not being dyntick idle, allowing fast entry into
    full-system dyntick-idle state even when there are some offline CPUs.

    Signed-off-by: Lai Jiangshan
    Signed-off-by: Paul E. McKenney

    Lai Jiangshan
     
  • Shrink the RCU_INIT_FLAVOR() macro by moving all but the initialization
    of the ->rda[] array to rcu_init_one(). The call to rcu_init_one()
    can then be moved to the end of the RCU_INIT_FLAVOR() macro, which is
    required because rcu_boot_init_percpu_data(), which is now called from
    rcu_init_one(), depends on the initialization of the ->rda[] array.

    Signed-off-by: Lai Jiangshan
    Signed-off-by: Paul E. McKenney

    Lai Jiangshan
     
  • cleanup: make dead code really dead

    Signed-off-by: Lai Jiangshan
    Signed-off-by: Paul E. McKenney

    Lai Jiangshan
     
  • This patch adds a check to __rcu_pending() that does a local
    set_need_resched() if the current CPU is holding up the current grace
    period and if force_quiescent_state() will be called soon. The goal is
    to reduce the probability that force_quiescent_state() will need to do
    smp_send_reschedule(), which sends an IPI and is therefore more expensive
    on most architectures.

    Signed-off-by: "Paul E. McKenney"

    Paul E. McKenney
     
  • There is no need to disable lockdep after an RCU lockdep splat,
    so remove the debug_lockdeps_off() from lockdep_rcu_dereference().
    To avoid repeated lockdep splats, use a static variable in the inlined
    rcu_dereference_check() and rcu_dereference_protected() macros so that
    a given instance splats only once, but so that multiple instances can
    be detected per boot.

    This is controlled by a new config variable CONFIG_PROVE_RCU_REPEATEDLY,
    which is disabled by default. This provides the normal lockdep behavior
    by default, but permits people who want to find multiple RCU-lockdep
    splats per boot to easily do so.

    Requested-by: Eric Paris
    Signed-off-by: Lai Jiangshan
    Tested-by: Eric Paris
    Signed-off-by: Paul E. McKenney

    Lai Jiangshan
     

10 May, 2010

3 commits

  • Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
    [SCSI] Retry commands with UNIT_ATTENTION sense codes to fix ext3/ext4 I/O error
    [SCSI] Enable retries for SYNCRONIZE_CACHE commands to fix I/O error
    [SCSI] scsi_debug: virtual_gb ignores sector_size
    [SCSI] libiscsi: regression: fix header digest errors
    [SCSI] fix locking around blk_abort_request()
    [SCSI] advansys: fix narrow board error path

    Linus Torvalds
     
  • commit 672917dcc78 ("cpuidle: menu governor: reduce latency on exit")
    added an optimization, where the analysis on the past idle period moved
    from the end of idle, to the beginning of the new idle.

    Unfortunately, this optimization had a bug where it zeroed one key
    variable for new use, that is needed for the analysis. The fix is
    simple, zero the variable after doing the work from the previous idle.

    During the audit of the code that found this issue, another issue was
    also found; the ->measured_us data structure member is never set, a
    local variable is always used instead.

    Signed-off-by: Arjan van de Ven
    Cc: Corrado Zoccolo
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

08 May, 2010

9 commits


07 May, 2010

17 commits