Re: [PATCHv4 19/24] thp, mm: use migration entries to freeze page counts on split

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 30, 2015 at 08:38:08PM +0530, Aneesh Kumar K.V wrote:
> ....
> ....
>  +static void freeze_page(struct anon_vma *anon_vma, struct page *page)
> > +{
> > +	struct anon_vma_chain *avc;
> > +	struct vm_area_struct *vma;
> > +	pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
> 
> So this get called only with head page, We also do
> BUG_ON(PageTail(page)) in the caller.  But
> 
> 
> > +	unsigned long addr, haddr;
> > +	unsigned long mmun_start, mmun_end;
> > +	pgd_t *pgd;
> > +	pud_t *pud;
> > +	pmd_t *pmd;
> > +	pte_t *start_pte, *pte;
> > +	spinlock_t *ptl;
> ......
> 
> 
> > +
> > +static void unfreeze_page(struct anon_vma *anon_vma, struct page *page)
> > +{
> > +	struct anon_vma_chain *avc;
> > +	pgoff_t pgoff = page_to_pgoff(page);
> 
> Why ? Can this get called for tail pages ?

It cannot. pgoff is offset of head page (and therefore whole compound
page) within rmapping.

-- 
 Kirill A. Shutemov

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]