Re: [PATCH v3 3/3] hugetlbfs: add swap entry check infollow_hugetlb_page()

From: Michal Hocko
Date: Wed Apr 10 2013 - 04:07:28 EST


On Tue 09-04-13 18:00:34, Naoya Horiguchi wrote:
[...]
> I rewrite the comment here, how about this?
>
> - if (absent ||
> + /*
> + * We need call hugetlb_fault for both hugepages under migration
> + * (in which case hugetlb_fault waits for the migration,) and
> + * hwpoisoned hugepages (in which case we need to prevent the
> + * caller from accessing to them.) In order to do this, we use
> + * here is_swap_pte instead of is_hugetlb_entry_migration and
> + * is_hugetlb_entry_hwpoisoned. This is because it simply covers
> + * both cases, and because we can't follow correct pages directly
> + * from any kind of swap entries.
> + */
> + if (absent || is_swap_pte(huge_ptep_get(pte)) ||
> ((flags & FOLL_WRITE) && !pte_write(huge_ptep_get(pte)))) {
> int ret;

OK, thanks!

--
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/