The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Shawn Bohrer <shawn.bohrer@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Arjan van de Ven <arjan@infradead.org>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: High scheduler wake up times
Date: Mon, 1 Feb 2010 13:37:35 -0600	[thread overview]
Message-ID: <20100201193735.GG27390@mediacenter.gateway.2wire.net> (raw)
In-Reply-To: <1265014290.24455.98.camel@laptop>

On Mon, Feb 01, 2010 at 09:51:30AM +0100, Peter Zijlstra wrote:
> Right, aside from that, CFS will only (potentially) delay your wakeup if
> there's someone else on the cpu at the moment of wakeup, and that's
> fully by design, you don't want to fix that, its bad for throughput.
> 
> If you want deterministic wakeup latencies use a RT scheduling class
> (and kernel).

I've confirmed that running my processes as SCHED_FIFO fixes the issue
and allows me to achieve ~999.99 iterations per second.

> As it stand it appears you have at least two bugs in your application,
> you rely on broken epoll behaviour and you have incorrect assumptions on
> what the regular scheduler class will guarantee you (which is in fact
> nothing other than that your application will at one point in the future
> receive some service, per posix).

Interestingly I can also achieve ~999.99 iterations per second by using an
infinite epoll timeout, and adding a 1 msec periodic timerfd handle to
the epoll set while still using SCHED_OTHER.

So it seems I have two solutions when using a new kernel so I'm
satisfied.  I'll see if I can clean up my patch to fix the broken epoll
behavior and send it in.

Thanks,
Shawn

      reply	other threads:[~2010-02-01 19:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-30 23:45 High scheduler wake up times Shawn Bohrer
2010-01-30 23:56 ` Arjan van de Ven
2010-01-31  0:29   ` Shawn Bohrer
2010-01-31  0:02 ` Arjan van de Ven
2010-01-31  0:11 ` Arjan van de Ven
2010-01-31  0:35   ` Shawn Bohrer
2010-01-31  0:46     ` Shawn Bohrer
2010-01-31  0:47     ` Arjan van de Ven
2010-01-31  3:47       ` Shawn Bohrer
2010-01-31 18:28         ` Arjan van de Ven
2010-01-31 20:50           ` Shawn Bohrer
2010-02-01  8:51       ` Peter Zijlstra
2010-02-01 19:37         ` Shawn Bohrer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100201193735.GG27390@mediacenter.gateway.2wire.net \
    --to=shawn.bohrer@gmail.com \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox