Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755042AbcDDLF0 (ORCPT ); Mon, 4 Apr 2016 07:05:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:36031 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753829AbcDDLFX (ORCPT ); Mon, 4 Apr 2016 07:05:23 -0400 Subject: Re: [PATCH v2 4/4] mm, compaction: direct freepage allocation for async direct compaction To: Mel Gorman References: <1459414236-9219-1-git-send-email-vbabka@suse.cz> <1459414236-9219-5-git-send-email-vbabka@suse.cz> <20160404093159.GB4773@techsingularity.net> Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Joonsoo Kim , Rik van Riel , David Rientjes , Minchan Kim , Michal Hocko From: Vlastimil Babka Message-ID: <57024A6F.100@suse.cz> Date: Mon, 4 Apr 2016 13:05:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <20160404093159.GB4773@techsingularity.net> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1135 Lines: 21 On 04/04/2016 11:31 AM, Mel Gorman wrote: > On Thu, Mar 31, 2016 at 10:50:36AM +0200, Vlastimil Babka wrote: >> The goal of direct compaction is to quickly make a high-order page available >> for the pending allocation. The free page scanner can add significant latency >> when searching for migration targets, although to succeed the compaction, the >> only important limit on the target free pages is that they must not come from >> the same order-aligned block as the migrated pages. >> > > What prevents the free pages being allocated from behind the migration > scanner? Having compaction abort when the scanners meet misses > compaction opportunities but it avoids the problem of Compactor A using > pageblock X as a migration target and Compactor B using pageblock X as a > migration source. It's true that there's no complete protection, but parallel async compactions should eventually get detect contention and back off. Sync compaction keeps using the free scanner, so this seemed like a safe thing to attempt in the initial async compaction, without compromising success rates thanks to the followup sync compaction.