From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751936AbcDKGLE (ORCPT ); Mon, 11 Apr 2016 02:11:04 -0400 Received: from e28smtp01.in.ibm.com ([125.16.236.1]:37768 "EHLO e28smtp01.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751162AbcDKGLC (ORCPT ); Mon, 11 Apr 2016 02:11:02 -0400 X-IBM-Helo: d28relay03.in.ibm.com X-IBM-MailFrom: khandual@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Message-ID: <570B3FDB.90305@linux.vnet.ibm.com> Date: Mon, 11 Apr 2016 11:40:35 +0530 From: Anshuman Khandual User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Balbir Singh , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org CC: hughd@google.com, dave.hansen@intel.com, aneesh.kumar@linux.vnet.ibm.com, kirill@shutemov.name, n-horiguchi@ah.jp.nec.com, mgorman@techsingularity.net, akpm@linux-foundation.org Subject: Re: [PATCH 02/10] mm/hugetlb: Add PGD based implementation awareness References: <1460007464-26726-1-git-send-email-khandual@linux.vnet.ibm.com> <1460007464-26726-3-git-send-email-khandual@linux.vnet.ibm.com> <570622B4.5020407@gmail.com> <570B3531.2000808@linux.vnet.ibm.com> In-Reply-To: <570B3531.2000808@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 16041106-4790-0000-0000-00000EC74C13 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/11/2016 10:55 AM, Anshuman Khandual wrote: > On 04/07/2016 02:34 PM, Balbir Singh wrote: >> > >> > >> > On 07/04/16 15:37, Anshuman Khandual wrote: >>> >> Currently the config ARCH_WANT_GENERAL_HUGETLB enabled functions like >>> >> 'huge_pte_alloc' and 'huge_pte_offset' dont take into account HugeTLB >>> >> page implementation at the PGD level. This is also true for functions >>> >> like 'follow_page_mask' which is called from move_pages() system call. >>> >> This lack of PGD level huge page support prohibits some architectures >>> >> to use these generic HugeTLB functions. >>> >> >> > >> > From what I know of move_pages(), it will always call follow_page_mask() >> > with FOLL_GET (I could be wrong here) and the implementation below >> > returns NULL for follow_huge_pgd(). > You are right. This patch makes ARCH_WANT_GENERAL_HUGETLB functions aware > of PGD implementation so that we can do all transactions on 16GB pages > using these function instead of the present arch overrides. But that also > requires follow_page_mask() changes for every other access to the page > than the migrate_pages() usage. > > But yes, we dont support migrate_pages() on PGD based pages yet, hence > it just returns NULL in that case. May be the commit message needs to > reflect this. The next commit actually changes follow_huge_pud|pgd() functions to support FOLL_GET and PGD based huge page migration.