forked from microsoft/WSL2-Linux-Kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/…
…git/ak/linux-mce-2.6 * 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6: (34 commits) HWPOISON: Remove stray phrase in a comment HWPOISON: Try to allocate migration page on the same node HWPOISON: Don't do early filtering if filter is disabled HWPOISON: Add a madvise() injector for soft page offlining HWPOISON: Add soft page offline support HWPOISON: Undefine short-hand macros after use to avoid namespace conflict HWPOISON: Use new shake_page in memory_failure HWPOISON: Use correct name for MADV_HWPOISON in documentation HWPOISON: mention HWPoison in Kconfig entry HWPOISON: Use get_user_page_fast in hwpoison madvise HWPOISON: add an interface to switch off/on all the page filters HWPOISON: add memory cgroup filter memcg: add accessor to mem_cgroup.css memcg: rename and export try_get_mem_cgroup_from_page() HWPOISON: add page flags filter mm: export stable page flags HWPOISON: limit hwpoison injector to known page types HWPOISON: add fs/device filters HWPOISON: return 0 to indicate success reliably HWPOISON: make semantics of IGNORED/DELAYED clear ...
- Loading branch information
Showing
19 changed files
with
922 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
What: /sys/devices/system/memory/soft_offline_page | ||
Date: Sep 2009 | ||
KernelVersion: 2.6.33 | ||
Contact: andi@firstfloor.org | ||
Description: | ||
Soft-offline the memory page containing the physical address | ||
written into this file. Input is a hex number specifying the | ||
physical address of the page. The kernel will then attempt | ||
to soft-offline it, by moving the contents elsewhere or | ||
dropping it if possible. The kernel will then be placed | ||
on the bad page list and never be reused. | ||
|
||
The offlining is done in kernel specific granuality. | ||
Normally it's the base page size of the kernel, but | ||
this might change. | ||
|
||
The page must be still accessible, not poisoned. The | ||
kernel will never kill anything for this, but rather | ||
fail the offline. Return value is the size of the | ||
number, or a error when the offlining failed. Reading | ||
the file is not allowed. | ||
|
||
What: /sys/devices/system/memory/hard_offline_page | ||
Date: Sep 2009 | ||
KernelVersion: 2.6.33 | ||
Contact: andi@firstfloor.org | ||
Description: | ||
Hard-offline the memory page containing the physical | ||
address written into this file. Input is a hex number | ||
specifying the physical address of the page. The | ||
kernel will then attempt to hard-offline the page, by | ||
trying to drop the page or killing any owner or | ||
triggering IO errors if needed. Note this may kill | ||
any processes owning the page. The kernel will avoid | ||
to access this page assuming it's poisoned by the | ||
hardware. | ||
|
||
The offlining is done in kernel specific granuality. | ||
Normally it's the base page size of the kernel, but | ||
this might change. | ||
|
||
Return value is the size of the number, or a error when | ||
the offlining failed. | ||
Reading the file is not allowed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#ifndef LINUX_KERNEL_PAGE_FLAGS_H | ||
#define LINUX_KERNEL_PAGE_FLAGS_H | ||
|
||
/* | ||
* Stable page flag bits exported to user space | ||
*/ | ||
|
||
#define KPF_LOCKED 0 | ||
#define KPF_ERROR 1 | ||
#define KPF_REFERENCED 2 | ||
#define KPF_UPTODATE 3 | ||
#define KPF_DIRTY 4 | ||
#define KPF_LRU 5 | ||
#define KPF_ACTIVE 6 | ||
#define KPF_SLAB 7 | ||
#define KPF_WRITEBACK 8 | ||
#define KPF_RECLAIM 9 | ||
#define KPF_BUDDY 10 | ||
|
||
/* 11-20: new additions in 2.6.31 */ | ||
#define KPF_MMAP 11 | ||
#define KPF_ANON 12 | ||
#define KPF_SWAPCACHE 13 | ||
#define KPF_SWAPBACKED 14 | ||
#define KPF_COMPOUND_HEAD 15 | ||
#define KPF_COMPOUND_TAIL 16 | ||
#define KPF_HUGE 17 | ||
#define KPF_UNEVICTABLE 18 | ||
#define KPF_HWPOISON 19 | ||
#define KPF_NOPAGE 20 | ||
|
||
#define KPF_KSM 21 | ||
|
||
/* kernel hacking assistances | ||
* WARNING: subject to change, never rely on them! | ||
*/ | ||
#define KPF_RESERVED 32 | ||
#define KPF_MLOCKED 33 | ||
#define KPF_MAPPEDTODISK 34 | ||
#define KPF_PRIVATE 35 | ||
#define KPF_PRIVATE_2 36 | ||
#define KPF_OWNER_PRIVATE 37 | ||
#define KPF_ARCH 38 | ||
#define KPF_UNCACHED 39 | ||
|
||
#endif /* LINUX_KERNEL_PAGE_FLAGS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.