From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by kanga.kvack.org (Postfix) with ESMTP id ED30A6B0036 for ; Thu, 15 May 2014 13:59:33 -0400 (EDT) Received: by mail-pa0-f54.google.com with SMTP id bj1so1386128pad.27 for ; Thu, 15 May 2014 10:59:33 -0700 (PDT) Received: from mail-pa0-x236.google.com (mail-pa0-x236.google.com [2607:f8b0:400e:c03::236]) by mx.google.com with ESMTPS id he5si3046719pbb.242.2014.05.15.10.59.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 May 2014 10:59:33 -0700 (PDT) Received: by mail-pa0-f54.google.com with SMTP id bj1so1387506pad.13 for ; Thu, 15 May 2014 10:59:32 -0700 (PDT) Date: Thu, 15 May 2014 10:58:16 -0700 (PDT) From: Hugh Dickins Subject: Re: mm: BUG in do_huge_pmd_wp_page In-Reply-To: <5374FCC0.8010809@oracle.com> Message-ID: References: <51559150.3040407@oracle.com> <515D882E.6040001@oracle.com> <533F09F0.1050206@oracle.com> <20140407144835.GA17774@node.dhcp.inet.fi> <5342FF3E.6030306@oracle.com> <20140407201106.GA21633@node.dhcp.inet.fi> <5374FA04.5@oracle.com> <5374FCC0.8010809@oracle.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Sasha Levin Cc: Hugh Dickins , "Kirill A. Shutemov" , "Kirill A. Shutemov" , Andrew Morton , David Rientjes , Andrea Arcangeli , "H. Peter Anvin" , Mel Gorman , Dave Jones , linux-mm , "linux-kernel@vger.kernel.org" , Josh Boyer On Thu, 15 May 2014, Sasha Levin wrote: > On 05/15/2014 01:37 PM, Hugh Dickins wrote: > > On Thu, 15 May 2014, Sasha Levin wrote: > >> On 04/07/2014 04:11 PM, Kirill A. Shutemov wrote: > >>> On Mon, Apr 07, 2014 at 03:40:46PM -0400, Sasha Levin wrote: > >>>>> It also breaks fairly quickly under testing because: > >>>>> > >>>>> On 04/07/2014 10:48 AM, Kirill A. Shutemov wrote: > >>>>>>> + if (IS_ENABLED(CONFIG_DEBUG_PAGEALLOC)) { > >>>>>>> + spin_lock(ptl); > >>>>> > >>>>> ^ We go into atomic > >>>>> > >>>>>>> + if (unlikely(!pmd_same(*pmd, orig_pmd))) > >>>>>>> + goto out_race; > >>>>>>> + } > >>>>>>> + > >>>>>>> if (!page) > >>>>>>> clear_huge_page(new_page, haddr, HPAGE_PMD_NR); > >>>>>>> else > >>>>>>> copy_user_huge_page(new_page, page, haddr, vma, HPAGE_PMD_NR); > >>>>> > >>>>> copy_user_huge_page() doesn't like running in atomic state, > >>>>> and asserts might_sleep(). > >>> Okay, I'll try something else. > >> > >> I've Cc'ed Josh Boyer to this since it just occurred to me that Fedora > >> is running with CONFIG_DEBUG_VM set, where this bug is rather easy to > >> trigger. > >> > >> This issue was neglected because it triggers only on CONFIG_DEBUG_VM builds, > >> but with Fedora running that, maybe it shouldn't be? > > > > But it triggers only on CONFIG_DEBUG_PAGEALLOC builds, doesn't it? > > I hope Fedora doesn't go out with that enabled. > > Ow, it needs DEBUG_PAGEALLOC too? I forgot about that one. Yes. And furthermore, whereas many DEBUG_PAGEALLOC reports are early warnings of real problems in non-DEBUG_PAGEALLOC kernels, this one is not. It's a case where the non-DEBUG_PAGEALLOC kernel is correct, and the DEBUG_PAGEALLOC kernel too strict. Fixable, but not yet in a way that satisfied Kirill or me. > > No problem for Fedora then, sorry for the noise :( Oh, this is much more welcome noise than your usual bug reports :) Hugh -- 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