From: Arjan van de Ven <arjan@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, tglx@tglx.de
Subject: Re: [PATCH 4/5] select: make select() use schedule_hrtimeout()
Date: Fri, 29 Aug 2008 09:30:17 -0700 [thread overview]
Message-ID: <20080829093017.7ff4389d@infradead.org> (raw)
In-Reply-To: <alpine.LFD.1.10.0808290915560.3300@nehalem.linux-foundation.org>
On Fri, 29 Aug 2008 09:20:18 -0700 (PDT)
Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
>
> On Fri, 29 Aug 2008, Arjan van de Ven wrote:
> >
> > now that we have schedule_hrtimeout(), make select() use it.
> > But only for short delays; really long delays are assumed to not
> > need the highres level of accuracy but rather want the regular
> > timer behavior for now.
>
> This is _really_ ugly.
>
> Can't you just do this relaxation in "schedule_hrtimeout()" instead,
> and just document the fact that the "high resolution" of hrtimeout is
> relative to the length of the timeout.
yes we can
(sorry, bad pun)
> It's not that select() doesn't care, it's that *NOBODY* cares. If
> somebody asks for a timeout of one second and 2 microseconds, the two
> microseconds simply don't matter. Ever. But if somebody asks for a
> timeout of 12 microseconds, individual microseconds probably _do_
> matter.
ok I'll do it this way; I wanted to avoid changing behavior for long
delays (some people think there's too much overhead in hrtimers or
something) but i'm totally fine with not doing this bifurbicated
braintwist at all.
>
> So if you want high-resolution select/poll, then get rid of the
> "use_hr" logic entirely, and just do it unconditionally. Then, relax
> the scheduler timeouts in the scheduler.
ok, no big deal, see below
>
> (But, that's probably _generally_ true. Even now, when people do
> "schedule_timeout()", there's a big difference between asking for two
> ticks and asking for two seconds. The latter should probably try to
> round to a nice timer tick basis for power reasons).
yes that's a separate story; this is what "range timers" are about and
David Woodhouse and I are working on that as well
(but this select stuff is basically a prerequisite to use that)
next prev parent reply other threads:[~2008-08-29 16:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-29 15:05 [patch 0/5] Nano/Microsecond resolution for select() and poll() Arjan van de Ven
2008-08-29 15:06 ` [PATCH 1/5] select: add a timespec version of the timeout to select/poll Arjan van de Ven
2008-08-30 2:10 ` Andrew Morton
2008-08-30 2:54 ` Linus Torvalds
2008-08-29 15:07 ` [PATCH 2/5] select: return accurate remainer in select() and ppoll() Arjan van de Ven
2008-08-29 15:07 ` [PATCH 3/5] select: introduce a schedule_hrtimeout() function Arjan van de Ven
2008-08-29 15:08 ` [PATCH 4/5] select: make select() use schedule_hrtimeout() Arjan van de Ven
2008-08-29 15:36 ` Arnd Bergmann
2008-08-29 15:59 ` Daniel Walker
2008-08-29 16:20 ` Linus Torvalds
2008-08-29 16:11 ` Alan Cox
2008-08-29 17:26 ` Linus Torvalds
2008-08-29 17:42 ` Arjan van de Ven
2008-08-29 18:18 ` Alan Cox
2008-08-29 18:46 ` Linus Torvalds
2008-08-29 18:33 ` Alan Cox
2008-08-30 15:25 ` Arjan van de Ven
2008-08-29 16:30 ` Arjan van de Ven [this message]
2008-08-29 15:08 ` [PATCH 5/5] select: make poll() use schedule_hrtimeout() as well Arjan van de Ven
2008-08-29 15:54 ` [patch 0/5] Nano/Microsecond resolution for select() and poll() Arnd Bergmann
2008-08-29 16:12 ` Arjan van de Ven
2008-08-29 22:15 ` Brian Wellington
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=20080829093017.7ff4389d@infradead.org \
--to=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@tglx.de \
--cc=torvalds@linux-foundation.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