Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761817AbZCPSA1 (ORCPT ); Mon, 16 Mar 2009 14:00:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757757AbZCPRvp (ORCPT ); Mon, 16 Mar 2009 13:51:45 -0400 Received: from gir.skynet.ie ([193.1.99.77]:51192 "EHLO gir.skynet.ie" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757189AbZCPRvk (ORCPT ); Mon, 16 Mar 2009 13:51:40 -0400 From: Mel Gorman To: Mel Gorman , Linux Memory Management List Cc: Pekka Enberg , Rik van Riel , KOSAKI Motohiro , Christoph Lameter , Johannes Weiner , Nick Piggin , Linux Kernel Mailing List , Lin Ming , Zhang Yanmin , Peter Zijlstra Subject: [PATCH 26/27] Get the pageblock migratetype without disabling interrupts Date: Mon, 16 Mar 2009 17:53:40 +0000 Message-Id: <1237226020-14057-27-git-send-email-mel@csn.ul.ie> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1237226020-14057-1-git-send-email-mel@csn.ul.ie> References: <1237226020-14057-1-git-send-email-mel@csn.ul.ie> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1593 Lines: 41 Local interrupts are disabled when freeing pages to the PCP list. Part of that free checks what the migratetype of the pageblock the page is in but it checks this with interrupts disabled. This patch checks the pagetype with interrupts enabled. The impact is that it is possible a page is freed to the wrong list when a pageblock changes type but as that block is now already considered mixed from an anti-fragmentation perspective, it's not of vital importance. Signed-off-by: Mel Gorman --- mm/page_alloc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index f71091a..ca7bc04 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1039,6 +1039,7 @@ static void free_hot_cold_page(struct page *page, int cold) kernel_map_pages(page, 1, 0); pcp = &zone_pcp(zone, get_cpu())->pcp; + set_page_private(page, get_pageblock_migratetype(page)); local_irq_save(flags); if (unlikely(clearMlocked)) free_page_mlock(page); @@ -1048,7 +1049,6 @@ static void free_hot_cold_page(struct page *page, int cold) list_add_tail(&page->lru, &pcp->list); else list_add(&page->lru, &pcp->list); - set_page_private(page, get_pageblock_migratetype(page)); pcp->count++; if (pcp->count >= pcp->high) { free_pages_bulk(zone, pcp->batch, &pcp->list, 0); -- 1.5.6.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/