Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754010AbaJAWm4 (ORCPT ); Wed, 1 Oct 2014 18:42:56 -0400 Received: from mail-vc0-f178.google.com ([209.85.220.178]:39483 "EHLO mail-vc0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752129AbaJAWmz (ORCPT ); Wed, 1 Oct 2014 18:42:55 -0400 MIME-Version: 1.0 In-Reply-To: <542C7B5E.2020000@oracle.com> References: <20140930033327.GA14558@redhat.com> <20140930043309.GA16196@redhat.com> <20140930160510.GA15903@redhat.com> <20140930162201.GC15903@redhat.com> <20140930164047.GA18354@redhat.com> <20140930182059.GA24431@redhat.com> <542C7B5E.2020000@oracle.com> Date: Wed, 1 Oct 2014 15:42:53 -0700 X-Google-Sender-Auth: zRaNbIdAaxja33LCbmAvHLTe0b4 Message-ID: Subject: Re: pipe/page fault oddness. From: Linus Torvalds To: Sasha Levin Cc: Hugh Dickins , Dave Jones , Al Viro , Linux Kernel , Rik van Riel , Ingo Molnar , Michel Lespinasse , "Kirill A. Shutemov" , Mel Gorman Content-Type: multipart/mixed; boundary=047d7b3a926474e05005046438ce Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --047d7b3a926474e05005046438ce Content-Type: text/plain; charset=UTF-8 On Wed, Oct 1, 2014 at 3:08 PM, Sasha Levin wrote: > > I've tried this patch on the same configuration that was triggering > the VM_BUG_ON that Hugh mentioned previously. Surprisingly enough it > ran fine for ~20 minutes before exploding with: Well, that's somewhat encouraging. I didn't expect it to be perfect. That said, "ran fine" isn't necessarily the same thing as "worked". Who knows how buggy it was without showing overt symptoms until the BUG_ON() triggered. But hey, I'll be optimistic. > [ 2781.566206] kernel BUG at mm/huge_memory.c:1293! So that's BUG_ON(is_huge_zero_page(page)); and the reason is trivial: the old code used to have a magical special case for the zero-page hugepage (see change_huge_pmd()) and I got rid of that (because now it's just about setting protections, and the zero-page hugepage is in no way special. So I think the solution is equally trivial: just accept that the zero-page can happen, and ignore it (just un-numa it). Appended is a incremental diff on top of the previous one. Even less tested than the last case, but I think you get the idea if it doesn't work as-is. Linus --047d7b3a926474e05005046438ce Content-Type: text/plain; charset=US-ASCII; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i0r9fada0 ZGlmZiAtLWdpdCBhL21tL2h1Z2VfbWVtb3J5LmMgYi9tbS9odWdlX21lbW9yeS5jCmluZGV4IDE0 ZGU1NGFmNmMzOC4uZmMzMzk1MmQ1OWM0IDEwMDY0NAotLS0gYS9tbS9odWdlX21lbW9yeS5jCisr KyBiL21tL2h1Z2VfbWVtb3J5LmMKQEAgLTEyOTAsNyArMTI5MCw5IEBAIGludCBkb19odWdlX3Bt ZF9udW1hX3BhZ2Uoc3RydWN0IG1tX3N0cnVjdCAqbW0sIHN0cnVjdCB2bV9hcmVhX3N0cnVjdCAq dm1hLAogCX0KIAogCXBhZ2UgPSBwbWRfcGFnZShwbWQpOwotCUJVR19PTihpc19odWdlX3plcm9f cGFnZShwYWdlKSk7CisJaWYgKGlzX2h1Z2VfemVyb19wYWdlKHBhZ2UpKQorCQlnb3RvIGh1Z2Vf emVyb19wYWdlOworCiAJcGFnZV9uaWQgPSBwYWdlX3RvX25pZChwYWdlKTsKIAlsYXN0X2NwdXBp ZCA9IHBhZ2VfY3B1cGlkX2xhc3QocGFnZSk7CiAJY291bnRfdm1fbnVtYV9ldmVudChOVU1BX0hJ TlRfRkFVTFRTKTsKQEAgLTEzODEsNiArMTM4MywxMSBAQCBvdXQ6CiAJCXRhc2tfbnVtYV9mYXVs dChsYXN0X2NwdXBpZCwgcGFnZV9uaWQsIEhQQUdFX1BNRF9OUiwgZmxhZ3MpOwogCiAJcmV0dXJu IDA7CitodWdlX3plcm9fcGFnZToKKwlwbWQgPSBwbWRfbW9kaWZ5KHBtZCwgdm1hLT52bV9wYWdl X3Byb3QpOworCXNldF9wbWRfYXQobW0sIGhhZGRyLCBwbWRwLCBwbWQpOworCXVwZGF0ZV9tbXVf Y2FjaGVfcG1kKHZtYSwgYWRkciwgcG1kcCk7CisJZ290byBvdXRfdW5sb2NrOwogfQogCiBpbnQg emFwX2h1Z2VfcG1kKHN0cnVjdCBtbXVfZ2F0aGVyICp0bGIsIHN0cnVjdCB2bV9hcmVhX3N0cnVj dCAqdm1hLAo= --047d7b3a926474e05005046438ce-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/