diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 10 | ||||
-rw-r--r-- | mm/memory-failure.c | 12 | ||||
-rw-r--r-- | mm/page_alloc.c | 4 |
3 files changed, 15 insertions, 11 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 3eed583895a6..9be3cf8a5da4 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -3587,9 +3587,13 @@ unlock: | |||
3587 | 3587 | ||
3588 | static void mem_cgroup_threshold(struct mem_cgroup *memcg) | 3588 | static void mem_cgroup_threshold(struct mem_cgroup *memcg) |
3589 | { | 3589 | { |
3590 | __mem_cgroup_threshold(memcg, false); | 3590 | while (memcg) { |
3591 | if (do_swap_account) | 3591 | __mem_cgroup_threshold(memcg, false); |
3592 | __mem_cgroup_threshold(memcg, true); | 3592 | if (do_swap_account) |
3593 | __mem_cgroup_threshold(memcg, true); | ||
3594 | |||
3595 | memcg = parent_mem_cgroup(memcg); | ||
3596 | } | ||
3593 | } | 3597 | } |
3594 | 3598 | ||
3595 | static int compare_thresholds(const void *a, const void *b) | 3599 | static int compare_thresholds(const void *a, const void *b) |
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 9c26eeca1342..757f6b0accfe 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -183,7 +183,7 @@ EXPORT_SYMBOL_GPL(hwpoison_filter); | |||
183 | * signal. | 183 | * signal. |
184 | */ | 184 | */ |
185 | static int kill_proc_ao(struct task_struct *t, unsigned long addr, int trapno, | 185 | static int kill_proc_ao(struct task_struct *t, unsigned long addr, int trapno, |
186 | unsigned long pfn) | 186 | unsigned long pfn, struct page *page) |
187 | { | 187 | { |
188 | struct siginfo si; | 188 | struct siginfo si; |
189 | int ret; | 189 | int ret; |
@@ -198,7 +198,7 @@ static int kill_proc_ao(struct task_struct *t, unsigned long addr, int trapno, | |||
198 | #ifdef __ARCH_SI_TRAPNO | 198 | #ifdef __ARCH_SI_TRAPNO |
199 | si.si_trapno = trapno; | 199 | si.si_trapno = trapno; |
200 | #endif | 200 | #endif |
201 | si.si_addr_lsb = PAGE_SHIFT; | 201 | si.si_addr_lsb = compound_order(compound_head(page)) + PAGE_SHIFT; |
202 | /* | 202 | /* |
203 | * Don't use force here, it's convenient if the signal | 203 | * Don't use force here, it's convenient if the signal |
204 | * can be temporarily blocked. | 204 | * can be temporarily blocked. |
@@ -235,7 +235,7 @@ void shake_page(struct page *p, int access) | |||
235 | int nr; | 235 | int nr; |
236 | do { | 236 | do { |
237 | nr = shrink_slab(1000, GFP_KERNEL, 1000); | 237 | nr = shrink_slab(1000, GFP_KERNEL, 1000); |
238 | if (page_count(p) == 0) | 238 | if (page_count(p) == 1) |
239 | break; | 239 | break; |
240 | } while (nr > 10); | 240 | } while (nr > 10); |
241 | } | 241 | } |
@@ -327,7 +327,7 @@ static void add_to_kill(struct task_struct *tsk, struct page *p, | |||
327 | * wrong earlier. | 327 | * wrong earlier. |
328 | */ | 328 | */ |
329 | static void kill_procs_ao(struct list_head *to_kill, int doit, int trapno, | 329 | static void kill_procs_ao(struct list_head *to_kill, int doit, int trapno, |
330 | int fail, unsigned long pfn) | 330 | int fail, struct page *page, unsigned long pfn) |
331 | { | 331 | { |
332 | struct to_kill *tk, *next; | 332 | struct to_kill *tk, *next; |
333 | 333 | ||
@@ -352,7 +352,7 @@ static void kill_procs_ao(struct list_head *to_kill, int doit, int trapno, | |||
352 | * process anyways. | 352 | * process anyways. |
353 | */ | 353 | */ |
354 | else if (kill_proc_ao(tk->tsk, tk->addr, trapno, | 354 | else if (kill_proc_ao(tk->tsk, tk->addr, trapno, |
355 | pfn) < 0) | 355 | pfn, page) < 0) |
356 | printk(KERN_ERR | 356 | printk(KERN_ERR |
357 | "MCE %#lx: Cannot send advisory machine check signal to %s:%d\n", | 357 | "MCE %#lx: Cannot send advisory machine check signal to %s:%d\n", |
358 | pfn, tk->tsk->comm, tk->tsk->pid); | 358 | pfn, tk->tsk->comm, tk->tsk->pid); |
@@ -928,7 +928,7 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn, | |||
928 | * any accesses to the poisoned memory. | 928 | * any accesses to the poisoned memory. |
929 | */ | 929 | */ |
930 | kill_procs_ao(&tokill, !!PageDirty(hpage), trapno, | 930 | kill_procs_ao(&tokill, !!PageDirty(hpage), trapno, |
931 | ret != SWAP_SUCCESS, pfn); | 931 | ret != SWAP_SUCCESS, p, pfn); |
932 | 932 | ||
933 | return ret; | 933 | return ret; |
934 | } | 934 | } |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a8cfa9cc6e86..f12ad1836abe 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -5182,9 +5182,9 @@ void *__init alloc_large_system_hash(const char *tablename, | |||
5182 | if (!table) | 5182 | if (!table) |
5183 | panic("Failed to allocate %s hash table\n", tablename); | 5183 | panic("Failed to allocate %s hash table\n", tablename); |
5184 | 5184 | ||
5185 | printk(KERN_INFO "%s hash table entries: %d (order: %d, %lu bytes)\n", | 5185 | printk(KERN_INFO "%s hash table entries: %ld (order: %d, %lu bytes)\n", |
5186 | tablename, | 5186 | tablename, |
5187 | (1U << log2qty), | 5187 | (1UL << log2qty), |
5188 | ilog2(size) - PAGE_SHIFT, | 5188 | ilog2(size) - PAGE_SHIFT, |
5189 | size); | 5189 | size); |
5190 | 5190 | ||