1. 25 Nov, 2019 1 commit
    • Dennis Zhou's avatar
      Revert "percpu: add __percpu to SHIFT_PERCPU_PTR" · ba30e274
      Dennis Zhou authored
      This reverts commit 825dbc6f.
      
      I mistakenly applied this and only now have thought about it a little
      more and had time to evaluate a kbuild error for dmaengine.
      
      Once we're calling RELOC_HIDE, we're moving back into the __kernel
      address space and letting users interact with the actual memory address
      rather than in __percpu which is before adding the offsets.
      Signed-off-by: default avatarDennis Zhou <dennis@kernel.org>
      ba30e274
  2. 17 Nov, 2019 1 commit
    • Sebastian Andrzej Siewior's avatar
      percpu-refcount: Use normal instead of RCU-sched" · 9e8d42a0
      Sebastian Andrzej Siewior authored
      This is a revert of commit
         a4244454 ("percpu-refcount: use RCU-sched insted of normal RCU")
      
      which claims the only reason for using RCU-sched is
         "rcu_read_[un]lock() … are slightly more expensive than preempt_disable/enable()"
      
      and
          "As the RCU critical sections are extremely short, using sched-RCU
          shouldn't have any latency implications."
      
      The problem with using RCU-sched here is that it disables preemption and
      the release callback (called from percpu_ref_put_many()) must not
      acquire any sleeping locks like spinlock_t. This breaks PREEMPT_RT
      because some of the users acquire spinlock_t locks in their callbacks.
      
      Using rcu_read_lock() on PREEMPTION=n kernels is not any different
      compared to rcu_read_lock_sched(). On PREEMPTION=y kernels there are
      already performance issues due to additional preemption points.
      Looking at the code, the rcu_read_lock() is just an increment and unlock
      is almost just a decrement unless there is something special to do. Both
      are functions while disabling preemption is inlined.
      Doing a small benchmark, the minimal amount of time required was mostly
      the same. The average time required was higher due to the higher MAX
      value (which could be preemption). With DEBUG_PREEMPT=y it is
      rcu_read_lock_sched() that takes a little longer due to the additional
      debug code.
      
      Convert back to normal RCU.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarDennis Zhou <dennis@kernel.org>
      9e8d42a0
  3. 17 Oct, 2019 1 commit
    • Ben Dooks's avatar
      percpu: add __percpu to SHIFT_PERCPU_PTR · 825dbc6f
      Ben Dooks authored
      The SHIFT_PERCPU_PTR() returns a pointer used by a number
      of functions that expect the pointer to be __percpu annotated
      (sparse address space 3). Adding __percpu to this makes the
      following sparse warnings go away.
      
      Note, this then creates the problem the __percup is marked
      as noderef, which may need removing for some of the internal
      functions, or to remove other warnings.
      
      mm/vmstat.c:385:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:385:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:385:13:    got signed char *
      mm/vmstat.c:385:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:385:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:385:13:    got signed char *
      mm/vmstat.c:385:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:385:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:385:13:    got signed char *
      mm/vmstat.c:385:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:385:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:385:13:    got signed char *
      mm/vmstat.c:401:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:401:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:401:13:    got signed char *
      mm/vmstat.c:401:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:401:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:401:13:    got signed char *
      mm/vmstat.c:401:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:401:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:401:13:    got signed char *
      mm/vmstat.c:401:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:401:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:401:13:    got signed char *
      mm/vmstat.c:429:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:429:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:429:13:    got signed char *
      mm/vmstat.c:429:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:429:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:429:13:    got signed char *
      mm/vmstat.c:429:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:429:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:429:13:    got signed char *
      mm/vmstat.c:429:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:429:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:429:13:    got signed char *
      mm/vmstat.c:445:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:445:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:445:13:    got signed char *
      mm/vmstat.c:445:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:445:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:445:13:    got signed char *
      mm/vmstat.c:445:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:445:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:445:13:    got signed char *
      mm/vmstat.c:445:13: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:445:13:    expected signed char [noderef] [usertype] <asn:3> *__p
      mm/vmstat.c:445:13:    got signed char *
      mm/vmstat.c:763:29: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:763:29:    expected signed char [noderef] <asn:3> *__p
      mm/vmstat.c:763:29:    got signed char *
      mm/vmstat.c:763:29: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:763:29:    expected signed char [noderef] <asn:3> *__p
      mm/vmstat.c:763:29:    got signed char *
      mm/vmstat.c:763:29: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:763:29:    expected signed char [noderef] <asn:3> *__p
      mm/vmstat.c:763:29:    got signed char *
      mm/vmstat.c:763:29: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:763:29:    expected signed char [noderef] <asn:3> *__p
      mm/vmstat.c:763:29:    got signed char *
      mm/vmstat.c:825:29: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:825:29:    expected signed char [noderef] <asn:3> *__p
      mm/vmstat.c:825:29:    got signed char *
      mm/vmstat.c:825:29: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:825:29:    expected signed char [noderef] <asn:3> *__p
      mm/vmstat.c:825:29:    got signed char *
      mm/vmstat.c:825:29: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:825:29:    expected signed char [noderef] <asn:3> *__p
      mm/vmstat.c:825:29:    got signed char *
      mm/vmstat.c:825:29: warning: incorrect type in initializer (different address spaces)
      mm/vmstat.c:825:29:    expected signed char [noderef] <asn:3> *__p
      mm/vmstat.c:825:29:    got signed char *
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarDennis Zhou <dennis@kernel.org>
      825dbc6f
  4. 13 Oct, 2019 16 commits
  5. 12 Oct, 2019 21 commits