diff mbox series

[v2,3/5] mm/page_alloc.c: fix obsolete comment in free_pcppages_bulk()

Message ID 20210902121242.41607-4-linmiaohe@huawei.com (mailing list archive)
State New
Headers show
Series Cleanups and fixup for page_alloc | expand

Commit Message

Miaohe Lin Sept. 2, 2021, 12:12 p.m. UTC
The second two paragraphs about "all pages pinned" and pages_scanned is
obsolete. And There are PAGE_ALLOC_COSTLY_ORDER + 1 + NR_PCP_THP orders
in pcp. So the same order assumption is not held now.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 mm/page_alloc.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Mel Gorman Sept. 2, 2021, 2:03 p.m. UTC | #1
On Thu, Sep 02, 2021 at 08:12:40PM +0800, Miaohe Lin wrote:
> The second two paragraphs about "all pages pinned" and pages_scanned is
> obsolete. And There are PAGE_ALLOC_COSTLY_ORDER + 1 + NR_PCP_THP orders
> in pcp. So the same order assumption is not held now.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Acked-by: Mel Gorman <mgorman@techsingularity.net>
diff mbox series

Patch

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d3983244f56f..f7fcbac2d091 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1426,14 +1426,8 @@  static inline void prefetch_buddy(struct page *page)
 
 /*
  * Frees a number of pages from the PCP lists
- * Assumes all pages on list are in same zone, and of same order.
+ * Assumes all pages on list are in same zone.
  * count is the number of pages to free.
- *
- * If the zone was previously in an "all pages pinned" state then look to
- * see if this freeing clears that state.
- *
- * And clear the zone's pages_scanned counter, to hold off the "all pages are
- * pinned" detection logic.
  */
 static void free_pcppages_bulk(struct zone *zone, int count,
 					struct per_cpu_pages *pcp)