summaryrefslogtreecommitdiff
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorJin Dongming <jin.dongming@np.css.fujitsu.com>2011-02-01 15:52:41 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-02-02 16:03:19 -0800
commitaf241a083404acda7ba3690e5b7697949d729fcc (patch)
treef299ac844b38bc9a82e1477d8ef16648898f5584 /mm/memcontrol.c
parenta6d30dddae4648837be5a0c0cb2c0ae9ad0377db (diff)
downloadlwn-af241a083404acda7ba3690e5b7697949d729fcc.tar.gz
lwn-af241a083404acda7ba3690e5b7697949d729fcc.zip
thp: fix unsuitable behavior for hwpoisoned tail page
When a tail page of THP is poisoned, memory-failure will do nothing except setting PG_hwpoison, while the expected behavior is that the process, who is using the poisoned tail page, should be killed. The above problem is caused by lru check of the poisoned tail page of THP. Because PG_lru flag is only set on the head page of THP, the check always consider the poisoned tail page as NON lru page. So the lru check for the tail page of THP should be avoided, as like as hugetlb. This patch adds !PageTransCompound() before lru check for THP, because of the check (!PageHuge() && !PageTransCompound()) the whole branch could be optimized away at build time when both hugetlbfs and THP are set with "N" (or in archs not supporting either of those). [akpm@linux-foundation.org: fix unrelated typo in shake_page() comment] Signed-off-by: Jin Dongming <jin.dongming@np.css.fujitsu.com> Reviewed-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
0 files changed, 0 insertions, 0 deletions