From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751834AbaEBKKf (ORCPT ); Fri, 2 May 2014 06:10:35 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48971 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751764AbaEBKKe (ORCPT ); Fri, 2 May 2014 06:10:34 -0400 Date: Fri, 2 May 2014 11:10:28 +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 1/4] mm, migration: add destination page freeing callback Message-ID: <20140502101028.GO23991@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:37PM -0700, David Rientjes wrote: > Memory migration uses a callback defined by the caller to determine how to > allocate destination pages. When migration fails for a source page, however, it > frees the destination page back to the system. > > This patch adds a memory migration callback defined by the caller to determine > how to free destination pages. If a caller, such as memory compaction, builds > its own freelist for migration targets, this can reuse already freed memory > instead of scanning additional memory. > > If the caller provides a function to handle freeing of destination pages, it is > called when page migration fails. Otherwise, it may pass NULL and freeing back > to the system will be handled as usual. This patch introduces no functional > change. > > Reviewed-by: Naoya Horiguchi > Signed-off-by: David Rientjes Acked-by: Mel Gorman -- Mel Gorman SUSE Labs