Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752904AbdCQDmJ (ORCPT ); Thu, 16 Mar 2017 23:42:09 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:37676 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751321AbdCQDmI (ORCPT ); Thu, 16 Mar 2017 23:42:08 -0400 MIME-Version: 1.0 In-Reply-To: <94e0d115-7deb-c748-3dc2-60d6289e6551@nvidia.com> References: <1489680335-6594-1-git-send-email-jglisse@redhat.com> <1489680335-6594-8-git-send-email-jglisse@redhat.com> <20170316160520.d03ac02474cad6d2c8eba9bc@linux-foundation.org> <94e0d115-7deb-c748-3dc2-60d6289e6551@nvidia.com> From: Balbir Singh Date: Fri, 17 Mar 2017 14:42:05 +1100 Message-ID: Subject: Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4 To: John Hubbard Cc: Andrew Morton , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , "linux-kernel@vger.kernel.org" , linux-mm , Naoya Horiguchi , David Nellans , Evgeny Baskakov , Mark Hairgrove , Sherry Cheung , Subhash Gutti Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 950 Lines: 31 >> Or make the HMM Kconfig feature 64BIT only by making it depend on 64BIT? >> > > Yes, that was my first reaction too, but these particular routines are > aspiring to be generic routines--in fact, you have had an influence there, > because these might possibly help with NUMA migrations. :) > Yes, I still stick to them being generic, but I'd be OK if they worked just for 64 bit systems. Having said that even the 64 bit works version work for upto physical sizes of 64 - PAGE_SHIFT which is a little limiting I think. One option is to make pfn's unsigned long long and do 32 and 64 bit computations separately Option 2, could be something like you said a. Define a __weak migrate_vma to return -EINVAL b. In a 64BIT only file define migrate_vma Option 3 Something totally different If we care to support 32 bit we go with 1, else option 2 is a good starting point. There might be other ways of doing option 2, like you've suggested Balbir