Re: [PATCH 3/5] mm: page_vma_mapped: support checking if a pfn is mapped into a vma

2022-01-24 Thread Muchun Song
On Mon, Jan 24, 2022 at 3:36 PM Christoph Hellwig wrote: > > On Fri, Jan 21, 2022 at 03:55:13PM +0800, Muchun Song wrote: > > + if (pvmw->pte && ((pvmw->flags & PVMW_PFN_WALK) || > > !PageHuge(pvmw->page))) > > Please avoid the overly long line here and in a few other places. OK. > > > +/*

Re: [PATCH 3/5] mm: page_vma_mapped: support checking if a pfn is mapped into a vma

2022-01-23 Thread Christoph Hellwig
On Fri, Jan 21, 2022 at 03:55:13PM +0800, Muchun Song wrote: > + if (pvmw->pte && ((pvmw->flags & PVMW_PFN_WALK) || > !PageHuge(pvmw->page))) Please avoid the overly long line here and in a few other places. > +/* > + * Then at what user virtual address will none of the page be found in

[PATCH 3/5] mm: page_vma_mapped: support checking if a pfn is mapped into a vma

2022-01-20 Thread Muchun Song
page_vma_mapped_walk() is supposed to check if a page is mapped into a vma. However, not all page frames (e.g. PFN_DEV) have a associated struct page with it. There is going to be some duplicate codes similar with this function if someone want to check if a pfn (without a struct page) is mapped