From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751899AbdGAA5z (ORCPT ); Fri, 30 Jun 2017 20:57:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54800 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751072AbdGAA5y (ORCPT ); Fri, 30 Jun 2017 20:57:54 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6AFC881222 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jglisse@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6AFC881222 Date: Fri, 30 Jun 2017 20:57:50 -0400 From: Jerome Glisse To: Evgeny Baskakov Cc: "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , John Hubbard , David Nellans , Mark Hairgrove , Sherry Cheung , Subhash Gutti Subject: Re: [HMM 12/15] mm/migrate: new memory migration helper for use with device memory v4 Message-ID: <20170701005749.GA7232@redhat.com> References: <20170522165206.6284-1-jglisse@redhat.com> <20170522165206.6284-13-jglisse@redhat.com> <5f476e8c-8256-13a8-2228-a2b9e5650586@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5f476e8c-8256-13a8-2228-a2b9e5650586@nvidia.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 01 Jul 2017 00:57:53 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 30, 2017 at 04:19:25PM -0700, Evgeny Baskakov wrote: > Hi Jerome, > > It seems that the kernel can pass 0 in src_pfns for pages that it cannot > migrate (i.e. the kernel knows that they cannot migrate prior to calling > alloc_and_copy). > > So, a zero in src_pfns can mean either "the page is not allocated yet" or > "the page cannot migrate". > > Can migrate_vma set the MIGRATE_PFN_MIGRATE flag for not allocated pages? On > the driver side it is difficult to differentiate between the cases. So this is what is happening in v24. For thing that can not be migrated you get 0 and for things that are not allocated you get MIGRATE_PFN_MIGRATE like the updated comments in migrate.h explain. Cheers, Jérôme From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f200.google.com (mail-qt0-f200.google.com [209.85.216.200]) by kanga.kvack.org (Postfix) with ESMTP id 44B2D2802FE for ; Fri, 30 Jun 2017 20:57:55 -0400 (EDT) Received: by mail-qt0-f200.google.com with SMTP id m54so63041260qtb.9 for ; Fri, 30 Jun 2017 17:57:55 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id p38si9064615qtp.290.2017.06.30.17.57.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Jun 2017 17:57:54 -0700 (PDT) Date: Fri, 30 Jun 2017 20:57:50 -0400 From: Jerome Glisse Subject: Re: [HMM 12/15] mm/migrate: new memory migration helper for use with device memory v4 Message-ID: <20170701005749.GA7232@redhat.com> References: <20170522165206.6284-1-jglisse@redhat.com> <20170522165206.6284-13-jglisse@redhat.com> <5f476e8c-8256-13a8-2228-a2b9e5650586@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5f476e8c-8256-13a8-2228-a2b9e5650586@nvidia.com> Sender: owner-linux-mm@kvack.org List-ID: To: Evgeny Baskakov Cc: "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , John Hubbard , David Nellans , Mark Hairgrove , Sherry Cheung , Subhash Gutti On Fri, Jun 30, 2017 at 04:19:25PM -0700, Evgeny Baskakov wrote: > Hi Jerome, > > It seems that the kernel can pass 0 in src_pfns for pages that it cannot > migrate (i.e. the kernel knows that they cannot migrate prior to calling > alloc_and_copy). > > So, a zero in src_pfns can mean either "the page is not allocated yet" or > "the page cannot migrate". > > Can migrate_vma set the MIGRATE_PFN_MIGRATE flag for not allocated pages? On > the driver side it is difficult to differentiate between the cases. So this is what is happening in v24. For thing that can not be migrated you get 0 and for things that are not allocated you get MIGRATE_PFN_MIGRATE like the updated comments in migrate.h explain. Cheers, Jerome -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org