1. 13 Aug, 2019 29 commits
  2. 12 Aug, 2019 5 commits
    • Andrea Parri's avatar
      MAINTAINERS: Update e-mail address for Andrea Parri · ba31ebfa
      Andrea Parri authored
      My @amarulasolutions.com address stopped working this July, so update
      to my @gmail.com address where you'll still be able to reach me.
      Signed-off-by: default avatarAndrea Parri <parri.andrea@gmail.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Will Deacon <will@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jade Alglave <j.alglave@ucl.ac.uk>
      Cc: Luc Maranget <luc.maranget@inria.fr>
      Cc: "Paul E. McKenney" <paulmck@linux.ibm.com>
      Cc: Akira Yokosawa <akiyks@gmail.com>
      Cc: Daniel Lustig <dlustig@nvidia.com>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      ba31ebfa
    • Mukesh Ojha's avatar
      rcu: Fix spelling mistake "greate"->"great" · 511b44f7
      Mukesh Ojha authored
      This commit fixes a spelling mistake in file tree_exp.h.
      Signed-off-by: default avatarMukesh Ojha <mojha@codeaurora.org>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      511b44f7
    • Paul E. McKenney's avatar
      arm: Use common outgoing-CPU-notification code · 1d5087ab
      Paul E. McKenney authored
      This commit removes the open-coded CPU-offline notification with new
      common code.  In particular, this change avoids calling scheduler code
      using RCU from an offline CPU that RCU is ignoring.  This is a minimal
      change.  A more intrusive change might invoke the cpu_check_up_prepare()
      and cpu_set_state_online() functions at CPU-online time, which would
      allow onlining throw an error if the CPU did not go offline properly.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
      1d5087ab
    • Paul E. McKenney's avatar
      rcu: Remove redundant "if" condition from rcu_gp_is_expedited() · b823cafa
      Paul E. McKenney authored
      Because rcu_expedited_nesting is initialized to 1 and not decremented
      until just before init is spawned, rcu_expedited_nesting is guaranteed
      to be non-zero whenever rcu_scheduler_active == RCU_SCHEDULER_INIT.
      This commit therefore removes this redundant "if" equality test.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      Reviewed-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
      b823cafa
    • Peter Zijlstra's avatar
      idle: Prevent late-arriving interrupts from disrupting offline · e78a7614
      Peter Zijlstra authored
      Scheduling-clock interrupts can arrive late in the CPU-offline process,
      after idle entry and the subsequent call to cpuhp_report_idle_dead().
      Once execution passes the call to rcu_report_dead(), RCU is ignoring
      the CPU, which results in lockdep complaints when the interrupt handler
      uses RCU:
      
      ------------------------------------------------------------------------
      
      =============================
      WARNING: suspicious RCU usage
      5.2.0-rc1+ #681 Not tainted
      -----------------------------
      kernel/sched/fair.c:9542 suspicious rcu_dereference_check() usage!
      
      other info that might help us debug this:
      
      RCU used illegally from offline CPU!
      rcu_scheduler_active = 2, debug_locks = 1
      no locks held by swapper/5/0.
      
      stack backtrace:
      CPU: 5 PID: 0 Comm: swapper/5 Not tainted 5.2.0-rc1+ #681
      Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS Bochs 01/01/2011
      Call Trace:
       <IRQ>
       dump_stack+0x5e/0x8b
       trigger_load_balance+0xa8/0x390
       ? tick_sched_do_timer+0x60/0x60
       update_process_times+0x3b/0x50
       tick_sched_handle+0x2f/0x40
       tick_sched_timer+0x32/0x70
       __hrtimer_run_queues+0xd3/0x3b0
       hrtimer_interrupt+0x11d/0x270
       ? sched_clock_local+0xc/0x74
       smp_apic_timer_interrupt+0x79/0x200
       apic_timer_interrupt+0xf/0x20
       </IRQ>
      RIP: 0010:delay_tsc+0x22/0x50
      Code: ff 0f 1f 80 00 00 00 00 65 44 8b 05 18 a7 11 48 0f ae e8 0f 31 48 89 d6 48 c1 e6 20 48 09 c6 eb 0e f3 90 65 8b 05 fe a6 11 48 <41> 39 c0 75 18 0f ae e8 0f 31 48 c1 e2 20 48 09 c2 48 89 d0 48 29
      RSP: 0000:ffff8f92c0157ed0 EFLAGS: 00000212 ORIG_RAX: ffffffffffffff13
      RAX: 0000000000000005 RBX: ffff8c861f356400 RCX: ffff8f92c0157e64
      RDX: 000000321214c8cc RSI: 00000032120daa7f RDI: 0000000000260f15
      RBP: 0000000000000005 R08: 0000000000000005 R09: 0000000000000000
      R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
      R13: 0000000000000000 R14: ffff8c861ee18000 R15: ffff8c861ee18000
       cpuhp_report_idle_dead+0x31/0x60
       do_idle+0x1d5/0x200
       ? _raw_spin_unlock_irqrestore+0x2d/0x40
       cpu_startup_entry+0x14/0x20
       start_secondary+0x151/0x170
       secondary_startup_64+0xa4/0xb0
      
      ------------------------------------------------------------------------
      
      This happens rarely, but can be forced by happen more often by
      placing delays in cpuhp_report_idle_dead() following the call to
      rcu_report_dead().  With this in place, the following rcutorture
      scenario reproduces the problem within a few minutes:
      
      tools/testing/selftests/rcutorture/bin/kvm.sh --cpus 8 --duration 5 --kconfig "CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_PROVE_LOCKING=y" --configs "TREE04"
      
      This commit uses the crude but effective expedient of moving the disabling
      of interrupts within the idle loop to precede the cpu_is_offline()
      check.  It also invokes tick_nohz_idle_stop_tick() instead of
      tick_nohz_idle_stop_tick_protected() to shut off the scheduling-clock
      interrupt.
      Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      [ paulmck: Revert tick_nohz_idle_stop_tick_protected() removal, new callers. ]
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      e78a7614
  3. 09 Aug, 2019 3 commits
  4. 01 Aug, 2019 3 commits
    • Paul E. McKenney's avatar
      rcutorture: Aggressive forward-progress tests shouldn't block shutdown · 60013d5d
      Paul E. McKenney authored
      The more aggressive forward-progress tests can interfere with rcutorture
      shutdown, resulting in false-positive diagnostics.  This commit therefore
      ends any such tests 30 seconds prior to shutdown.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      60013d5d
    • Joel Fernandes (Google)'s avatar
      rcuperf: Make rcuperf kernel test more robust for !expedited mode · 77e9752c
      Joel Fernandes (Google) authored
      It is possible that the rcuperf kernel test runs concurrently with init
      starting up.  During this time, the system is running all grace periods
      as expedited.  However, rcuperf can also be run for normal GP tests.
      Right now, it depends on a holdoff time before starting the test to
      ensure grace periods start later. This works fine with the default
      holdoff time however it is not robust in situations where init takes
      greater than the holdoff time to finish running. Or, as in my case:
      
      I modified the rcuperf test locally to also run a thread that did
      preempt disable/enable in a loop. This had the effect of slowing down
      init. The end result was that the "batches:" counter in rcuperf was 0
      causing a division by 0 error in the results. This counter was 0 because
      only expedited GPs seem to happen, not normal ones which led to the
      rcu_state.gp_seq counter remaining constant across grace periods which
      unexpectedly happen to be expedited. The system was running expedited
      RCU all the time because rcu_unexpedited_gp() would not have run yet
      from init.  In other words, the test would concurrently with init
      booting in expedited GP mode.
      
      To fix this properly, this commit waits until system_state is set to
      SYSTEM_RUNNING before starting the test.  This change is made just
      before kernel_init() invokes rcu_end_inkernel_boot(), and this latter
      is what turns off boot-time expediting of RCU grace periods.
      Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      77e9752c
    • Denis Efremov's avatar
      torture: Remove exporting of internal functions · 21f57546
      Denis Efremov authored
      The functions torture_onoff_cleanup() and torture_shuffle_cleanup()
      are declared static and marked EXPORT_SYMBOL_GPL(), which is at best an
      odd combination.  Because these functions are not used outside of the
      kernel/torture.c file they are defined in, this commit removes their
      EXPORT_SYMBOL_GPL() marking.
      
      Fixes: cc47ae08 ("rcutorture: Abstract torture-test cleanup")
      Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.ibm.com>
      21f57546