From: "Patel, Vedang" <vedang.patel@intel.com>
To: "tglx@linutronix.de" <tglx@linutronix.de>
Cc: "ranshalit@gmail.com" <ranshalit@gmail.com>,
"julia@ni.com" <julia@ni.com>,
"linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>,
"bigeasy@linutronix.de" <bigeasy@linutronix.de>,
"tlsmith3777@gmail.com" <tlsmith3777@gmail.com>,
"Hart, Darren" <darren.hart@intel.com>
Subject: Re: Regression on rt kernel while using POSIX timers
Date: Tue, 7 Mar 2017 02:01:49 +0000 [thread overview]
Message-ID: <1488852108.29259.85.camel@intel.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1703061222150.3561@nanos>
On Mon, 2017-03-06 at 12:29 +0100, Thomas Gleixner wrote:
> On Fri, 3 Mar 2017, Patel, Vedang wrote:
> >
> > I now have the following concerns and comments:
> > 1. real-time kernel vs. Mainline kernel: The real-time kernel is
> > worse
> > with POSIX timers than the mainline kernel. This is odd. Is this
> > because the softirqs are not the same anymore(Sorry, I am still not
> > familiar with what they have become. I deduced the "not the same"
> > part
> > from commit messages/comments in code. :))? Also, in https://git.ke
> > rnel
> > .org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit/?h=v4.4-
> > rt&id=4aa7cba57f73acf1e3e4998ae1650965317c2de1, it is mentioned:
> > "
> > Bring back the softirq split for now, until we fixed the signal
> > delivery problem for real.
> > "
> > What signal delivery problem is being referred to?
> The problem with these timers is that the heavy lifting of signal
> processing happens in "stolen" context. That means that the work is
> not
> done in the context of the process/thread which armed the timer, but
> in
> softirq context.
>
> What we really want here is the following:
>
> timer expires()
> mark timer expired in thread/process
> eventually wakeup thread
>
> This is simple to achieve for timers where the signal is directed to
> a
> thread, but it's way more complex for process wide signal delivery.
>
So, does this mean that we should be asking people not to use POSIX
timers until this is corrected?
Also, Is there a way to specify which ktimersoftd thread (essentially
selecting a particular CPU)to use while creating a timer? Currently,
the ktimersoftd thread corresponding to the thread on which the CPU is
running is being used by cyclictest. This would prevent the bounce
between ktimersoftd and cyclictest thread when both of them are on the
same CPU.
Thanks,
Vedang Patel
Software Engineer
Intel Corporation
> >
> > 2. In the case the CPU affinity is set, The CPU is shared between
> > cyclictest thread and the ktimersoftd thread. So, in the end, 1 CPU
> > migration is cheaper than 3 context switches... Is this the right
> > analysis? I know this will vary from application to application.
> No, migration is not generally cheaper, in most cases its more
> expensive.
>
> Thanks,
>
> tglx
next prev parent reply other threads:[~2017-03-07 2:02 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
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 [this message]
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=1488852108.29259.85.camel@intel.com \
--to=vedang.patel@intel.com \
--cc=bigeasy@linutronix.de \
--cc=darren.hart@intel.com \
--cc=julia@ni.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=ranshalit@gmail.com \
--cc=tglx@linutronix.de \
--cc=tlsmith3777@gmail.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).