From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755310AbcA1RtN (ORCPT ); Thu, 28 Jan 2016 12:49:13 -0500 Received: from casper.infradead.org ([85.118.1.10]:47837 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751832AbcA1RtL (ORCPT ); Thu, 28 Jan 2016 12:49:11 -0500 Date: Thu, 28 Jan 2016 18:49:03 +0100 From: Peter Zijlstra To: Jan Stancek Cc: alex.shi@intel.com, guz.fnst@cn.fujitsu.com, mingo@redhat.com, jolsa@redhat.com, riel@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [BUG] scheduler doesn't balance thread to idle cpu for 3 seconds Message-ID: <20160128174903.GV6356@twins.programming.kicks-ass.net> References: <56A8D994.6050205@redhat.com> <56AA39D6.4070509@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56AA39D6.4070509@redhat.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 28, 2016 at 04:55:02PM +0100, Jan Stancek wrote: > On 01/27/2016 03:52 PM, Jan Stancek wrote: > > Hello, > > > > pthread_cond_wait_1/2 [1] is rarely failing for me on 4.5.0-rc1, > > on x86_64 KVM guest with 2 CPUs. > > > > This test [1]: > > - spawns 2 SCHED_RR threads > > - first thread with higher priority sets alarm for 2 seconds and blocks on condition > > - second thread with lower priority is busy looping for 5 seconds > > - after 2 seconds alarm signal arrives and handler signals condition > > - high priority thread should resume running > > I have slightly modified testcase, so it will finish immediately when high prio > thread is done. And also to allow it to compile outside of openposix testsuite. Yeah, I 'fixed' the testcase too. So I've had it run for almost 2 hours without a single fail. I've hot-plugged my cpu count down to 2. How long should I have to wait for a fail?