projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mm: replace __get_cpu_var uses with this_cpu_ptr
[cascardo/linux.git]
/
mm
/
memory-failure.c
diff --git
a/mm/memory-failure.c
b/mm/memory-failure.c
index
9ccef39
..
d50f17f
100644
(file)
--- a/
mm/memory-failure.c
+++ b/
mm/memory-failure.c
@@
-1298,7
+1298,7
@@
static void memory_failure_work_func(struct work_struct *work)
unsigned long proc_flags;
int gotten;
unsigned long proc_flags;
int gotten;
- mf_cpu =
&__get_cpu_var(
memory_failure_cpu);
+ mf_cpu =
this_cpu_ptr(&
memory_failure_cpu);
for (;;) {
spin_lock_irqsave(&mf_cpu->lock, proc_flags);
gotten = kfifo_get(&mf_cpu->fifo, &entry);
for (;;) {
spin_lock_irqsave(&mf_cpu->lock, proc_flags);
gotten = kfifo_get(&mf_cpu->fifo, &entry);
@@
-1664,11
+1664,7
@@
int soft_offline_page(struct page *page, int flags)
}
}
}
}
- /*
- * The lock_memory_hotplug prevents a race with memory hotplug.
- * This is a big hammer, a better would be nicer.
- */
- lock_memory_hotplug();
+ get_online_mems();
/*
* Isolate the page, so that it doesn't get reallocated if it
/*
* Isolate the page, so that it doesn't get reallocated if it
@@
-1679,7
+1675,7
@@
int soft_offline_page(struct page *page, int flags)
set_migratetype_isolate(page, true);
ret = get_any_page(page, pfn, flags);
set_migratetype_isolate(page, true);
ret = get_any_page(page, pfn, flags);
-
unlock_memory_hotplug
();
+
put_online_mems
();
if (ret > 0) { /* for in-use pages */
if (PageHuge(page))
ret = soft_offline_huge_page(page, flags);
if (ret > 0) { /* for in-use pages */
if (PageHuge(page))
ret = soft_offline_huge_page(page, flags);