From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail190.messagelabs.com (mail190.messagelabs.com [216.82.249.51]) by kanga.kvack.org (Postfix) with SMTP id B660D6B004A for ; Thu, 23 Sep 2010 13:12:59 -0400 (EDT) Date: Thu, 23 Sep 2010 12:12:55 -0500 (CDT) From: Christoph Lameter Subject: Re: [PATCH 06/10] hugetlb: move refcounting in hugepage allocation inside hugetlb_lock In-Reply-To: <1283908781-13810-7-git-send-email-n-horiguchi@ah.jp.nec.com> Message-ID: References: <1283908781-13810-1-git-send-email-n-horiguchi@ah.jp.nec.com> <1283908781-13810-7-git-send-email-n-horiguchi@ah.jp.nec.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org To: Naoya Horiguchi Cc: Andi Kleen , Andrew Morton , Mel Gorman , Wu Fengguang , Jun'ichi Nomura , linux-mm , LKML List-ID: On Wed, 8 Sep 2010, Naoya Horiguchi wrote: > Currently alloc_huge_page() raises page refcount outside hugetlb_lock. > but it causes race when dequeue_hwpoison_huge_page() runs concurrently > with alloc_huge_page(). > To avoid it, this patch moves set_page_refcounted() in hugetlb_lock. Reviewed-by: Christoph Lameter One wonders though how many other of these huge races are still there though. "Normal" page migration is based on LRU isolation and therefore does not suffer from these problems on allocation since the page is not yet on the LRU. Also the LRU isolation is a known issue due to memory reclaim doing this. This protection is going away of one goes directly to a page without going through the LRU. That should create more races... -- 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