From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx109.postini.com [74.125.245.109]) by kanga.kvack.org (Postfix) with SMTP id E98586B0005 for ; Tue, 9 Apr 2013 21:54:16 -0400 (EDT) Received: by mail-oa0-f52.google.com with SMTP id k14so8237644oag.11 for ; Tue, 09 Apr 2013 18:54:16 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1365544834-c6v2jpoo-mutt-n-horiguchi@ah.jp.nec.com> References: <1365014138-19589-1-git-send-email-n-horiguchi@ah.jp.nec.com> <1365014138-19589-4-git-send-email-n-horiguchi@ah.jp.nec.com> <515F1F1F.6060900@gmail.com> <1365449252-9pc7knd5-mutt-n-horiguchi@ah.jp.nec.com> <1365544834-c6v2jpoo-mutt-n-horiguchi@ah.jp.nec.com> From: KOSAKI Motohiro Date: Tue, 9 Apr 2013 21:53:55 -0400 Message-ID: Subject: Re: [PATCH v3 3/3] hugetlbfs: add swap entry check in follow_hugetlb_page() Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Naoya Horiguchi Cc: Andrew Morton , Mel Gorman , Hugh Dickins , Rik van Riel , Konstantin Khlebnikov , Michal Hocko , HATAYAMA Daisuke , "linux-mm@kvack.org" , LKML > 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; Looks ok to me. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org