From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751922AbdGACGz convert rfc822-to-8bit (ORCPT ); Fri, 30 Jun 2017 22:06:55 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:18863 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751370AbdGACGy (ORCPT ); Fri, 30 Jun 2017 22:06:54 -0400 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 30 Jun 2017 19:06:53 -0700 Subject: Re: [HMM 12/15] mm/migrate: new memory migration helper for use with device memory v4 To: Jerome Glisse CC: "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , John Hubbard , David Nellans , Mark Hairgrove , Sherry Cheung , Subhash Gutti References: <20170522165206.6284-1-jglisse@redhat.com> <20170522165206.6284-13-jglisse@redhat.com> <5f476e8c-8256-13a8-2228-a2b9e5650586@nvidia.com> <20170701005749.GA7232@redhat.com> From: Evgeny Baskakov Message-ID: Date: Fri, 30 Jun 2017 19:06:51 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170701005749.GA7232@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Originating-IP: [172.17.162.253] X-ClientProxiedBy: HQMAIL106.nvidia.com (172.18.146.12) To HQMAIL103.nvidia.com (172.20.187.11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/30/17 5:57 PM, Jerome Glisse wrote: > 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 Yes, I see the updated documentation in migrate.h. The issue seems to be gone now in v24. Thanks! Evgeny Baskakov NVIDIA From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f198.google.com (mail-pf0-f198.google.com [209.85.192.198]) by kanga.kvack.org (Postfix) with ESMTP id 94E1E2802FE for ; Fri, 30 Jun 2017 22:06:54 -0400 (EDT) Received: by mail-pf0-f198.google.com with SMTP id v26so81685872pfa.0 for ; Fri, 30 Jun 2017 19:06:54 -0700 (PDT) Received: from hqemgate14.nvidia.com (hqemgate14.nvidia.com. [216.228.121.143]) by mx.google.com with ESMTPS id s132si6944229pgc.391.2017.06.30.19.06.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Jun 2017 19:06:53 -0700 (PDT) Subject: Re: [HMM 12/15] mm/migrate: new memory migration helper for use with device memory v4 References: <20170522165206.6284-1-jglisse@redhat.com> <20170522165206.6284-13-jglisse@redhat.com> <5f476e8c-8256-13a8-2228-a2b9e5650586@nvidia.com> <20170701005749.GA7232@redhat.com> From: Evgeny Baskakov Message-ID: Date: Fri, 30 Jun 2017 19:06:51 -0700 MIME-Version: 1.0 In-Reply-To: <20170701005749.GA7232@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US Sender: owner-linux-mm@kvack.org List-ID: To: Jerome Glisse 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 6/30/17 5:57 PM, Jerome Glisse wrote: > 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" o= r >> "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 y= ou > get 0 and for things that are not allocated you get MIGRATE_PFN_MIGRATE l= ike > the updated comments in migrate.h explain. > > Cheers, > J=C3=A9r=C3=B4me Yes, I see the updated documentation in migrate.h. The issue seems to be go= ne now in v24. Thanks! Evgeny Baskakov NVIDIA -- 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