Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1320948

Re: [BUG] scheduler doesn't balance thread to idle cpu for 3 seconds

From Jan Stancek <jstancek@redhat.com>
Newsgroups linux.kernel
Subject Re: [BUG] scheduler doesn't balance thread to idle cpu for 3 seconds
Date 2016-01-28 20:00 +0100
Message-ID <qVZXs-7BG-15@gated-at.bofh.it> (permalink)
References <qVzJE-4Zj-9@gated-at.bofh.it> <qVX9g-5Ao-13@gated-at.bofh.it> <qVYRI-6R2-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw





----- Original Message -----
> From: "Peter Zijlstra" <peterz@infradead.org>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: "alex shi" <alex.shi@intel.com>, "guz fnst" <guz.fnst@cn.fujitsu.com>, mingo@redhat.com, jolsa@redhat.com,
> riel@redhat.com, linux-kernel@vger.kernel.org
> Sent: Thursday, 28 January, 2016 6:49:03 PM
> Subject: Re: [BUG] scheduler doesn't balance thread to idle cpu for 3 seconds
> 
> 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.

I can try that too. I'm mostly seeing this on s390 and x86_64 KVM guests,
both have 2 CPUs.

Have you noticed if iteration times vary or if they stay consitently
at ~2 seconds?

> 
> How long should I have to wait for a fail?

It's about 1000-2000 iterations for me, which I think you covered
by now in those 2 hours.

Regards,
Jan

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [BUG] scheduler doesn't balance thread to idle cpu for 3 seconds Jan Stancek <jstancek@redhat.com> - 2016-01-28 17:00 +0100
  Re: [BUG] scheduler doesn't balance thread to idle cpu for 3 seconds Peter Zijlstra <peterz@infradead.org> - 2016-01-28 18:50 +0100
    Re: [BUG] scheduler doesn't balance thread to idle cpu for 3  seconds Jan Stancek <jstancek@redhat.com> - 2016-01-28 20:00 +0100
      Re: [BUG] scheduler doesn't balance thread to idle cpu for 3 seconds Peter Zijlstra <peterz@infradead.org> - 2016-01-29 11:20 +0100
        Re: [BUG] scheduler doesn't balance thread to idle cpu for 3  seconds Jan Stancek <jstancek@redhat.com> - 2016-01-29 11:40 +0100
          Re: [BUG] scheduler doesn't balance thread to idle cpu for 3 seconds Jan Stancek <jstancek@redhat.com> - 2016-02-08 14:50 +0100

csiph-web