All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Thibodeaux <thibodux@gmail.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
	oleksandr_andrushchenko@epam.com, tglx@linutronix.de,
	jgross@suse.com, ryan.thibodeaux@starlab.io
Subject: Re: [PATCH] x86/xen: Add "xen_timer_slop" command line option
Date: Sat, 23 Mar 2019 08:00:52 -0400	[thread overview]
Message-ID: <20190323120052.GB11100@centos-dev.localdomain> (raw)
In-Reply-To: <abf65a68-9463-0f0e-1f51-6eefd3cacc88@oracle.com>

On Fri, Mar 22, 2019 at 06:10:16PM -0400, Boris Ostrovsky wrote:
> On 3/22/19 2:29 PM, thibodux@gmail.com wrote:
> > From: Ryan Thibodeaux <ryan.thibodeaux@starlab.io>
> >
> > Add a new command-line option "xen_timer_slop=<INT>" that sets the
> > minimum delta of virtual Xen timers. This commit does not change the
> > default timer slop value for virtual Xen timers.
> >
> > Lowering the timer slop value should improve the accuracy of virtual
> > timers (e.g., better process dispatch latency), but it will likely
> > increase the number of virtual timer interrupts (relative to the
> > original slop setting).
> >
> > The original timer slop value has not changed since the introduction
> > of the Xen-aware Linux kernel code. This commit provides users an
> > opportunity to tune timer performance given the refinements to
> > hardware and the Xen event channel processing. It also mirrors
> > a feature in the Xen hypervisor - the "timer_slop" Xen command line
> > option.
> 
> Is there any data that shows effects of using this new parameter?
> 
> -boris
> 

For our own testing using "cyclictest" from the rt-tests project,
lowering the timer slop helped produce the best test runs, especially
in terms of maximum process dispatch latency (PDL).

Here is the output from one such test that ran overnight. The Xen
timer slop in this case was 10000 or 10 microseconds.

...
[root@slop1 ~]# cset shield -c 3
[root@slop1 ~]# echo ; date ; echo ; \
./rt-tests-1.3/cyclictest -p95 -a3 -t1 -m; echo ; date

Thu Mar 14 19:45:36 UTC 2019

# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 0.00 0.02 0.00 1/91 4260
T: 0 ( 3212) P:95 I:1000 C:57077313 Min: 27 Act: 44 Avg: 43 Max: 145
^C
Fri Mar 15 11:36:53 UTC 2019
...

This test system was configured to use a TSC clocksource, disabled
C states, and lowered the timer slop. I am not claiming the timer
slop change was solely responsible for the best results. In other
testing with the default timer slop setting of 100000 (100
microseconds), the average PDL would run slightly higher, but the
spikes were much higher and more in number, often near the 1000s
and happening multiple times per 10 minutes of testing.

- Ryan

WARNING: multiple messages have this Message-ID (diff)
From: Ryan Thibodeaux <thibodux@gmail.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: jgross@suse.com, oleksandr_andrushchenko@epam.com,
	linux-kernel@vger.kernel.org, ryan.thibodeaux@starlab.io,
	xen-devel@lists.xenproject.org, tglx@linutronix.de
Subject: Re: [PATCH] x86/xen: Add "xen_timer_slop" command line option
Date: Sat, 23 Mar 2019 08:00:52 -0400	[thread overview]
Message-ID: <20190323120052.GB11100@centos-dev.localdomain> (raw)
In-Reply-To: <abf65a68-9463-0f0e-1f51-6eefd3cacc88@oracle.com>

On Fri, Mar 22, 2019 at 06:10:16PM -0400, Boris Ostrovsky wrote:
> On 3/22/19 2:29 PM, thibodux@gmail.com wrote:
> > From: Ryan Thibodeaux <ryan.thibodeaux@starlab.io>
> >
> > Add a new command-line option "xen_timer_slop=<INT>" that sets the
> > minimum delta of virtual Xen timers. This commit does not change the
> > default timer slop value for virtual Xen timers.
> >
> > Lowering the timer slop value should improve the accuracy of virtual
> > timers (e.g., better process dispatch latency), but it will likely
> > increase the number of virtual timer interrupts (relative to the
> > original slop setting).
> >
> > The original timer slop value has not changed since the introduction
> > of the Xen-aware Linux kernel code. This commit provides users an
> > opportunity to tune timer performance given the refinements to
> > hardware and the Xen event channel processing. It also mirrors
> > a feature in the Xen hypervisor - the "timer_slop" Xen command line
> > option.
> 
> Is there any data that shows effects of using this new parameter?
> 
> -boris
> 

