mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Erik Rigtorp <erik@rigtorp.com>
To: linux-kernel@vger.kernel.org
Subject: Monitoring file descriptors without switching context
Date: Mon, 11 Jan 2010 11:29:14 +0100	[thread overview]
Message-ID: <a57051ba1001110229q2ca28ffbqea37d07735debb52@mail.gmail.com> (raw)

Hi!

I'm working on a low latency soft real time system. We currently run
on Solaris because it has a lower latency TCP stack and less IPC
overhead. I did some experiments with IPC using pipes on Linux. If i
use non-blocking pipes and do a busy reading loop I can achieve
latencies around 1µs. Using blocking pipes or select()/poll()
latencies increase to about 10µs. In general when I use some blocking
system call latencies increase because my process will be put on a
wait queue and the scheduler will do a context switch. However I have
more cores than I have processes/threads  so I don't mind blocking a
whole core to wait for IO, that way I don't incur a full context
switch when the process waits for IO.

What I really need is some way to have the hardware block and monitor
IO for me. Would it be feasible to implement a special low latency
poll() syscall that uses MONITOR/MWAIT instructions to monitor file
descriptors?

I think in order to utilize new multicore CPUs like the Tileras we
need a better signaling mechanism with lower latency than what we
currently have using the scheduler.

Erik Rigtorp

             reply	other threads:[~2010-01-11 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 10:29 Erik Rigtorp [this message]
2010-01-11 10:59 ` Alan Cox
2010-01-11 11:51   ` Erik Rigtorp

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=a57051ba1001110229q2ca28ffbqea37d07735debb52@mail.gmail.com \
    --to=erik@rigtorp.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®