Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755184AbcKVEzF (ORCPT ); Mon, 21 Nov 2016 23:55:05 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:36774 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755052AbcKVEzD (ORCPT ); Mon, 21 Nov 2016 23:55:03 -0500 Subject: Re: [HMM v13 05/18] mm/ZONE_DEVICE/devmem_pages_remove: allow early removal of device memory To: Jerome Glisse References: <1479493107-982-1-git-send-email-jglisse@redhat.com> <1479493107-982-6-git-send-email-jglisse@redhat.com> <5832CE7A.3060802@linux.vnet.ibm.com> <20161121123910.GE2392@redhat.com> Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, John Hubbard , Dan Williams , Ross Zwisler From: Anshuman Khandual Date: Tue, 22 Nov 2016 10:24:54 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20161121123910.GE2392@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16112204-0016-0000-0000-000001F43125 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16112204-0017-0000-0000-000005E7B866 Message-Id: <5833CF9E.1030804@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-22_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611220088 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 804 Lines: 19 On 11/21/2016 06:09 PM, Jerome Glisse wrote: > On Mon, Nov 21, 2016 at 04:07:46PM +0530, Anshuman Khandual wrote: >> On 11/18/2016 11:48 PM, J?r?me Glisse wrote: >>> HMM wants to remove device memory early before device tear down so add an >>> helper to do that. >> >> Could you please explain why HMM wants to remove device memory before >> device tear down ? >> > > Some device driver want to manage memory for several physical devices from a > single fake device driver. Because it fits their driver architecture better > and those physical devices can have dedicated link between them. > > Issue is that the fake device driver can outlive any of the real device for a > long time so we want to be able to remove device memory before the fake device > goes away to free up resources early. Got it.