For our own testing using "cyclictest" from the rt-tests project,
lowering the timer slop helped produce the best test runs, especially
in terms of maximum process dispatch latency (PDL).

Here is the output from one such test that ran overnight. The Xen
timer slop in this case was 10000 or 10 microseconds.

...
[root@slop1 ~]# cset shield -c 3
[root@slop1 ~]# echo ; date ; echo ; \
./rt-tests-1.3/cyclictest -p95 -a3 -t1 -m; echo ; date

Thu Mar 14 19:45:36 UTC 2019

# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 0.00 0.02 0.00 1/91 4260
T: 0 ( 3212) P:95 I:1000 C:57077313 Min: 27 Act: 44 Avg: 43 Max: 145
^C
Fri Mar 15 11:36:53 UTC 2019
...

This test system was configured to use a TSC clocksource, disabled
C states, and lowered the timer slop. I am not claiming the timer
slop change was solely responsible for the best results. In other
testing with the default timer slop setting of 100000 (100
microseconds), the average PDL would run slightly higher, but the
spikes were much higher and more in number, often near the 1000s
and happening multiple times per 10 minutes of testing.

- Ryan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2019-03-23 12:02 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 18:29 [PATCH] x86/xen: Add "xen_timer_slop" command line option thibodux
2019-03-22 22:10 ` Boris Ostrovsky
2019-03-23  2:58   ` Dario Faggioli
2019-03-23  2:58   ` Dario Faggioli
2019-03-23 10:41     ` luca abeni
2019-03-25 12:05       ` luca abeni
2019-03-25 13:43         ` Boris Ostrovsky
2019-03-25 14:07           ` luca abeni
2019-03-25 14:07           ` luca abeni
2019-03-25 14:11           ` Ryan Thibodeaux
2019-03-25 17:36             ` Ryan Thibodeaux
2019-03-25 17:36             ` Ryan Thibodeaux
2019-03-25 18:31             ` Boris Ostrovsky
2019-03-25 18:31             ` Boris Ostrovsky
2019-03-25 14:11           ` Ryan Thibodeaux
2019-03-26  9:13           ` Dario Faggioli
2019-03-26  9:13           ` Dario Faggioli
2019-03-26 11:12             ` luca abeni
2019-03-26 11:41               ` Ryan Thibodeaux
2019-03-26 11:41               ` Ryan Thibodeaux
2019-03-26 11:12             ` luca abeni
2019-03-26 23:21             ` Boris Ostrovsky
2019-03-27 10:00               ` Ryan Thibodeaux
2019-03-27 10:00               ` Ryan Thibodeaux
2019-03-27 14:46                 ` Boris Ostrovsky
2019-03-27 14:59                   ` Ryan Thibodeaux
2019-03-27 14:59                   ` Ryan Thibodeaux
2019-03-27 15:19                   ` Dario Faggioli
2019-03-27 15:19                   ` Dario Faggioli
2019-03-27 14:46                 ` Boris Ostrovsky
2019-03-26 23:21             ` Boris Ostrovsky
2019-03-25 13:43         ` Boris Ostrovsky
2019-03-25 12:05       ` luca abeni
2019-03-23 10:41     ` luca abeni
2019-03-23 12:00   ` Ryan Thibodeaux [this message]
2019-03-23 12:00     ` Ryan Thibodeaux
2019-03-24 18:07     ` Boris Ostrovsky
2019-03-24 18:07     ` Boris Ostrovsky
2019-03-25 10:36       ` Dario Faggioli
2019-03-25 10:36       ` Dario Faggioli
2019-03-22 22:10 ` Boris Ostrovsky
2019-04-24 18:47 ` Boris Ostrovsky
2019-04-24 18:47   ` [Xen-devel] " Boris Ostrovsky
2019-04-24 18:47 ` Boris Ostrovsky
  -- strict thread matches above, loose matches on Subject: below --
2019-03-22 18:29 thibodux

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=20190323120052.GB11100@centos-dev.localdomain \
    --to=thibodux@gmail.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=ryan.thibodeaux@starlab.io \
    --cc=tglx@linutronix.de \
    --cc=xen-devel@lists.xenproject.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.