[merged] mm-page_alloc-fix-the-page-address-of-higher-pages-buddy-calculation.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/page_alloc: fix the page address of higher page's buddy calculation
has been removed from the -mm tree.  Its filename was
     mm-page_alloc-fix-the-page-address-of-higher-pages-buddy-calculation.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Li Haifeng <omycle@xxxxxxxxx>
Subject: mm/page_alloc: fix the page address of higher page's buddy calculation

The heuristic method for buddy has been introduced since 43506fad
("mm/page_alloc.c: simplify calculation of combined index of adjacent
buddy lists").  But the page address of higher page's buddy was wrongly
calculated, which will lead page_is_buddy to fail for ever.  IOW, the
heuristic method would be disabled with the wrong page address of higher
page's buddy.

Calculating the page address of higher page's buddy should be based
higher_page with the offset between index of higher page and index of
higher page's buddy.

Signed-off-by: Haifeng Li <omycle@xxxxxxxxx>
Signed-off-by: Gavin Shan <shangw@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Michal Hocko <mhocko@xxxxxxx>
Cc: KyongHo Cho <pullip.cho@xxxxxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxx>
Cc: Minchan Kim <minchan.kim@xxxxxxxxx>
Cc: Johannes Weiner <jweiner@xxxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>	[2.6.38+]
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/page_alloc.c~mm-page_alloc-fix-the-page-address-of-higher-pages-buddy-calculation mm/page_alloc.c
--- a/mm/page_alloc.c~mm-page_alloc-fix-the-page-address-of-higher-pages-buddy-calculation
+++ a/mm/page_alloc.c
@@ -584,7 +584,7 @@ static inline void __free_one_page(struc
 		combined_idx = buddy_idx & page_idx;
 		higher_page = page + (combined_idx - page_idx);
 		buddy_idx = __find_buddy_index(combined_idx, order + 1);
-		higher_buddy = page + (buddy_idx - combined_idx);
+		higher_buddy = higher_page + (buddy_idx - combined_idx);
 		if (page_is_buddy(higher_page, higher_buddy, order + 1)) {
 			list_add_tail(&page->lru,
 				&zone->free_area[order].free_list[migratetype]);
_

Patches currently in -mm which might be from omycle@xxxxxxxxx are

origin.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux