From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by kanga.kvack.org (Postfix) with ESMTP id F0DD36B0124 for ; Tue, 10 Jun 2014 20:33:30 -0400 (EDT) Received: by mail-pa0-f50.google.com with SMTP id fb1so1262905pad.9 for ; Tue, 10 Jun 2014 17:33:30 -0700 (PDT) Received: from lgemrelse7q.lge.com (LGEMRELSE7Q.lge.com. [156.147.1.151]) by mx.google.com with ESMTP id xm4si36112576pbc.45.2014.06.10.17.33.28 for ; Tue, 10 Jun 2014 17:33:29 -0700 (PDT) Date: Wed, 11 Jun 2014 09:33:23 +0900 From: Minchan Kim Subject: Re: [PATCH 01/10] mm, compaction: do not recheck suitable_migration_target under lock Message-ID: <20140611003322.GB15630@bbox> References: <1402305982-6928-1-git-send-email-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1402305982-6928-1-git-send-email-vbabka@suse.cz> Sender: owner-linux-mm@kvack.org List-ID: To: Vlastimil Babka Cc: David Rientjes , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Greg Thelen , Mel Gorman , Joonsoo Kim , Michal Nazarewicz , Naoya Horiguchi , Christoph Lameter , Rik van Riel On Mon, Jun 09, 2014 at 11:26:13AM +0200, Vlastimil Babka wrote: > isolate_freepages_block() rechecks if the pageblock is suitable to be a target > for migration after it has taken the zone->lock. However, the check has been > optimized to occur only once per pageblock, and compact_checklock_irqsave() > might be dropping and reacquiring lock, which means somebody else might have > changed the pageblock's migratetype meanwhile. > > Furthermore, nothing prevents the migratetype to change right after > isolate_freepages_block() has finished isolating. Given how imperfect this is, > it's simpler to just rely on the check done in isolate_freepages() without > lock, and not pretend that the recheck under lock guarantees anything. It is > just a heuristic after all. > > Signed-off-by: Vlastimil Babka Acked-by: Minchan Kim -- Kind regards, Minchan Kim -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org