diff options
| author | Wanpeng Li <liwanp@linux.vnet.ibm.com> | 2013-09-11 17:22:52 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-11 18:58:08 -0400 |
| commit | f9121153fdfbfaa930bf65077a5597e20d3ac608 (patch) | |
| tree | a72e82c0c3394cf84b3ff8698134ff124a61b491 /include/linux | |
| parent | 841fcc583f81c632d20a27e17beccb20320530a1 (diff) | |
mm/hwpoison: don't need to hold compound lock for hugetlbfs page
compound lock is introduced by commit e9da73d67("thp: compound_lock."), it
is used to serialize put_page against __split_huge_page_refcount(). In
addition, transparent hugepages will be splitted in hwpoison handler and
just one subpage will be poisoned. There is unnecessary to hold compound
lock for hugetlbfs page. This patch replace compound_trans_order by
compond_order in the place where the page is hugetlbfs page.
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mm.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 03f84b8d7359..caf543c7eaa7 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -495,20 +495,6 @@ static inline int compound_order(struct page *page) | |||
| 495 | return (unsigned long)page[1].lru.prev; | 495 | return (unsigned long)page[1].lru.prev; |
| 496 | } | 496 | } |
| 497 | 497 | ||
| 498 | static inline int compound_trans_order(struct page *page) | ||
| 499 | { | ||
| 500 | int order; | ||
| 501 | unsigned long flags; | ||
| 502 | |||
| 503 | if (!PageHead(page)) | ||
| 504 | return 0; | ||
| 505 | |||
| 506 | flags = compound_lock_irqsave(page); | ||
| 507 | order = compound_order(page); | ||
| 508 | compound_unlock_irqrestore(page, flags); | ||
| 509 | return order; | ||
| 510 | } | ||
| 511 | |||
| 512 | static inline void set_compound_order(struct page *page, unsigned long order) | 498 | static inline void set_compound_order(struct page *page, unsigned long order) |
| 513 | { | 499 | { |
| 514 | page[1].lru.prev = (void *)order; | 500 | page[1].lru.prev = (void *)order; |
