mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Kiszka" <jan.kiszka@googlemail.com>
To: "Arjan van de Ven" <arjan@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, len.brown@intel.com, mingo@elte.hu,
	akpm@osdl.org, jbarnes@virtuousgeek.org, dwalker@mvista.com,
	nickpiggin@yahoo.com.au, rpm@xenomai.org
Subject: Re: [RFC] maximum latency tracking infrastructure (version 2)
Date: Fri, 25 Aug 2006 15:43:44 +0200	[thread overview]
Message-ID: <58d0dbf10608250643v1bb19d0ci99ae30243125a962@mail.gmail.com> (raw)
In-Reply-To: <1156504939.3032.26.camel@laptopd505.fenrus.org>

2006/8/25, Arjan van de Ven <arjan@linux.intel.com>:
> New in this version:
> * implemented the various comments on the code
> * implemented a notifier mechanism so that code can serialize on latency (Nick)
> * put the max latency in the ACPI C states file
>
> One open question is if the sysreq key is considered useful or only a bad hack..
>
>
>
> Subject: [RFC] maximum latency tracking infrastructure
> From: Arjan van de Ven <arjan@linux.intel.com>
>
> The patch below adds infrastructure to track "maximum allowable latency" for
> power saving policies.

Very interesting approach. I wonder if it could be used to cover
another problematic source of latencies as well: asynchronous SMIs.
They quickly cause delays reaching from a few 100 us up to
milliseconds.

Hard-RT extension like Xenomai work around this on several Intel
chipsets by disabling SMI unconditionally (compile-time configurable).
But maybe this could be done in a smarter fashion in mainline
directly. It would likely take some practical boundary (SMI latencies
are fairly board / bios dependent) and a place to put the simple check

    if (system_latency_constraint() < SMI_LATENCY) disable_smi();

Maybe vendors will provide more information on SMI-related latencies,
how to avoid them, and what side effects exist once an infrastrure is
there.

If there is some common interest in this direction, I would try to
spend time on working out a patch based on your infrastructure and our
current material in Xenomai. Or is there already something planned in
this direction?

>
> The reason for adding this infrastructure is that power management in the
> idle loop needs to make a tradeoff between latency and power savings (deeper
> power save modes have a longer latency to running code again).  The code
> that today makes this tradeoff just does a rather simple algorithm; however
> this is not good enough: There are devices and use cases where a lower
> latency is required than that the higher power saving states provide. An
> example would be audio playback, but another example is the ipw2100 wireless
> driver that right now has a very direct and ugly acpi hook to disable some
> higher power states randomly when it gets certain types of error.
>
> The proposed solution is to have an interface where drivers can
> * announce the maximum latency (in microseconds) that they can deal with
> * modify this latency
> * give up their constraint
> and a function where the code that decides on power saving strategy can query
> the current global desired maximum.

I guess an interface to let also applications / the sysadmin specifiy
a latency constraint would be useful as well. sysfs?

Jan

  parent reply	other threads:[~2006-08-25 13:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-25 11:22 Arjan van de Ven
2006-08-25 13:30 ` Alexey Dobriyan
2006-08-25 13:34   ` Arjan van de Ven
2006-08-25 13:58   ` Ingo Molnar
2006-08-25 13:43 ` Jan Kiszka [this message]
2006-08-25 13:48   ` Arjan van de Ven
2006-08-25 14:18     ` Jan Kiszka
2006-08-25 15:15 ` Jesse Barnes
2006-08-25 15:43 ` Daniel Walker
2006-08-25 19:26   ` Arjan van de Ven
2006-08-25 19:35     ` Daniel Walker
2006-08-25 22:14 ` Andrew Morton

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=58d0dbf10608250643v1bb19d0ci99ae30243125a962@mail.gmail.com \
    --to=jan.kiszka@googlemail.com \
    --cc=akpm@osdl.org \
    --cc=arjan@linux.intel.com \
    --cc=dwalker@mvista.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=rpm@xenomai.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®