All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Frederik Bayart <frederik.bayart@triphase.com>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] cpu usage
Date: Fri, 27 Jul 2012 16:01:03 +0200	[thread overview]
Message-ID: <50129F1F.5030205@xenomai.org> (raw)
In-Reply-To: <CALH4WdYGnV6hwgAtLT5pLVsFaAqT5BmZS82ueZV9LRTuby-97A@mail.gmail.com>

On 07/27/2012 03:58 PM, Frederik Bayart wrote:

> The use case is : we are using an i7 processor. We noticed that
> internally, the processor is shifting frequency to minimize idle time.
> (This is not done by linux, we used cpufreq to avoid that but there is
> still some software on the processor that is shifting frequency). This
> has as consequence that the required rate of our realtime process,
> which is a periodic task, becomes to fast for the processor.
> To avoid downscaling of the cpu frequency, we had the  idea to run
> additionally a busywait loop at priority 0 so that the processor is
> always running at 100%, there is no idle time and the frequency will
> not scale down.
> 
> We want only 1 core running at 100% for temperature reasons.


Then simply put the busy loop in a task not running with real-time
priority. A plain Linux task. You should also use the SCHED_IDLE policy
in order to avoid it to delay other non real-time task.

-- 
                                                                Gilles.


  reply	other threads:[~2012-07-27 14:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27 13:04 [Xenomai] cpu usage Frederik Bayart
2012-07-27 13:21 ` Gilles Chanteperdrix
2012-07-27 13:35 ` Jan Kiszka
2012-07-27 13:58   ` Frederik Bayart
2012-07-27 14:01     ` Gilles Chanteperdrix [this message]
2012-07-27 14:05       ` Gilles Chanteperdrix
2012-07-27 14:42         ` Gilles Chanteperdrix

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=50129F1F.5030205@xenomai.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=frederik.bayart@triphase.com \
    --cc=xenomai@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.