1. 13 11月, 2018 11 次提交
    • P
    • P
      rcu: Avoid signed integer overflow in rcu_preempt_deferred_qs() · 5f1a6ef3
      Paul E. McKenney 提交于
      Subtracting INT_MIN can be interpreted as unconditional signed integer
      overflow, which according to the C standard is undefined behavior.
      Therefore, kernel build arguments notwithstanding, it would be good to
      future-proof the code.  This commit therefore substitutes INT_MAX for
      INT_MIN in order to avoid undefined behavior.
      
      While in the neighborhood, this commit also creates some meaningful names
      for INT_MAX and friends in order to improve readability, as suggested
      by Joel Fernandes.
      Reported-by: NRan Rozenstein <ranro@mellanox.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.ibm.com>
      5f1a6ef3
    • P
      rcu: Replace this_cpu_ptr() with __this_cpu_read() · 117f683c
      Paul E. McKenney 提交于
      Because __this_cpu_read() can be lighter weight than equivalent uses of
      this_cpu_ptr(), this commit replaces the latter with the former.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.ibm.com>
      117f683c
    • P
      rcu: Speed up expedited GPs when interrupting RCU reader · 05f41571
      Paul E. McKenney 提交于
      In PREEMPT kernels, an expedited grace period might send an IPI to a
      CPU that is executing an RCU read-side critical section.  In that case,
      it would be nice if the rcu_read_unlock() directly interacted with the
      RCU core code to immediately report the quiescent state.  And this does
      happen in the case where the reader has been preempted.  But it would
      also be a nice performance optimization if immediate reporting also
      happened in the preemption-free case.
      
      This commit therefore adds an ->exp_hint field to the task_struct structure's
      ->rcu_read_unlock_special field.  The IPI handler sets this hint when
      it has interrupted an RCU read-side critical section, and this causes
      the outermost rcu_read_unlock() call to invoke rcu_read_unlock_special(),
      which, if preemption is enabled, reports the quiescent state immediately.
      If preemption is disabled, then the report is required to be deferred
      until preemption (or bottom halves or interrupts or whatever) is re-enabled.
      
      Because this is a hint, it does nothing for more complicated cases.  For
      example, if the IPI interrupts an RCU reader, but interrupts are disabled
      across the rcu_read_unlock(), but another rcu_read_lock() is executed
      before interrupts are re-enabled, the hint will already have been cleared.
      If you do crazy things like this, reporting will be deferred until some
      later RCU_SOFTIRQ handler, context switch, cond_resched(), or similar.
      Reported-by: NJoel Fernandes <joel@joelfernandes.org>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.ibm.com>
      Acked-by: NJoel Fernandes (Google) <joel@joelfernandes.org>
      05f41571
    • P
      rcu: Trace end of grace period before end of grace period · 0a89e5a4
      Paul E. McKenney 提交于
      Currently, rcu_gp_cleanup() traces the end of the old grace period after
      the old grace period has officially ended.  This might make intuitive
      sense, but it also makes for confusing event-trace output because the
      "end" trace displays not the old but instead the new grace-period number.
      This commit therefore traces the end of an old grace period just before
      that grace period officially ends.
      Reported-by: NAravinda Prasad <aravinda@linux.vnet.ibm.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.ibm.com>
      0a89e5a4
    • Z
      rcu: Adjust the comment of function rcu_is_watching · 2320bda2
      Zhouyi Zhou 提交于
      Because RCU avoids interrupting idle CPUs, rcu_is_watching() is used to
      test whether or not it is currently legal to run RCU read-side critical
      sections on this CPU.  However, the first sentence and last sentences
      of current comment for rcu_is_watching have opposite meaning of what
      is expected.  This commit therefore fixes this header comment.
      Signed-off-by: NZhouyi Zhou <zhouzhouyi@gmail.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.ibm.com>
      2320bda2
    • P
      rcu: Add jiffies-since-GP-activity to show_rcu_gp_kthreads() · c669c014
      Paul E. McKenney 提交于
      This commit adds a printout of the number of jiffies since the last time
      that the RCU grace-period kthread did any processing.  This can be useful
      when tracking down forward-progress issues.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.ibm.com>
      c669c014
    • P
      rcu: Add state name to show_rcu_gp_kthreads() output · 69196019
      Paul E. McKenney 提交于
      This commit adds the name of the RCU grace-period state to
      the show_rcu_gp_kthreads() output in order to ease debugging.
      This commit also moves gp_state_getname() up in the code so that
      show_rcu_gp_kthreads() can use it.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.ibm.com>
      69196019
    • P
      rcu: Parameterize rcu_check_gp_start_stall() · 791416c4
      Paul E. McKenney 提交于
      In order to debug forward-progress stalls, it is necessary to check
      for excessively delayed grace-period starts.  This is currently done
      for RCU CPU stall warnings by rcu_check_gp_start_stall(), which checks
      to see if the start of a requested grace period has been delayed by an
      RCU CPU stall warning period.  Because rcutorture will need to check
      for the time consumed by an RCU forward-progress delay, this commit
      promotes gpssdelay from a local variable to a formal parameter.  It is
      not necessary to export rcu_check_gp_start_stall() because rcutorture
      will access it via a wrapper function.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.ibm.com>
      791416c4
    • P
      rcu: Avoid double multiply by HZ · b3c1d9ec
      Paul E. McKenney 提交于
      The rcu_check_gp_start_stall() function multiplies the return value
      from rcu_jiffies_till_stall_check() by HZ, but the units are already
      in jiffies.  This commit therefore avoids the need for introduction of
      a jiffies-squared unit by removing the extraneous multiplication.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.ibm.com>
      b3c1d9ec
    • P
      MAINTAINERS: Update from @linux.vnet.ibm.com to @linux.ibm.com · 1dfddcdb
      Paul E. McKenney 提交于
      IBM's patch-friendly email infrastructure is changing domains from
      @linux.vnet.ibm.com to @linux.ibm.com, which if nothing else might
      save a bit of typing.  This commit therefore updates us stragglers'
      email addresses in the MAINTAINERS file.  The old addresses are
      expected to continue to work for a few more months.
      
      While in the neighborhood, remove some obsolete entries, which results
      in an orphaned subsystem: "JSM Neo PCI based serial card".
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Douglas Miller <dougmill@linux.ibm.com>
      Cc: Eddie James <eajames@linux.ibm.com>
      Cc: Frank Haverkamp <haver@linux.ibm.com>
      Cc: Frederic Barrat <fbarrat@linux.ibm.com>
      Cc: John Allen <jallen@linux.ibm.com>
      Cc: Manoj N. Kumar <manoj@linux.ibm.com>
      Cc: Matthew R. Ochs <mrochs@linux.ibm.com>
      Cc: Michael Cyr <mikecyr@linux.ibm.com>
      Cc: Naveen N. Rao <naveen.n.rao@linux.ibm.com>
      Cc: Paulo Flabiano Smorigo <pfsmorigo@linux.ibm.com>
      Cc: Philip Kelleher <pjk1939@linux.ibm.com>
      Cc: Steven Royer <seroyer@linux.ibm.com>
      Cc: Thomas Falcon <tlfalcon@linux.ibm.com>
      Cc: Tyrel Datwyler <tyreld@linux.ibm.com>
      Cc: Uma Krishnan <ukrishn@linux.ibm.com>
      Acked-by: NJames Bottomley <jejb@linux.ibm.com>
      Acked-by: NMimi Zohar <zohar@linux.ibm.com>
      1dfddcdb
  2. 12 11月, 2018 1 次提交
    • P
      rcu: Stop expedited grace periods from relying on stop-machine · 9cac83a5
      Paul E. McKenney 提交于
      The CPU-selection code in sync_rcu_exp_select_cpus() disables preemption
      to prevent the cpu_online_mask from changing.  However, this relies on
      the stop-machine mechanism in the CPU-hotplug offline code, which is not
      desirable (it would be good to someday remove the stop-machine mechanism).
      
      This commit therefore instead uses the relevant leaf rcu_node structure's
      ->ffmask, which has a bit set for all CPUs that are fully functional.
      A given CPU's bit is cleared very early during offline processing by
      rcutree_offline_cpu() and set very late during online processing by
      rcutree_online_cpu().  Therefore, if a CPU's bit is set in this mask, and
      preemption is disabled, we have to be before the synchronize_sched() in
      the CPU-hotplug offline code, which means that the CPU is guaranteed to be
      workqueue-ready throughout the duration of the enclosing preempt_disable()
      region of code.
      
      This also has the side-effect of using WORK_CPU_UNBOUND if all the CPUs for
      this leaf rcu_node structure are offline, which is an acceptable difference
      in behavior.
      Reported-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      9cac83a5
  3. 05 11月, 2018 5 次提交
    • L
      Linux 4.20-rc1 · 65102238
      Linus Torvalds 提交于
      65102238
    • L
      Merge tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs · 42bd06e9
      Linus Torvalds 提交于
      Pull UBIFS updates from Richard Weinberger:
      
       - Full filesystem authentication feature, UBIFS is now able to have the
         whole filesystem structure authenticated plus user data encrypted and
         authenticated.
      
       - Minor cleanups
      
      * tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs: (26 commits)
        ubifs: Remove unneeded semicolon
        Documentation: ubifs: Add authentication whitepaper
        ubifs: Enable authentication support
        ubifs: Do not update inode size in-place in authenticated mode
        ubifs: Add hashes and HMACs to default filesystem
        ubifs: authentication: Authenticate super block node
        ubifs: Create hash for default LPT
        ubfis: authentication: Authenticate master node
        ubifs: authentication: Authenticate LPT
        ubifs: Authenticate replayed journal
        ubifs: Add auth nodes to garbage collector journal head
        ubifs: Add authentication nodes to journal
        ubifs: authentication: Add hashes to index nodes
        ubifs: Add hashes to the tree node cache
        ubifs: Create functions to embed a HMAC in a node
        ubifs: Add helper functions for authentication support
        ubifs: Add separate functions to init/crc a node
        ubifs: Format changes for authentication support
        ubifs: Store read superblock node
        ubifs: Drop write_node
        ...
      42bd06e9
    • L
      Merge tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 4710e789
      Linus Torvalds 提交于
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Bugfix:
         - Fix build issues on architectures that don't provide 64-bit cmpxchg
      
        Cleanups:
         - Fix a spelling mistake"
      
      * tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: fix spelling mistake, EACCESS -> EACCES
        SUNRPC: Use atomic(64)_t for seq_send(64)
      4710e789
    • L
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 35e74524
      Linus Torvalds 提交于
      Pull more timer updates from Thomas Gleixner:
       "A set of commits for the new C-SKY architecture timers"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        dt-bindings: timer: gx6605s SOC timer
        clocksource/drivers/c-sky: Add gx6605s SOC system timer
        dt-bindings: timer: C-SKY Multi-processor timer
        clocksource/drivers/c-sky: Add C-SKY SMP timer
      35e74524
    • L
      Merge tag 'ntb-4.20' of git://github.com/jonmason/ntb · 04578e84
      Linus Torvalds 提交于
      Pull NTB updates from Jon Mason:
       "Fairly minor changes and bug fixes:
      
        NTB IDT thermal changes and hook into hwmon, ntb_netdev clean-up of
        private struct, and a few bug fixes"
      
      * tag 'ntb-4.20' of git://github.com/jonmason/ntb:
        ntb: idt: Alter the driver info comments
        ntb: idt: Discard temperature sensor IRQ handler
        ntb: idt: Add basic hwmon sysfs interface
        ntb: idt: Alter temperature read method
        ntb_netdev: Simplify remove with client device drvdata
        NTB: transport: Try harder to alloc an aligned MW buffer
        ntb: ntb_transport: Mark expected switch fall-throughs
        ntb: idt: Set PCIe bus address to BARLIMITx
        NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
        ntb: intel: fix return value for ndev_vec_mask()
        ntb_netdev: fix sleep time mismatch
      04578e84
  4. 04 11月, 2018 23 次提交