Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165730
b: refs/heads/master
c: 888b9f7
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen committed Sep 16, 2009
1 parent 83515b2 commit 590db0e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 14fa31b89c5ae79e4131da41761378a6df674352
refs/heads/master: 888b9f7c58ebe8303bad817cd554df887a683957
1 change: 1 addition & 0 deletions trunk/include/linux/rmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ enum ttu_flags {

TTU_IGNORE_MLOCK = (1 << 8), /* ignore mlock */
TTU_IGNORE_ACCESS = (1 << 9), /* don't age */
TTU_IGNORE_HWPOISON = (1 << 10),/* corrupted page is recoverable */
};
#define TTU_ACTION(x) ((x) & TTU_ACTION_MASK)

Expand Down
9 changes: 8 additions & 1 deletion trunk/mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,14 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
/* Update high watermark before we lower rss */
update_hiwater_rss(mm);

if (PageAnon(page)) {
if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) {
if (PageAnon(page))
dec_mm_counter(mm, anon_rss);
else
dec_mm_counter(mm, file_rss);
set_pte_at(mm, address, pte,
swp_entry_to_pte(make_hwpoison_entry(page)));
} else if (PageAnon(page)) {
swp_entry_t entry = { .val = page_private(page) };

if (PageSwapCache(page)) {
Expand Down

0 comments on commit 590db0e

Please sign in to comment.