Re: [PATCH -next v3 5/7] mm/damon/vaddr: convert damon_young_pmd_entry() to use folio

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

 



On Wed, Dec 28, 2022 at 07:34:11PM +0800, Kefeng Wang wrote:
> -		if (pmd_young(*pmd) || !page_is_idle(page) ||
> +		if (pmd_young(*pmd) || !folio_test_idle(folio) ||
>  					mmu_notifier_test_young(walk->mm,
>  						addr)) {
>  			*priv->page_sz = HPAGE_PMD_SIZE;

hmm ...

>  	pte = pte_offset_map_lock(walk->mm, pmd, addr, &ptl);
>  	if (!pte_present(*pte))
>  		goto out;
> -	page = damon_get_page(pte_pfn(*pte));
> -	if (!page)
> +	folio = damon_get_folio(pte_pfn(*pte));
> +	if (!folio)
>  		goto out;
> -	if (pte_young(*pte) || !page_is_idle(page) ||
> +	if (pte_young(*pte) || !folio_test_idle(folio) ||
>  			mmu_notifier_test_young(walk->mm, addr)) {
>  		*priv->page_sz = PAGE_SIZE;

hmm ...

So why aren't we doing '*priv->page_sz = folio_size(folio)'?  What does
DAMON want to do when encountering folios that are neither PAGE_SIZE
nor HPAGE_PMD_SIZE?




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

  Powered by Linux