Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1354069 > unrolled thread

[RFC 3/9] mm/gup: Make follow_page_mask function PGD implementation aware

Started byAnshuman Khandual <khandual@linux.vnet.ibm.com>
First post2016-03-09 13:20 +0100
Last post2016-03-11 04:10 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC 3/9] mm/gup: Make follow_page_mask function PGD implementation aware Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-03-09 13:20 +0100
    Re: [RFC 3/9] mm/gup: Make follow_page_mask function PGD implementation  aware Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-03-11 04:10 +0100

#1354069 — [RFC 3/9] mm/gup: Make follow_page_mask function PGD implementation aware

FromAnshuman Khandual <khandual@linux.vnet.ibm.com>
Date2016-03-09 13:20 +0100
Subject[RFC 3/9] mm/gup: Make follow_page_mask function PGD implementation aware
Message-ID<raLfQ-7Ms-35@gated-at.bofh.it>
Currently the function 'follow_page_mask' does not take into account
PGD based huge page implementation. This change achieves that and
makes it complete.

Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
 mm/gup.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/mm/gup.c b/mm/gup.c
index 7bf19ff..53a2013 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -232,6 +232,12 @@ struct page *follow_page_mask(struct vm_area_struct *vma,
 	pgd = pgd_offset(mm, address);
 	if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))
 		return no_page_table(vma, flags);
+	if (pgd_huge(*pgd) && vma->vm_flags & VM_HUGETLB) {
+		page = follow_huge_pgd(mm, address, pgd, flags);
+		if (page)
+			return page;
+		return no_page_table(vma, flags);
+	}
 
 	pud = pud_offset(pgd, address);
 	if (pud_none(*pud))
-- 
2.1.0

[toc] | [next] | [standalone]


#1355558 — Re: [RFC 3/9] mm/gup: Make follow_page_mask function PGD implementation aware

FromAnshuman Khandual <khandual@linux.vnet.ibm.com>
Date2016-03-11 04:10 +0100
SubjectRe: [RFC 3/9] mm/gup: Make follow_page_mask function PGD implementation aware
Message-ID<rblCG-8hC-7@gated-at.bofh.it>
In reply to#1354069
On 03/09/2016 05:40 PM, Anshuman Khandual wrote:
> Currently the function 'follow_page_mask' does not take into account
> PGD based huge page implementation. This change achieves that and
> makes it complete.

Hugh/Mel/Naoya/Andrew,

	Thoughts/inputs/suggestions ? Does this change look okay ?

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web