linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Anna-Maria Gleixner <anna-maria@linutronix.de>
Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	Haris Okanovic <haris.okanovic@ni.com>
Subject: Re: [patch 0/3] do not raise timer softirq unconditionally (spinlockless version)
Date: Thu, 30 May 2019 16:38:08 -0300	[thread overview]
Message-ID: <20190530193806.GB23199@amt.cnet> (raw)
In-Reply-To: <alpine.DEB.2.21.1905291651500.1395@somnus>

On Wed, May 29, 2019 at 04:52:37PM +0200, Anna-Maria Gleixner wrote:
> Hi,
> 
> I had a look at the queue and have several questions about your
> implementation. 
> 
> First of all, I had some troubles to understand your commit messages. So I
> first had to read the code and then tried to understand the commit
> messages. It is easier, if it works the other way round.

Right. Commit message seemed descriptive to me, but i should probably
try to improve the explanation in the commit message.

> On Mon, 15 Apr 2019, Marcelo Tosatti wrote:
> 
> > For isolated CPUs, we'd like to skip awakening ktimersoftd
> > (the switch to and then back from ktimersoftd takes 10us in
> > virtualized environments, in addition to other OS overhead,
> > which exceeds telco requirements for packet forwarding for
> > 5G) from the sched tick.
> 
> You would like to prevent raising the timer softirq in general from the
> sched tick for isolated CPUs? Or you would like to prevent raising the
> timer softirq if no pending timer is available?

With DPDK and CPU isolation, there are no low resolution timers running on
the isolated CPUs. So prevent raising timer softirq if no pending timer 
is available is enough.

> Nevertheless, this change is not PREEMPT_RT specific. It is a NOHZ
> dependand change. So it would be nice, if the queue is against
> mainline. But please correct me, if I'm wrong.

Since it was based on the idea of 

https://lore.kernel.org/patchwork/patch/446045/

Which was an -RT patch, i decided to submit it against the -RT kernel.

But it can be merged through the mainline kernel queue as well, 
i believe.

> [...]
> 
> > This patchset reduces cyclictest latency from 25us to 14us
> > on my testbox. 
> > 
> 
> A lot of information is missing: How does your environment looks like for
> this test, what is your workload,...?

x86 hardware, with KVM virtualized, running -RT kernel on both host
and guest. Relevant host kernel command line:

isolcpus=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,14
intel_pstate=disable nosoftlockup nohz=on
nohz_full=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,14
rcu_nocbs=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,14

Relevant guest kernel command line:
isolcpus=1 nosoftlockup nohz=on nohz_full=1
rcu_nocbs=1

And workload in question is cyclictest (the production
software is DPDK, but cyclictest is used to gather 
latency data).

> Did you also run other tests?

Yes, have a custom module stress test to attempt to hit the race.
Daniel (CC'ed) ran it under a kernel with debugging enabled, 
with no apparent problems.

So one downside of this patch is that raises the softirq 
unnecessarily sometimes. However, its impact is reduced to
isolated CPUs.






      reply	other threads:[~2019-05-30 20:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 20:12 [patch 0/3] do not raise timer softirq unconditionally (spinlockless version) Marcelo Tosatti
2019-04-15 20:12 ` [patch 1/3] timers: raise timer softirq on __mod_timer/add_timer_on Marcelo Tosatti
2019-05-29 14:53   ` Anna-Maria Gleixner
2019-05-30 19:23     ` Marcelo Tosatti
2019-04-15 20:12 ` [patch 2/3] timers: do not raise softirq unconditionally (spinlockless version) Marcelo Tosatti
2019-05-29 14:53   ` Anna-Maria Gleixner
2019-05-30 20:14     ` Marcelo Tosatti
2019-05-31 11:55       ` Anna-Maria Gleixner
2019-06-11 11:45         ` Anna-Maria Gleixner
2019-06-04  6:29   ` Peter Xu
2019-06-06 15:14     ` Marcelo Tosatti
2019-04-15 20:12 ` [patch 3/3] timers: condense pending bitmap information Marcelo Tosatti
2019-04-15 20:17 ` [patch 0/3] do not raise timer softirq unconditionally (spinlockless version) Marcelo Tosatti
2019-05-06  3:22 ` Marcelo Tosatti
2019-05-06  7:17   ` Daniel Bristot de Oliveira
2019-05-06  9:22   ` Thomas Gleixner
2019-05-29 14:52 ` Anna-Maria Gleixner
2019-05-30 19:38   ` Marcelo Tosatti [this message]

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=20190530193806.GB23199@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=anna-maria@linutronix.de \
    --cc=bristot@redhat.com \
    --cc=haris.okanovic@ni.com \
    --cc=lcapitulino@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).