Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755541AbbLABrj (ORCPT ); Mon, 30 Nov 2015 20:47:39 -0500 Received: from mail-io0-f169.google.com ([209.85.223.169]:33536 "EHLO mail-io0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753948AbbLABri (ORCPT ); Mon, 30 Nov 2015 20:47:38 -0500 MIME-Version: 1.0 In-Reply-To: <1448933660-23082-1-git-send-email-sasha.levin@oracle.com> References: <1448933660-23082-1-git-send-email-sasha.levin@oracle.com> Date: Mon, 30 Nov 2015 17:47:37 -0800 X-Google-Sender-Auth: UKFVfz5rnIZO2ptHV6gp8ebkOVc Message-ID: Subject: Re: [PATCH] sched: remove false-positive warning from wake_up_process() From: Linus Torvalds To: Sasha Levin Cc: Ingo Molnar , Peter Zijlstra , Linux Kernel Mailing List , Oleg Nesterov 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: 1319 Lines: 33 On Mon, Nov 30, 2015 at 5:34 PM, Sasha Levin wrote: > Futex can have a spurious wake up before we actually wake it up on our own, > which will trigger this warning if the task is still stopped. Actually, I think it would presumably be the other way around: a spurious stale futex wakeup happens *after* the process has been woken up for some other reason and moved to stopped state. (The "wake up and move to stopped state" could be for the same reason: a SIGSTOP signal). So the setup is presumably something like this: - on cpu1: futex code is about to go to sleep, adds itself to the futex hash chains, but then gets interrupted by a SIGSTOP - in the meantime, on cpu2, the futex is changed, and the wakup code sees the process from cpu1 on the futex hash chains - on cpu1, the process has now removed itself from the hash chains, and goes through the signal code that sets the state to STOPPED - in the meantime, on cpu2, the futex code now gets around to waking things up, and sees that stopped state Roughly. 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/