9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Charles Forsyth <charles.forsyth@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] sleep(2) historical question
Date: Thu, 29 Nov 2012 09:19:18 +0000	[thread overview]
Message-ID: <CAOw7k5hHyHpRz=Qjb5KT4vGLqF_T8U-gwTDYLvr-Tqdj2s=5Jw@mail.gmail.com> (raw)
In-Reply-To: <201211290812.qAT8CL0h010477@freefriends.org>

My problem is that the kernel is not currently capable of supplying
what Erik defines, to the process level even internally,
and even for his described applications (delays of a small interval,
tiny retransmission times), it's not clear that the traditional sleep,
which has
*always* been sloppy, is anyway the right model; and certainly not for
any more general application.
I had a quick read through some papers and theses last night, and it
certainly isn't clear cut.

What values could the kernel currently supply to a query interface?
There are no particular bounds
on anything, which was rather my point. I had a similar problem
*inside the kernel* when dealing with
a fast network interface on the Blue Gene.

The whole thing started with an "historical question": "why is
sleep(2) limited to resolution HZ in the portable code? ..."
and I gave what I think is the correct reply historically: "the
relative unimportance of sleep?", but as usual that didn't go down
very well.

For relatively small delays, sleep -> tsleep isn't right. Most of the
ways of making "high-precision" timers available at user level
contain a lot of overhead, or frustration when trying to use them (eg,
POSIX sends a signal, never a harbinger of speed or ease of use).
I've probably just had my fill of general-purpose systems that confuse
"not too often slow" with "timely".

It's less of a problem for Plan 9, than Nix, where I'd like to see any
new things added be sound.

On 29 November 2012 08:12,  <arnold@skeeve.com> wrote:
> Erik's problem boils down to "the kernel knows what it can do and is
> quite capable but i can't get it at from user space".



  reply	other threads:[~2012-11-29  9:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 23:19 erik quanstrom
2012-11-28  7:37 ` Charles Forsyth
2012-11-28 12:57   ` erik quanstrom
2012-11-28 13:10     ` Charles Forsyth
2012-11-28 13:30       ` erik quanstrom
2012-11-28 14:35         ` Charles Forsyth
2012-11-28 14:46           ` erik quanstrom
2012-11-28 18:58         ` Bakul Shah
2012-11-28 19:10           ` Charles Forsyth
2012-11-28 19:28             ` erik quanstrom
2012-11-28 18:56               ` cinap_lenrek
2012-11-28 19:38             ` Bakul Shah
2012-11-28 20:58               ` Charles Forsyth
2012-11-28 21:02                 ` erik quanstrom
2012-11-28 21:13                   ` Charles Forsyth
2012-11-28 21:19                     ` erik quanstrom
2012-11-28 21:21                     ` erik quanstrom
2012-11-28 21:43                 ` Bakul Shah
2012-11-29  0:12                   ` Charles Forsyth
2012-11-29  8:12                   ` arnold
2012-11-29  9:19                     ` Charles Forsyth [this message]
2012-11-29 15:17                       ` erik quanstrom
2012-11-28 19:27           ` David Arnold
2012-11-28 21:12             ` Charles Forsyth
2012-11-28 19:29           ` erik quanstrom
2012-11-28 19:54             ` Bakul Shah
2012-11-28 19:57               ` erik quanstrom

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='CAOw7k5hHyHpRz=Qjb5KT4vGLqF_T8U-gwTDYLvr-Tqdj2s=5Jw@mail.gmail.com' \
    --to=charles.forsyth@gmail.com \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).