mm-improve-documentation-of-page_order-v2.patch removed from -mm tree
Subsystems (3)
[email protected]
maintainerSubject: [merged] mm-improve-documentation-of-page_order-v2.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 24 Jan 2014 10:59:43 -0800
The patch titled
Subject: mm: improve documentation of page_order
has been removed from the -mm tree. Its filename was
mm-improve-documentation-of-page_order-v2.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Mel Gorman <[email protected]>
Subject: mm: improve documentation of page_order
Developers occasionally try and optimise PFN scanners by using page_order but miss that in general it requires zone->lock. This has happened twice for compaction.c and rejected both times. This patch clarifies the documentation of page_order and adds a note to compaction.c why page_order is not used.
---
mm/compaction.c | 5 ++++- mm/internal.h | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-)
mm/compaction.c renamed from mm/compaction.c~mm-improve-documentation-of-page_order-v2 +4 -1
@@ -523,7 +523,10 @@ isolate_migratepages_range(struct zone *if (!isolation_suitable (cc, page)) goto next_pageblock; -/* Skip if free */ +/* +* Skip if free. page_order cannot be used without zone->lock +* as nothing prevents parallel allocations or buddy merging. +*/ if (PageBuddy (page))continue ;
mm/internal.h renamed from mm/internal.h~mm-improve-documentation-of-page_order-v2 +5 -3
@@ -143,9 +143,11 @@ isolate_migratepages_range(struct zone *#endif /* -* function for dealing with page's order in buddy system. -* zone->lock is already acquired when we use these. -* So, we don't need atomic page->flags operations here. +* This function returns the order of a free page in the buddy system. In +* general, page_zone(page)->lock must be held by the caller to prevent the +* page from being allocated in parallel and returning garbage as the order. +* If a caller does not hold page_zone(page)->lock, it must guarantee that the +* page cannot be allocated or merged in parallel. */ static inline unsigned long page_order (struct page *page) {
_
Patches currently in -mm which might be from [email protected] are
origin.patch
mm-remove-bug_on-from-mlock_vma_page.patch x86-mm-account-for-tlb-flushes-only-when-debugging.patch x86-mm-clean-up-inconsistencies-when-flushing-tlb-ranges.patch x86-mm-eliminate-redundant-page-table-walk-during-tlb-range-flushing.patch x86-mm-change-tlb_flushall_shift-for-ivybridge.patch mm-x86-revisit-tlb_flushall_shift-tuning-for-page-flushes-except-on-ivybridge.patch mm-page_alloc-allow-__gfp_nofail-to-allocate-below-watermarks-after-reclaim.patch mm-vmscan-respect-numa-policy-mask-when-shrinking-slab-on-direct-reclaim.patch mm-vmscan-move-call-to-shrink_slab-to-shrink_zones.patch mm-vmscan-remove-shrink_control-arg-from-do_try_to_free_pages.patch mm-compaction-ignore-pageblock-skip-when-manually-invoking-compaction.patch linux-next.patch mm-migratec-fix-setting-of-cpupid-on-page-migration-twice-against-normal-page.patch zsmalloc-move-it-under-mm.patch
zram-promote-zram-from-staging.patch