aboutsummaryrefslogtreecommitdiffstats
path: root/mm/interval_tree.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2017-07-10 15:49:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-10 16:32:32 -0700
commitf07e0f849a921ec8c0b509c8b8030455a2b21f7f (patch)
tree5b3a6a4174700b917bdfe5f31eac21ec4f9f9909 /mm/interval_tree.c
parentmm/page_alloc.c: eliminate unsigned confusion in __rmqueue_fallback (diff)
downloadlinux-dev-f07e0f849a921ec8c0b509c8b8030455a2b21f7f.tar.xz
linux-dev-f07e0f849a921ec8c0b509c8b8030455a2b21f7f.zip
mm/swap_slots.c: don't disable preemption while taking the per-CPU cache
get_cpu_var() disables preemption and returns the per-CPU version of the variable. Disabling preemption is useful to ensure atomic access to the variable within the critical section. In this case however, after the per-CPU version of the variable is obtained the ->free_lock is acquired. For that reason it seems the raw accessor could be used. It only seems that ->slots_ret should be retested (because with disabled preemption this variable can not be set to NULL otherwise). This popped up during PREEMPT-RT testing because it tries to take spinlocks in a preempt disabled section. In RT, spinlocks can sleep. Link: http://lkml.kernel.org/r/20170623114755.2ebxdysacvgxzott@linutronix.de Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ying Huang <ying.huang@intel.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/interval_tree.c')
0 files changed, 0 insertions, 0 deletions