Permalink
Commits on Mar 25, 2015
  1. Use NULL devpath when irq has no sysfs entries

    yangoliver committed Mar 25, 2015
    When irqbalance calls add_missing_irq, usually these irqs don't
    have the sysfs entries. This will cause file open errors in PCI
    classification code of add_one_irq_to_db.
    
    Before PCI quirk support in v1.0.9, the error was sliently ignored.
    But after that, the file open error will be found in --debug output.
    
    This fix skips the PCI irq classification when irqs have no sysfs
    entries. The IRQ_OTHER will be used for these irqs, which are same
    with old behaviors.
    
    Signed-off-by: Yong Yang <yangoliver@gmail.com>
  2. Replace g_list_find with g_list_find_custom

    yangoliver authored and ppwaskie committed Mar 22, 2015
    When irqbalance got configured with --without-glib2, the build
    will break due to no g_list_find in local glib implementation.
    
    Also the g_list_find just does the pointer match instead of content
    match, the g_list_find_custom seems to be more reasonable.
    
    Signed-off-by: Yong Yang <yangoliver@gmail.com>
    Signed-off-by: PJ Waskiewicz <pjwaskiewicz@gmail.com>
Commits on Mar 3, 2015
  1. Support PCI quirks in classify code

    yangoliver committed Jan 25, 2015
    Current irqbalance uses PCI class code to determine the irq class
    for each of devices. This logic could work well on most of devices.
    
    However, the problem is, there are some PCI devices don't follow
    the PCI spec. That caused the improper irq class code assigned to
    these devices. Usually, it is hard to ask HW/FW vendors to fix this
    kind of bug. Some of those are not bugs, because some new PCI class
    code were not defined before the new devices shipment. At same time,
    it is very difficult to force a device firmware upgrade even if the
    new firmware fix is available for users.
    
    As a correct irq class is crucial for interrupt balance efficiency
    and performance, we need some software workarounds for these devices.
    This is also what Linux kernel PCI code does in practice.
    
    Signed-off-by: Yong Yang <yangoliver@gmail.com>
Commits on Jan 21, 2015
  1. Follow latest PCI class code spec

    yangoliver committed Jan 21, 2015
    Original code used an old PCI-SIG spec for PCI class code definition:
    "PCI Local Bus Specification Revision 3.0". In fact, the PCI class
    code definition in this spec has been obsoleted for a long time.
    
    Today, PCI-SIG uses a separate spec for PCI class code definition:
    "PCI Code and ID Assignment Specification v1.5".
    
    Without the fix, it is possible that new PCI devices are classified
    incorrectly by irqbalance code. Two major codes and one sub-class code
    were added in the change.
    
    Signed-off-by: Yong Yang <yangoliver@gmail.com>
Commits on Jan 20, 2015
  1. Use IRQ_NODEF instead of -1 in code

    yangoliver committed Jan 20, 2015
    Signed-off-by: Yong Yang <yangoliver@gmail.com>
Commits on Jan 13, 2015
  1. Classify PCI Sub-Class for better performance

    yangoliver committed Jan 6, 2015
    Current implementation just treats all serial bus devices as legacy
    devices, and use IRQ_LEGACY by default. But in fact, some serial
    bus controller like Fiber Channel, InfiniBand are high speed and
    high interrupt rate devices, which are similar with ethernet or
    storage devices. On my server with 6 Fiber Channel devices, all these
    devices interrupts could be bound to single CPUs under heavy work
    load(24Gbps Throughput). That caused serious performance issue. But
    if we classify all Fiber channel devices as storage class, which uses
    CORE_LEVEL by default, it could fix the problem by balance interrupt
    load among multiple cores.
    
    This fix uses PCI sub-class code to classify all serial bus devices,
    instead of just using major PCI class code.
    
    Here are the major changes,
    
    a. For Fiber Channel devices, uses IRQ_STORAGE
    b. For InfiniBand devices, uses IRQ_STORAGE
    c. All other devices, keep original classifications: IRQ_LEGACY
    
    Signed-off-by: Yong Yang <yangoliver@gmail.com>