From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760274AbaGYMYF (ORCPT ); Fri, 25 Jul 2014 08:24:05 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39852 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916AbaGYMYD (ORCPT ); Fri, 25 Jul 2014 08:24:03 -0400 Date: Fri, 25 Jul 2014 13:23:58 +0100 From: Mel Gorman To: Vlastimil Babka Cc: linux-mm@kvack.org, Andrew Morton , David Rientjes , linux-kernel@vger.kernel.org, Joonsoo Kim , Michal Nazarewicz , Naoya Horiguchi , Christoph Lameter , Rik van Riel , Minchan Kim , Zhang Yanfei Subject: Re: [PATCH V4 04/15] mm, compaction: do not recheck suitable_migration_target under lock Message-ID: <20140725122358.GY10819@suse.de> References: <1405518503-27687-1-git-send-email-vbabka@suse.cz> <1405518503-27687-5-git-send-email-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1405518503-27687-5-git-send-email-vbabka@suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 16, 2014 at 03:48:12PM +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 > Reviewed-by: Zhang Yanfei > Acked-by: Minchan Kim > Cc: Mel Gorman > Cc: Joonsoo Kim > Cc: Michal Nazarewicz > Cc: Naoya Horiguchi > Cc: Christoph Lameter > Cc: Rik van Riel > Acked-by: David Rientjes Acked-by: Mel Gorman -- Mel Gorman SUSE Labs