Re: [PATCH next] mm/migrate: fix remove_migration_pte() of hugetlb entry

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

 



On Mon, 28 Feb 2022, Matthew Wilcox wrote:
> On Sat, Feb 26, 2022 at 06:25:15PM -0800, Hugh Dickins wrote:
> > -		if (!folio_test_ksm(folio))
> > +		/* Skip call in common case, plus .pgoff is invalid for KSM */
> > +		if (pvmw.nr_pages != 1 && !folio_test_hugetlb(folio))
> >  			idx = linear_page_index(vma, pvmw.address) - pvmw.pgoff;
> 
> How do you feel about this instead?
> 
> -               if (!folio_test_ksm(folio))
> +               /* pgoff is invalid for ksm pages, but they are never large */
> +               if (folio_test_large(folio) && !folio_test_hugetlb(folio))
>                         idx = linear_page_index(vma, pvmw.address) - pvmw.pgoff;
> 

That looks nicer to me too.  I'll assume that's what you will add
or squash in your tree, and no need for me to resend - thanks.

Hugh




[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