Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 464847

Summary: tuna: update to 0.8, with support for CPU topology
Product: Red Hat Enterprise MRG Reporter: Arnaldo Carvalho de Melo <acme>
Component: realtime-utilitiesAssignee: Arnaldo Carvalho de Melo <acme>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 1.1CC: bhu, davids
Target Milestone: 1.1   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-04 15:27:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 464874, 469113    
Attachments:
Description Flags
regression test script none

Description Arnaldo Carvalho de Melo 2008-09-30 20:15:11 UTC
Created attachment 318116 [details]
regression test script

The 0.7 version of tuna parses the sysfs entries related to CPU topology, so that the user can see on the GUI what cores shares caches, and then can do the same operations available for single CPU cores on CPU sockets: isolate, include, move. Dragging threads and interrupt sources into the Socket frame will set the affinity of such entities to a mask that has the cores for that socket.

The testuna script has been updated to test these new features. Testing the GUI requires a machine with more than one CPU socket, so that the tester can see the multiple CPU sockets on the GUI.

The new testuna script is availabie in the git repository and also attached to this ticket for convenience.

Comment 1 Arnaldo Carvalho de Melo 2008-10-20 17:24:56 UTC
Additionally, the 0.8 version of tuna fixes some problems:

- The [Non]VolCtxtSwitch columns should be represented in the GUI
as unsigned integers, so that long running threads doesn't get
wrong values because of an erroneous conversion to signed integer.

- Several spelling fixes

- Handle some more schedutils exceptions, such as a process
finishing after an snapshot of the list of processes is taken
in some tuna routines and then tuna asking for its scheduler
attributes.

- Fix getopt long option for --priority, it requires an arg, just
  like the equivalent shorter form, -p.

- Set the irq affinity mask when setting a IRQ thread affinity

And adds a new feature:

- Add a --spread command line option, it will spread the threads
  passed thru --threads into the cpus specified in --cpu or --socket.
  Useful for instance in spreading the RX queue interrupt handlers
  in 10 Gbp/s ethernet cards into the cores sharing a cache.

  Example:

  The "eth2" interface has four RX queues, each on one interrupt:

  # tuna --threads 2995,2996,2997,2998 --show_threads
                      thread       ctxt_switches
    pid SCHED_ rtpri affinity voluntary nonvoluntary             cmd
   2995   FIFO    85     0xff  19040981            0        IRQ-2293 eth2-0
   2996   FIFO    85     0xff  11335097            0        IRQ-2292 eth2-1
   2997   FIFO    85     0xff   7594473            0        IRQ-2291 eth2-2
   2998   FIFO    85     0xff  12393911            0        IRQ-2290 eth2-3
  
  To achieve better performance we should not let all the interrupts take
  place in all available processors, generating CPU cache trashing, instead
  we should spread it over CPU cores that share a single cache, now one
  can do this using the --spread option:

  # tuna --threads 2995,2996,2997,2998 --sockets 0 --spread --show_threads
                      thread       ctxt_switches
    pid SCHED_ rtpri affinity voluntary nonvoluntary             cmd
   2995   FIFO    85        0  19040981            0        IRQ-2293 eth2-0
   2996   FIFO    85        2  11335097            0        IRQ-2292 eth2-1
   2997   FIFO    85        3   7594473            0        IRQ-2291 eth2-2
   2998   FIFO    85        4  12393911            0        IRQ-2290 eth2-3

  The cores 0, 2, 3 and 4 are on the first CPU socket, sharing their cache and
  tuna just used the CPU topology information provided by the kernel instead
  of sequentially spreading the threads because, as can be seen in the above
  example, not all machines assign core IDs sequentially.

Comment 3 David Sommerseth 2008-11-27 10:31:07 UTC
Ran testtuna script on dell-pe2900-03.rhts.bos.redhat.com (RHEL5.2/32) and hp-xw9400-02.rhts.bos.redhat.com (RHEL5.2/64) with 2.6.24.7-93 kernel.  Both tests resulted in:

     PASS: Healthy tuna, no lead found, eat!

Comment 6 errata-xmlrpc 2009-02-04 15:27:29 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0034.html