lkml.org 
[lkml]   [2013]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 3/3] hugetlbfs: add swap entry check in follow_hugetlb_page()
> -               if (absent ||
> + /*
> + * is_swap_pte test covers both is_hugetlb_entry_hwpoisoned
> + * and hugepages under migration in which case
> + * hugetlb_fault waits for the migration and bails out
> + * properly for HWPosined pages.
> + */
> + if (absent || is_swap_pte(huge_ptep_get(pte)) ||
> ((flags & FOLL_WRITE) && !pte_write(huge_ptep_get(pte)))) {
> int ret;

Your comment describe what the code is. However we want the comment describe
why. In migration case, calling hugetlb_fault() is natural. but in
hwpoison case, it is
needed more explanation. Why can't we call is_hugetlb_hwpoisoned() directly?


\
 
 \ /
  Last update: 2013-04-09 04:01    [W:0.057 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site