1. 11 Oct, 2011 4 commits
    • Neil Horman's avatar
      Fix up load estimator · 34ac21b1
      Neil Horman authored
      Found a few bugs in the load estimator - we're were attributing load to multiple
      irqs errneously, and in the process of fixing that I found that we had a bogus
      topology map - the same package was getting added multiple times to a given numa
      node, since we didn't already detect that was part of that nodes child list.
    • Neil Horman's avatar
      fix up iterator in parse_proc_interrupts · 5ebd1b24
      Neil Horman authored
      There was a problem with the iterator loop to skip leading whitespace in
      parse_proc_interrupts - it skipped too far, this brings it back
    • Neil Horman's avatar
      Remove extraneous header file checks · cf4a1d8d
      Neil Horman authored
      ethtool.h and sockios.h are no longer needed after the re-work
      Signed-off-by: 's avatarNeil Horman <nhorman@tuxdriver.com>
      Suggested-by: 's avatarPetr Holasek <pholasek@redhat.com>
    • Petr Holasek's avatar
      proc/interrupts needs more permissive parsing · c4b8403e
      Petr Holasek authored
      When there was more than one leading spaces in the beginning of line,
      irq database was forced to rebuild.
      Signed-off-by: 's avatarPetr Holasek <pholasek@redhat.com>
      Signed-offy-by: 's avatarNeil Horman <nhorman@tuxdriver.com>
       procinterrupts.c |    6 +++++-
       1 files changed, 5 insertions(+), 1 deletions(-)
      diff --git a/procinterrupts.c b/procinterrupts.c
      index d5555f2..2c1bb25 100644
      --- a/procinterrupts.c
      +++ b/procinterrupts.c
      @@ -25,6 +25,7 @@
       #include <stdint.h>
       #include <string.h>
       #include <syslog.h>
      +#include <ctype.h>
       #include "cpumask.h"
       #include "irqbalance.h"
      @@ -66,7 +67,10 @@ void parse_proc_interrupts(void)
       				proc_int_has_msi = 1;
       		/* lines with letters in front are special, like NMI count. Ignore */
      -		if (!(line[0]==' ' || (line[0]>='0' && line[0]<='9')))
      +		c = line;
      +		while (isblank(*(c++)))
      +			;
      +		if (!(*c>='0' && *c<='9'))
       		c = strchr(line, ':');
       		if (!c)
  2. 10 Oct, 2011 12 commits
    • Neil Horman's avatar
      Adding Syslog notification for powersave · 327691a7
      Neil Horman authored
      add some syslog messages to indicate when powersaving is taking place
    • Neil Horman's avatar
      Add powersave settings · e2f6588b
      Neil Horman authored
      Add an optional heuristic to allow cpus to not service interrupts during periods
      of low activity, to help power conservation. If more than power_thresh cpus are
      more then a standard deviation below the average load, and no cpus are
      overloaded by more than a standard deviation and have more than one irq on them,
      then we stop balancing to a single cpu.  If at any time we have a cpu go over a
      standard deviation of load, we re-enable all the cpus for balancing
    • Neil Horman's avatar
      Adjusting load computation to be fair at all levels · 38b3bb82
      Neil Horman authored
      Previuosly we treated the all load as originating from a single cpu.  Thats not
      true in the event an interrupt is assigned to a higher level object, like a
      cache domain.  This change spreads the load out, attempting to use a hureistic
      whereby we assume that a fair share of interrupts from parent objects is handled
      by this cpu, so we only attribute a fraction of the total shared load to each
      single cpu.  This allows us to come up with a reasonable load value for
      interrupts assigned to cache domains, packages, nodes, etc
      Signed-off-by: 's avatarNeil Horman <nhorman@tuxdriver.com>
    • Neil Horman's avatar
      Consolidate duplicated functions · 4fd799cb
      Neil Horman authored
      We had lots of duplicated functionality with multiple topology types.  Now that
      we have only the single topo_obj structure, we can consolidate lots of code
    • Neil Horman's avatar
      Consolidate for_each_* functions · 58885160
      Neil Horman authored
      Each topology object used to have its own for_each iterator.  Now that we have a
      common topology object, we can merge all that code
    • Neil Horman's avatar
      add master list pointer to topo_obj · f06001f6
      Neil Horman authored
      Its convienient to know how many objects of a given type you have without having
      to know the specific object type.  We can get this info with a pointer to a
      pointer in each topo object assigned to that objects type master list (cpus,
      cache_domains, packages, numa_nodes) when we build the tree
    • Neil Horman's avatar
      Add object type ennumeration to topo map · 1a287acc
      Neil Horman authored
      Since we use a common object for our topology now, add some ennumeration so we
      can tell what type of object wer'e looking at when debugging
    • Neil Horman's avatar
      Rename common_obj_data to topo_obj · 587ba2f4
      Neil Horman authored
      Since consolodating the topology objects to a single structure, it seems
      Better to rename it to something more descriptive
    • Neil Horman's avatar
      Merge all topology objects to a common structure · decce934
      Neil Horman authored
      Theres no need to treat topology objects differently.  We can merge them all
      down to a common structure.  This will make balancing code a great deal more
    • Neil Horman's avatar
      Clean up some unused data members · c10d9540
      Neil Horman authored
      Some of our data structures had dangling unused fields.  Get rid of them
    • Neil Horman's avatar
      Add configure.ac checks to ensure presence of libnuma and libm · c739059a
      Neil Horman authored
      irqbalance currently requries libnuma and libm be present. Augment the configure
      script to ensure they are available
      Signed-off-by: 's avatarNeil Horman <nhorman@tuxdriver.com>
    • Neil Horman's avatar
      Fix a crash on topology change · 171bbdce
      Neil Horman authored
      Rebuilding the topology and irq databases resulted in some bogus manipulation of
      a glib list.  Apparently, g_list_free[_full] doesn't leave the list pointer
      you're using in a valid state and we have to re-null it.
      Signed-off-by: 's avatarNeil Horman <nhorman@tuxdriver.com>
  3. 07 Oct, 2011 1 commit
    • Neil Horman's avatar
      Fix some minor errors: · 71435668
      Neil Horman authored
      1) Correct computation of standard deviation (devide by n-1 rather than n)
      2) Fix irq migration to only consider irqs assigned to object that is overloaded
      3) Filter initial forced rebalancing to leave BALANCE_NONE irqs alone
      Signed-off-by: 's avatarNeil Horman <nhorman@tuxdriver.com>
  4. 06 Oct, 2011 4 commits
    • Neil Horman's avatar
      Add back improved affinity_hint handling · 32521899
      Neil Horman authored
      The new balancer can now deal with affintiy hinting again, this time in a
      reasonably sane manner.  Whereas before having an affintiy hint caused
      irqbalance to just assign that hint as the affinity, we now have a policy based
      operation, controlled by the hintpolicy option.  The policy can be one of:
      exact - affinity_hint is applied for that irq without balancing consideration
      subset - balancing takes place, but assigned affinity will be a subset of the
      ignore - affinity_hint is ignored entirely
    • Petr Holasek's avatar
      Fix a crash resulting from trying to parse a misread cpumask. · 80157dd6
      Petr Holasek authored
      If we don't read a cpumask from the local_cpus sysfs file, we shouldn't try to
      parse it
      Signed-off-by: 's avatarPetr Holasek <pholasek@redhat.com>
      Signed-off-by: 's avatarNeil Horman <nhorman@tuxdriver.com>
    • Neil Horman's avatar
      Cut over to base irq placement using new algorithm · 93f959c9
      Neil Horman authored
      This is the big move.  The main loop now uses the new balance alg based on
      standard deviation away from the average softirq+irq time as read from
      /proc/stat.  Initial results look good.
      Also cleaned out old data from previous algorithm, so we don't have any dangling
    • Neil Horman's avatar
      Add new workload computation to irqbalance · 3953fec6
      Neil Horman authored
      This new workload calculator computes the average load at every balance level
      and identifies each object at each level that is more than a standard deviation
      away from the average.  For those above the average with more than one irq
      assigned to them, those irqs are placed on the re-assignment list for
      rebalancing until such time as the approximate reduction in load brings that
      object back to the average.
  5. 05 Oct, 2011 1 commit
  6. 04 Oct, 2011 4 commits
    • Neil Horman's avatar
      Adding new balance load gathering function · 17d7e1fd
      Neil Horman authored
      This adds calls to parse_proc_stat to gather load information based on irq and
      softirq time as collected from proc/stat.  The algorithm is:
      1) Gather per cpu [soft]irq load (this patch)
      2) propagate load up all parent devices (this patch)
      3) distribute weighted load to each irq (this patch)
      Upcomming patches will identify object that are more than a standard deviation
      out of average that have more than one irq on them and submit those irqs for
    • Neil Horman's avatar
      reset assigned_obj pointer on rebalance · 594a8b89
      Neil Horman authored
      Don't want stale pointers hanging about when we rebalance an object
    • Neil Horman's avatar
      Add load metric storage for new balance algorithm · 507b815f
      Neil Horman authored
      Add storage to track cpu load of irq and softirq time for each balancing object
    • Neil Horman's avatar
      Reset irq assignments on cputree rparse · a41d357c
      Neil Horman authored
      If we reparse the cpu tree we need to rebalance all the irqs that we are
  7. 03 Oct, 2011 9 commits
  8. 28 Sep, 2011 4 commits
  9. 27 Sep, 2011 1 commit