Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754637AbbDTQEY (ORCPT ); Mon, 20 Apr 2015 12:04:24 -0400 Received: from mail-ig0-f173.google.com ([209.85.213.173]:33780 "EHLO mail-ig0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753956AbbDTQEV (ORCPT ); Mon, 20 Apr 2015 12:04:21 -0400 MIME-Version: 1.0 In-Reply-To: <1429471060-21271-3-git-send-email-dave@stgolabs.net> References: <1429471060-21271-1-git-send-email-dave@stgolabs.net> <1429471060-21271-3-git-send-email-dave@stgolabs.net> Date: Mon, 20 Apr 2015 09:04:20 -0700 X-Google-Sender-Auth: TcVp-UnzBaGGXfCcuAVnvxHNNv8 Message-ID: Subject: Re: [PATCH 2/2] futex: lockless wakeups From: Linus Torvalds To: Davidlohr Bueso Cc: Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Sebastian Andrzej Siewior , Chris Mason , Steven Rostedt , fredrik.markstrom@windriver.com, Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 935 Lines: 19 On Sun, Apr 19, 2015 at 12:17 PM, Davidlohr Bueso wrote: > > Naturally, this can cause spurious wakeups. However there is core code > that cannot handle them afaict, and furthermore tglx does have the point > that other events can already trigger them anyway. Indeed. We need to make this *very* explicit. We have absolutely _always_ had spurious wakeups. The semaphore code does it today, other code has done it historically. Nobody should ever expect that there si only one unique wakeup source. Anybody who sleeps on a condition needs to re-check the condition rather than assume that "because I was woken up the condition must now be true". Linus -- 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/