mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: 7eggert@gmx.de
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	arjan@infradead.org, David Woodhouse <dwmw2@infradead.org>
Subject: Re: [RFC] schedule_timeout_range()
Date: Thu, 24 Jul 2008 10:53:49 +1000	[thread overview]
Message-ID: <200807241053.49304.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <E1KLct4-0001Wx-O9@be1.7eggert.dyndns.org>

On Wednesday 23 July 2008 21:52, Bodo Eggert wrote:
> Nick Piggin <nickpiggin@yahoo.com.au> wrote:
> > The only thing I dislike about explicit times is that when a driver or
> > someone doesn't _really_ know how much to specify. Do you say 10s, 100s?
> > It shouldn't be arbitrary, but we should have a few constants I think.
>
> You'd replace "Should I use 10 or 100 seconds?" with "Should I use
> TIMEOUT_10_SEC or TIMEOUT_100_SEC?", while replacing "I want 40 seconds!"
> with "Danmed, I want 40 seconds, but that's not an option!".
>
> BTW: If you don't know about which timeout you should use, you should think
> about mowing the lawn instead. ¢¢

It's not always that simple. If you code drivers or network protocols,
it might seem easy, but a lot of the VM for example is riddled with
rather arbitrary heuristics. Suppose we do slab cache reaping at 1HZ
(for no really good reason)... what I want to do with that guy is to
get maximum power savings when the CPU is idle, however I don't want to
wait infinitely long because that's leaving work to do when the CPU
finally does wake up, and it also ties up memory. I want the minimum
timeout that gives maximum power saving (say, within 99.9% of theoretical
maximum).

Can you tell me how to achieve this, or do you have lawn to mow too? ;)

OK, today we probably just add a few seconds of slop and forget about it,
but actually in future if we might want to power down most of the system
between key strokes, we might want 10s of seconds of sleep time.


  reply	other threads:[~2008-07-24  0:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <aSgqr-EJ-15@gated-at.bofh.it>
     [not found] ` <aShcU-3uj-11@gated-at.bofh.it>
     [not found]   ` <aShw5-4ai-9@gated-at.bofh.it>
     [not found]     ` <aShPs-4IY-1@gated-at.bofh.it>
2008-07-23 11:52       ` Bodo Eggert
2008-07-24  0:53         ` Nick Piggin [this message]
2008-07-22  3:02 [RFC] Imprecise timers David Woodhouse
2008-07-22  3:05 ` [RFC] schedule_timeout_range() David Woodhouse
2008-07-22  3:56   ` Nick Piggin
2008-07-22  4:12     ` David Woodhouse
2008-07-22  4:26       ` Arjan van de Ven
2008-07-22  4:34         ` David Woodhouse
2008-07-22  4:33       ` Nick Piggin
2008-07-22  4:45         ` David Woodhouse
2008-07-22  4:50           ` Nick Piggin
2008-07-22  4:58             ` David Woodhouse
2008-07-22  5:35               ` Jan Engelhardt
2008-07-22  4:33     ` Arjan van de Ven

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=200807241053.49304.nickpiggin@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=7eggert@gmx.de \
    --cc=arjan@infradead.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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®