lkml.org 
[lkml]   [2022]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 1/5] mm/hugetlb: fix races when looking up a CONT-PTE size hugetlb page
From

>> + /*
>> + * try_grab_page() should always succeed here, because we hold
>> + * the ptl lock and have verified pte_present().
>> + */
>> + if (WARN_ON_ONCE(!try_grab_page(page, flags))) {
>> + page = NULL;
>> + goto out;
>> + }
>> + } else {
>
> Should add FOLL_MIGRATION validation before waiting a migration entry.

We really only need FOLL_MIGRATION for KSM. As hugetlb pages cannot be
KSM pages, we don't need this.

Actually, I do have patches in the works that rip out FOLL_MIGRATION
completely by adjusting KSM code.

So let's try to not add dead code (although it would make sense for
feature completeness as is -- but then, FOLL_MIGRATION really needs to go).

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2022-08-25 09:12    [W:3.010 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site