irqbalance/types.h
nhorman 565db19e3d Enhance irqbalance logic to condier PCI bus topology in IRQ mapping
This patch enhances irqbalance so that, it considers the proximity of devices to
cpus when making irq mapping decisions.  In large numa systems this will cause
irqs to be biased such that they have unique affinity for cpus on the same numa
node as the device triggering them.

Resolves:
http://code.google.com/p/irqbalance/issues/detail?id=17

Thanks to Petr Holasek for authoring the patch




git-svn-id: https://irqbalance.googlecode.com/svn/trunk@34 46b42954-3823-0410-bd82-eb80b452c9b5
2011-08-01 18:25:02 +00:00

96 lines
1.2 KiB
C

#ifndef _INCLUDE_GUARD_TYPES_H
#define _INCLUDE_GUARD_TYPES_H
#include <glib.h>
#include "cpumask.h"
#define BALANCE_NONE 0
#define BALANCE_PACKAGE 1
#define BALANCE_CACHE 2
#define BALANCE_CORE 3
#define IRQ_OTHER 0
#define IRQ_LEGACY 1
#define IRQ_SCSI 2
#define IRQ_TIMER 3
#define IRQ_ETH 4
#define IRQ_GETH 5
#define IRQ_TGETH 6
struct package {
uint64_t workload;
int number;
cpumask_t mask;
int node_num;
int class_count[7];
GList *cache_domains;
GList *interrupts;
};
struct cache_domain {
uint64_t workload;
int number;
int marker;
int node_num;
cpumask_t mask;
cpumask_t package_mask;
int class_count[7];
GList *cpu_cores;
GList *interrupts;
};
struct cpu_core {
uint64_t workload;
int number;
int marker;
int node_num;
int class_count[7];
cpumask_t package_mask;
cpumask_t cache_mask;
cpumask_t mask;
GList *interrupts;
};
struct interrupt {
uint64_t workload;
int balance_level;
int number;
int class;
int node_num;
int msi;
uint64_t count;
uint64_t old_count;
uint64_t extra;
cpumask_t mask;
cpumask_t old_mask;
cpumask_t numa_mask;
cpumask_t allowed_mask;
/* user/driver provided for smarter balancing */
cpumask_t node_mask;
};
#endif