From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751891AbaEBKLO (ORCPT ); Fri, 2 May 2014 06:11:14 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48989 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751764AbaEBKLN (ORCPT ); Fri, 2 May 2014 06:11:13 -0400 Date: Fri, 2 May 2014 11:11:09 +0100 From: Mel Gorman To: David Rientjes Cc: Andrew Morton , Rik van Riel , Vlastimil Babka , Joonsoo Kim , Greg Thelen , Hugh Dickins , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch v2 2/4] mm, compaction: return failed migration target pages back to freelist Message-ID: <20140502101109.GP23991@suse.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: 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 Thu, May 01, 2014 at 02:35:42PM -0700, David Rientjes wrote: > Memory compaction works by having a "freeing scanner" scan from one end of a > zone which isolates pages as migration targets while another "migrating scanner" > scans from the other end of the same zone which isolates pages for migration. > > When page migration fails for an isolated page, the target page is returned to > the system rather than the freelist built by the freeing scanner. This may > require the freeing scanner to continue scanning memory after suitable migration > targets have already been returned to the system needlessly. > > This patch returns destination pages to the freeing scanner freelist when page > migration fails. This prevents unnecessary work done by the freeing scanner but > also encourages memory to be as compacted as possible at the end of the zone. > > Reported-by: Greg Thelen > Signed-off-by: David Rientjes Acked-by: Mel Gorman -- Mel Gorman SUSE Labs