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