From: Linus Torvalds Date: Thu, 24 Sep 2009 14:53:22 +0000 (-0700) Subject: Merge branch 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux... X-Git-Tag: v2.6.32-rc1~62 X-Git-Url: https://bbs.cooldavid.org/git/?a=commitdiff_plain;h=db16826367fefcb0ddb93d76b66adc52eb4e6339;p=net-next-2.6.git 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: (21 commits) HWPOISON: Enable error_remove_page on btrfs HWPOISON: Add simple debugfs interface to inject hwpoison on arbitary PFNs HWPOISON: Add madvise() based injector for hardware poisoned pages v4 HWPOISON: Enable error_remove_page for NFS HWPOISON: Enable .remove_error_page for migration aware file systems HWPOISON: The high level memory error handler in the VM v7 HWPOISON: Add PR_MCE_KILL prctl to control early kill behaviour per process HWPOISON: shmem: call set_page_dirty() with locked page HWPOISON: Define a new error_remove_page address space op for async truncation HWPOISON: Add invalidate_inode_page HWPOISON: Refactor truncate to allow direct truncating of page v2 HWPOISON: check and isolate corrupted free pages v2 HWPOISON: Handle hardware poisoned pages in try_to_unmap HWPOISON: Use bitmask/action code for try_to_unmap behaviour HWPOISON: x86: Add VM_FAULT_HWPOISON handling to x86 page fault handler v2 HWPOISON: Add poison check to page fault handling HWPOISON: Add basic support for poisoned pages in fault handler v3 HWPOISON: Add new SIGBUS error codes for hardware poison signals HWPOISON: Add support for poison swap entries v2 HWPOISON: Export some rmap vma locking to outside world ... --- db16826367fefcb0ddb93d76b66adc52eb4e6339 diff --cc fs/btrfs/inode.c index 9096fd0ca3c,dd86050190f..d154a3f365d --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@@ -5269,9 -5269,10 +5269,10 @@@ static const struct address_space_opera .invalidatepage = btrfs_invalidatepage, .releasepage = btrfs_releasepage, .set_page_dirty = btrfs_set_page_dirty, + .error_remove_page = generic_error_remove_page, }; -static struct address_space_operations btrfs_symlink_aops = { +static const struct address_space_operations btrfs_symlink_aops = { .readpage = btrfs_readpage, .writepage = btrfs_writepage, .invalidatepage = btrfs_invalidatepage, diff --cc include/asm-generic/mman-common.h index dd63bd38864,c325d1ef42a..5ee13b2fd22 --- a/include/asm-generic/mman-common.h +++ b/include/asm-generic/mman-common.h @@@ -34,10 -34,8 +34,11 @@@ #define MADV_REMOVE 9 /* remove these pages & resources */ #define MADV_DONTFORK 10 /* don't inherit across fork */ #define MADV_DOFORK 11 /* do inherit across fork */ + #define MADV_HWPOISON 100 /* poison a page for testing */ +#define MADV_MERGEABLE 12 /* KSM may merge identical pages */ +#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ + /* compatibility flags */ #define MAP_FILE 0 diff --cc include/linux/prctl.h index 07bff666e65,3dc303197e6..931150566ad --- a/include/linux/prctl.h +++ b/include/linux/prctl.h @@@ -85,7 -85,9 +85,9 @@@ #define PR_SET_TIMERSLACK 29 #define PR_GET_TIMERSLACK 30 -#define PR_TASK_PERF_COUNTERS_DISABLE 31 -#define PR_TASK_PERF_COUNTERS_ENABLE 32 +#define PR_TASK_PERF_EVENTS_DISABLE 31 +#define PR_TASK_PERF_EVENTS_ENABLE 32 + #define PR_MCE_KILL 33 + #endif /* _LINUX_PRCTL_H */ diff --cc mm/migrate.c index 16052e80aaa,e3a0cd3859a..1a4bf481378 --- a/mm/migrate.c +++ b/mm/migrate.c @@@ -675,9 -669,8 +675,9 @@@ static int unmap_and_move(new_page_t ge } /* Establish migration ptes or remove ptes */ - try_to_unmap(page, 1); + try_to_unmap(page, TTU_MIGRATION|TTU_IGNORE_MLOCK|TTU_IGNORE_ACCESS); +skip_unmap: if (!page_mapped(page)) rc = move_to_new_page(newpage, page);