Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932341AbbFYAov (ORCPT ); Wed, 24 Jun 2015 20:44:51 -0400 Received: from LGEMRELSE7Q.lge.com ([156.147.1.151]:55820 "EHLO lgemrelse7q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752108AbbFYAmy (ORCPT ); Wed, 24 Jun 2015 20:42:54 -0400 X-Original-SENDERIP: 10.177.222.220 X-Original-MAILFROM: iamjoonsoo.kim@lge.com From: Joonsoo Kim To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Vlastimil Babka , Mel Gorman , Rik van Riel , David Rientjes , Minchan Kim , Joonsoo Kim Subject: [RFC PATCH 03/10] mm/compaction: always update cached pfn Date: Thu, 25 Jun 2015 09:45:14 +0900 Message-Id: <1435193121-25880-4-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435193121-25880-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1435193121-25880-1-git-send-email-iamjoonsoo.kim@lge.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1251 Lines: 42 Signed-off-by: Joonsoo Kim --- mm/compaction.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mm/compaction.c b/mm/compaction.c index 9c5d43c..2d8e211 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -510,6 +510,10 @@ isolate_fail: if (locked) spin_unlock_irqrestore(&cc->zone->lock, flags); + if (blockpfn == end_pfn && + blockpfn > cc->zone->compact_cached_free_pfn) + cc->zone->compact_cached_free_pfn = blockpfn; + update_pageblock_skip(cc, valid_page, total_isolated, *start_pfn, end_pfn, blockpfn, false); @@ -811,6 +815,13 @@ isolate_success: if (locked) spin_unlock_irqrestore(&zone->lru_lock, flags); + if (low_pfn == end_pfn && cc->mode != MIGRATE_ASYNC) { + int sync = cc->mode != MIGRATE_ASYNC; + + if (low_pfn > zone->compact_cached_migrate_pfn[sync]) + zone->compact_cached_migrate_pfn[sync] = low_pfn; + } + update_pageblock_skip(cc, valid_page, nr_isolated, start_pfn, end_pfn, low_pfn, true); -- 1.9.1 -- 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/