linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "bigeasy@linutronix.de" <bigeasy@linutronix.de>
To: "Patel, Vedang" <vedang.patel@intel.com>
Cc: "julia@ni.com" <julia@ni.com>,
	"ranshalit@gmail.com" <ranshalit@gmail.com>,
	"linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>,
	"Hart, Darren" <darren.hart@intel.com>
Subject: Re: Regression on rt kernel while using POSIX timers
Date: Wed, 1 Mar 2017 16:22:30 +0100	[thread overview]
Message-ID: <20170301152230.mjoi44so6t5qy3q2@linutronix.de> (raw)
In-Reply-To: <1487727789.28401.17.camel@intel.com>

On 2017-02-22 01:43:09 [+0000], Patel, Vedang wrote:
> Also, I checked the number of cpu migrations and context switches using
> perf stat. Following are the results for both the cases:
> 
> cyclictest not pinned to CPU: the number of CPU migrations and context
> switches are equal to the number of loops I am running for cyclictest.
> Here, there are a lot of context switches with the ktimersoftd process.
> 
> cyclictest pinned to a CPU: there are very few CPU migrations. But, the
> number of context switches are approximately 3 times the number of
> loops. Most of the context switches are with the swapper (idle)
> process.
> 
> In both the cases, the number of page faults are pretty low (~65).
> 
> I also tried similar experiments with mainline kernel (v4.4.47). The
> number of CPU migrations were pretty low (single digits) for both the
> cases described above. Also, the number of context switches were equal
> to the number of loops provided as an argument to cyclictest.

The hardware interrupt wakes the "timer-softirq" thread. This RT-thread
in turn will wake up your application / cyclictest which uses the
posix-timers. So the priority of this thread is also important. After
the wakeup it is possible that the newer kernel tries migrate the RT
task if possible in order to keep it running as soon as possible. If it
does not migrate it, then either the cyclictest task has to wait or the
"timer-softirq" thread.

> Thanks,
> Vedang Patel
> Software Engineer
> Intel Corporation

Sebastian

  reply	other threads:[~2017-03-01 15:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08 18:41 Regression on rt kernel while using POSIX timers Patel, Vedang
2017-02-10 19:07 ` Sebastian Andrzej Siewior
2017-02-13 18:48   ` Patel, Vedang
2017-02-15 16:54     ` bigeasy
2017-02-16  2:05       ` Julia Cartwright
2017-02-16  2:34         ` Patel, Vedang
2017-02-22  1:43           ` Patel, Vedang
2017-03-01 15:22             ` bigeasy [this message]
2017-03-01 19:03               ` Tracy Smith
2017-03-02  3:23                 ` Patel, Vedang
2017-03-03 19:41                   ` Julia Cartwright
2017-03-03 20:32                     ` Julia Cartwright
2017-03-03 21:09                     ` Thomas Gleixner
2017-03-03 23:36                       ` Patel, Vedang
2017-03-06 11:29                         ` Thomas Gleixner
2017-03-07  2:01                           ` Patel, Vedang
2017-03-07 17:03                             ` Thomas Gleixner
2017-03-20 22:54                               ` Patel, Vedang
2017-03-03 16:51                 ` Thomas Gleixner
  -- strict thread matches above, loose matches on Subject: below --
2017-02-13 20:32 Ran Shalit

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=20170301152230.mjoi44so6t5qy3q2@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=darren.hart@intel.com \
    --cc=julia@ni.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=ranshalit@gmail.com \
    --cc=vedang.patel@intel.com \
    /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).