Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752665AbdCSUJA (ORCPT ); Sun, 19 Mar 2017 16:09:00 -0400 Received: from outbound-smtp06.blacknight.com ([81.17.249.39]:32807 "EHLO outbound-smtp06.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752623AbdCSUI6 (ORCPT ); Sun, 19 Mar 2017 16:08:58 -0400 Date: Sun, 19 Mar 2017 20:08:49 +0000 From: Mel Gorman To: J?r?me Glisse Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, John Hubbard , Naoya Horiguchi , David Nellans , Dan Williams , Ross Zwisler Subject: Re: [HMM 03/16] mm/ZONE_DEVICE/free-page: callback when page is freed v3 Message-ID: <20170319200849.GD2774@techsingularity.net> References: <1489680335-6594-1-git-send-email-jglisse@redhat.com> <1489680335-6594-4-git-send-email-jglisse@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1489680335-6594-4-git-send-email-jglisse@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 428 Lines: 9 On Thu, Mar 16, 2017 at 12:05:22PM -0400, J?r?me Glisse wrote: > When a ZONE_DEVICE page refcount reach 1 it means it is free and nobody > is holding a reference on it (only device to which the memory belong do). > Add a callback and call it when that happen so device driver can implement > their own free page management. > If it does not implement it's own management then it still needs to be freed to the main allocator.