From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933196AbbI2IUG (ORCPT ); Tue, 29 Sep 2015 04:20:06 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:35310 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932823AbbI2ITy (ORCPT ); Tue, 29 Sep 2015 04:19:54 -0400 Message-ID: <1443514791.5403.12.camel@gmail.com> Subject: Re: [v4.2+ regression] fd7a4bed sched, rt: Convert switched_{from, to}_rt() / prio_changed_rt() to balance callbacks From: Mike Galbraith To: Peter Zijlstra , Darren Hart Cc: Ingo Molnar , LKML Date: Tue, 29 Sep 2015 10:19:51 +0200 In-Reply-To: <1443406620.3293.26.camel@gmail.com> References: <1443406620.3293.26.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2015-09-28 at 04:17 +0200, Mike Galbraith wrote: > Hi Peter, > > I bumped into an odd futextest regression, and finally bisected it to > $subject. I haven't poked at it yet, chasing down and confirming the > little bugger munched the day. homer:/home/git/futextest/functional # ./futex_requeue_pi -c -b -o -t 500000 -v 2 2>&1|egrep 'exit|Blocker' INFO: Waiter 0: exiting with 0 INFO: Waiter 1: exiting with 0 INFO: Waiter 2: exiting with 0 INFO: Waiter 3: exiting with 0 INFO: Waiter 4: exiting with 0 INFO: Waiter 5: exiting with 0 INFO: Waiter 6: exiting with 0 INFO: Waiter 7: exiting with 0 INFO: Waiter 8: exiting with 0 INFO: Waiter 9: exiting with 0 INFO: Waker: exiting with 0 INFO: Blocker: Calling futex_wait() Well now, it _seems_ you're innocent Peter. Waker can call futex_wake() before blocker calls futex_wait(), leaving poor blocker stranded. Adding atomic_inc(&waiters_blocked) to blocker, and telling wakers to expect one more when a blocker exists seems to have fixed it up. -Mike