Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757046Ab3C3RWw (ORCPT ); Sat, 30 Mar 2013 13:22:52 -0400 Received: from mail-vc0-f177.google.com ([209.85.220.177]:35337 "EHLO mail-vc0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756888Ab3C3RWu (ORCPT ); Sat, 30 Mar 2013 13:22:50 -0400 MIME-Version: 1.0 In-Reply-To: References: <1363809337-29718-1-git-send-email-riel@surriel.com> <20130321141058.76e028e492f98f6ee6e60353@linux-foundation.org> <20130326192852.GA25899@redhat.com> <20130326124309.077e21a9f59aaa3f3355e09b@linux-foundation.org> <20130329161746.GA8391@redhat.com> <1364609309.1818.8.camel@buesod1.americas.hpqcorp.net> Date: Sat, 30 Mar 2013 10:22:49 -0700 X-Google-Sender-Auth: ZEdYstq2PNBQPjWEXZxtnmfHqTc Message-ID: Subject: Re: ipc,sem: sysv semaphore scalability From: Linus Torvalds To: Emmanuel Benisty Cc: Davidlohr Bueso , Dave Jones , Andrew Morton , Rik van Riel , Linux Kernel Mailing List , hhuang@redhat.com, "Low, Jason" , Michel Lespinasse , Larry Woodman , "Vinod, Chegu" , Peter Hurley Content-Type: multipart/mixed; boundary=089e0158b3aa187c6e04d927a358 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4586 Lines: 79 --089e0158b3aa187c6e04d927a358 Content-Type: text/plain; charset=UTF-8 On Fri, Mar 29, 2013 at 10:57 PM, Emmanuel Benisty wrote: > On Sat, Mar 30, 2013 at 12:10 PM, Linus Torvalds >> >> This came from the gcc build? > > yes, very early in the build process, IIRC this line was repeated a > few times and the build just stalled. Ok, we're bringing out the crazy hacks now. The attached patch is just insane, doesn't really even work in general, and only even compiles on 64-bit. But it should work in *practice* to find if somebody adds the same RCU head to the RCU lists twice, and ignore the second time it happens (and give a warning that hopefully pinpoints the backtrace). It's ugly. It's broken. It may not work. In other words, I'm not proud of it. But you seem to be the only one able to trigger the issue easily, willing to try crazy crap, so "tag, you're it". Maybe this gives us more information. And maybe it doesn't, and I'm totally wrong about the whole "rcu head added twice" theory. Linus --089e0158b3aa187c6e04d927a358 Content-Type: application/octet-stream; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hex1sypn0 IGluY2x1ZGUvbGludXgvdHlwZXMuaCB8IDEgKwogaW5jbHVkZS9uZXQvZHN0LmggICAgIHwgMiAr LQoga2VybmVsL3JjdS5oICAgICAgICAgIHwgMSArCiBrZXJuZWwvcmN1dHJlZS5jICAgICAgfCA2 ICsrKysrKwogNCBmaWxlcyBjaGFuZ2VkLCA5IGluc2VydGlvbnMoKyksIDEgZGVsZXRpb24oLSkK CmRpZmYgLS1naXQgYS9pbmNsdWRlL2xpbnV4L3R5cGVzLmggYi9pbmNsdWRlL2xpbnV4L3R5cGVz LmgKaW5kZXggNGQxMThiYTExMzQ5Li4zZjBkOWRhZmY5MDYgMTAwNjQ0Ci0tLSBhL2luY2x1ZGUv bGludXgvdHlwZXMuaAorKysgYi9pbmNsdWRlL2xpbnV4L3R5cGVzLmgKQEAgLTIwOSw2ICsyMDks NyBAQCBzdHJ1Y3QgdXN0YXQgewogc3RydWN0IGNhbGxiYWNrX2hlYWQgewogCXN0cnVjdCBjYWxs YmFja19oZWFkICpuZXh0OwogCXZvaWQgKCpmdW5jKShzdHJ1Y3QgY2FsbGJhY2tfaGVhZCAqaGVh ZCk7CisJdW5zaWduZWQgbG9uZyBtYWdpYzsKIH07CiAjZGVmaW5lIHJjdV9oZWFkIGNhbGxiYWNr X2hlYWQKIApkaWZmIC0tZ2l0IGEvaW5jbHVkZS9uZXQvZHN0LmggYi9pbmNsdWRlL25ldC9kc3Qu aAppbmRleCAxZjhmZDEwOWUyMjUuLjZmOGFjZDAzMTk0OCAxMDA2NDQKLS0tIGEvaW5jbHVkZS9u ZXQvZHN0LmgKKysrIGIvaW5jbHVkZS9u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W5uaW5ncy4K --089e0158b3aa187c6e04d927a358-- -- 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/