public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Mats Liljegren <liljegren.mats2@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>,
	Linux Test Project General Discussions
	<ltp-list@lists.sourceforge.net>,
	Kevin Hilman <khilman@linaro.org>,
	Namhyung Kim <namhyung@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Jiri Olsa <jolsa@redhat.com>, Ingo Molnar <mingo@kernel.org>
Subject: Re: [LTP] Testing absence of ticks with nohz_full
Date: Mon, 10 Mar 2014 16:17:48 +0100	[thread overview]
Message-ID: <20140310151744.GA14639@localhost.localdomain> (raw)
In-Reply-To: <531DC318.7060504@gmail.com>

On Mon, Mar 10, 2014 at 02:50:16PM +0100, Mats Liljegren wrote:
> My company (Enea) wants to create test case(s) that verifies that
> you can run an application without having ticks going on the CPU
> that the application runs on. This would utilize the new nohz_full
> feature available from kernel version 3.10.

Ah nice!

> 
> I cannot find any existing test case in LTP in this area, so I
> assume I have to create the test case myself.
> 
> One catch is that the current nohz_full implementation actually
> generates 1Hz. So part of the test could be to verify that we
> actually get 1Hz rather than full tick speed. It would also be
> possible to support the experimental patch from Kevin Hilman to
> actually turn ticks off for real. The test code code check whether
> the patch is applied and based on it expect 0Hz or 1Hz ticks.
> 
> Would LTP be a good place for such tests?

If that can be of any help, you can have a look at this:
https://git.kernel.org/cgit/linux/kernel/git/frederic/dynticks-testing.git/

It's selftest that setup some isolation configuration, run a userspace loop for
a few seconds and records various trace events like timers, workqueue, etc...

So it's not automatically telling if a CPU runs full dynticks, some analysis from
a user on the traces is required.

Now it's fairly possible to write a small test that tells if the CPU noise
is reduced to strict 1 Hz timer and nothing else. But that alone wouldn't
provide safe guarantees because workqueues of whatever timer may happen
anytime.

In really depends on your usecase. Do you want your CPU not be disturbed in
order to maximize its throughput? That's the HPC case. There you can cope with a few
noise from time to time. Then such a test would be relevant.

Now if you have latency requirement, which means having a tick or workqueue or
anything disturbing you CPU would screw up everything then you're rather
on the side of real time and then you need guarantee. For such a case
I'd rather suggest live monitoring of trace events.

So there is two possibilities:

1) Show that the CPU runs in full dynticks for a given timeslice.

2) Monitoring events through the whole timeslices.

On both cases you want to use trace events. So I'd rather suggest you to use perf tools
or trace-cmd.

I believe that trace-cmd unfortunately uses per CPU periodic wake up on live
recording CPUs so perhaps it's not a good candidate to test isolation. Too bad
because kernelshark is cool for an overview.

Also perf supports some script languages for post processing: python, perl, etc...
I think trace-cmd too but rather for custom display of events.

Adding a few more people in Cc.

> 
> Regards
> Mats Liljegren

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2014-03-10 15:18 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-10 13:50 [LTP] Testing absence of ticks with nohz_full Mats Liljegren
2014-03-10 14:04 ` chrubis
2014-03-10 15:17 ` Frederic Weisbecker [this message]
2014-03-10 15:27   ` Steven Rostedt
2014-03-10 15:33     ` Frederic Weisbecker
2014-03-11 10:34   ` Mats Liljegren
2014-03-11 23:31     ` Steven Rostedt
2014-03-13 22:10 ` Kevin Hilman
2014-03-17 16:35   ` Mats Liljegren
2014-04-16 15:48     ` [LTP] [RFC][PATCH] partrt_nohz_full: Introducing a new test case Mats Liljegren
2014-04-16 15:48       ` Mats Liljegren
2014-04-22 15:47         ` chrubis
     [not found]           ` <20140423124410.29874232@mats-desktop>
2014-04-23 11:34             ` chrubis
     [not found]           ` <20140424105218.5cd2b5bf@mats-desktop>
2014-04-24  9:06             ` chrubis
     [not found]               ` <20140424140358.63dac752@mats-desktop>
2014-04-24 12:35                 ` chrubis
2014-04-22 14:07       ` chrubis
     [not found]         ` <20140423084101.536f03f0@mats-desktop>
2014-04-23 10:24           ` chrubis
2014-04-28 15:06       ` [LTP] [PATCH v2] " Mats Liljegren
2014-04-28 15:06         ` [LTP] [PATCH] " Mats Liljegren
2014-05-06 16:20           ` chrubis
     [not found]             ` <20140507132016.40361a0a@mats-desktop>
2014-05-07 12:17               ` chrubis
2014-05-13 14:11         ` [LTP] [PATCH v3] " Mats Liljegren
2014-05-13 14:11           ` Mats Liljegren
2014-06-02 17:17             ` chrubis
     [not found]               ` <20140603104018.3b0cba6f@mats-desktop>
2014-06-03 11:31                 ` chrubis
     [not found]                 ` <20141030171737.3eb800f1@mats-desktop>
2014-11-26 13:40                   ` Cyril Hrubis
2014-05-28 16:45           ` Mats Liljegren
2014-05-29 12:21             ` chrubis

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=20140310151744.GA14639@localhost.localdomain \
    --to=fweisbec@gmail.com \
    --cc=acme@infradead.org \
    --cc=jolsa@redhat.com \
    --cc=khilman@linaro.org \
    --cc=liljegren.mats2@gmail.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=mingo@kernel.org \
    --cc=namhyung@gmail.com \
    --cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox