memory-failure.c (e591ef7d96d6ea249916f351dc26a636e565c635) memory-failure.c (d027122d8363e58cd8bc2fa6a16917f7f69b85bb)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2008, 2009 Intel Corporation
4 * Authors: Andi Kleen, Fengguang Wu
5 *
6 * High level machine check handler. Handles pages reported by the
7 * hardware as being corrupted usually due to a multi-bit ECC memory or cache
8 * failure.

--- 60 unchanged lines hidden (view full) ---

69int sysctl_memory_failure_early_kill __read_mostly = 0;
70
71int sysctl_memory_failure_recovery __read_mostly = 1;
72
73atomic_long_t num_poisoned_pages __read_mostly = ATOMIC_LONG_INIT(0);
74
75static bool hw_memory_failure __read_mostly = false;
76
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2008, 2009 Intel Corporation
4 * Authors: Andi Kleen, Fengguang Wu
5 *
6 * High level machine check handler. Handles pages reported by the
7 * hardware as being corrupted usually due to a multi-bit ECC memory or cache
8 * failure.

--- 60 unchanged lines hidden (view full) ---

69int sysctl_memory_failure_early_kill __read_mostly = 0;
70
71int sysctl_memory_failure_recovery __read_mostly = 1;
72
73atomic_long_t num_poisoned_pages __read_mostly = ATOMIC_LONG_INIT(0);
74
75static bool hw_memory_failure __read_mostly = false;
76
77inline void num_poisoned_pages_inc(void)
78{
79 atomic_long_inc(&num_poisoned_pages);
80}
81
82static inline void num_poisoned_pages_sub(long i)
83{
84 atomic_long_sub(i, &num_poisoned_pages);
85}
86
77/*
78 * Return values:
79 * 1: the page is dissolved (if needed) and taken off from buddy,
80 * 0: the page is dissolved (if needed) and not taken off from buddy,
81 * < 0: failed to dissolve.
82 */
83static int __page_handle_poison(struct page *page)
84{

--- 2540 unchanged lines hidden ---
87/*
88 * Return values:
89 * 1: the page is dissolved (if needed) and taken off from buddy,
90 * 0: the page is dissolved (if needed) and not taken off from buddy,
91 * < 0: failed to dissolve.
92 */
93static int __page_handle_poison(struct page *page)
94{

--- 2540 unchanged lines hidden ---