[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20191004193629.GO32665@bombadil.infradead.org>
Date: Fri, 4 Oct 2019 12:36:29 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Hillf Danton <hdanton@...a.com>
Cc: linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [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.
Powered by blists - more mailing lists