lkml.org 
[lkml]   [2019]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 11/15] mm: Remove hpage_nr_pages
On Thu, Oct 03, 2019 at 01:08:59PM +0800, Hillf Danton wrote:
>
> On Tue, 24 Sep 2019 17:52:02 -0700 From: Matthew Wilcox (Oracle)
> >
> > @@ -354,7 +354,7 @@ vma_address(struct page *page, struct vm_area_struct *vma)
> > unsigned long start, end;
> >
> > start = __vma_address(page, vma);
> > - end = start + PAGE_SIZE * (hpage_nr_pages(page) - 1);
> > + end = start + page_size(page) - 1;
> >
> > @@ -57,7 +57,7 @@ static inline bool pfn_in_hpage(struct page *hpage, unsigned long pfn)
> > unsigned long hpage_pfn = page_to_pfn(hpage);
> >
> > /* THP can be referenced by any subpage */
> > - return pfn >= hpage_pfn && pfn - hpage_pfn < hpage_nr_pages(hpage);
> > + return (pfn - hpage_pfn) < compound_nr(hpage);
> > }
> >
> > @@ -264,7 +264,7 @@ int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma)
> > unsigned long start, end;
> >
> > start = __vma_address(page, vma);
> > - end = start + PAGE_SIZE * (hpage_nr_pages(page) - 1);
> > + end = start + page_size(page) - 1;
> >
> > if (unlikely(end < vma->vm_start || start >= vma->vm_end))
>
> Be certain that nothing is added other than mechanical replacings in
> the above hunks.

Are you saying I've made a mistake? If so, please be clear.

\
 
 \ /
  Last update: 2019-10-04 21:36    [W:0.169 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site