You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] x86_64: Speed up numa_node_id by putting it directly into the PDA
Not go from the CPU number to an mapping array. Mode number is often used now in fast paths. This also adds a generic numa_node_id to all the topology includes Suggested by Eric Dumazet Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
50895c5d76
commit
69d81fcde7
@@ -17,6 +17,8 @@ extern void numa_add_cpu(int cpu);
|
||||
extern void numa_init_array(void);
|
||||
extern int numa_off;
|
||||
|
||||
extern void numa_set_node(int cpu, int node);
|
||||
|
||||
extern unsigned char apicid_to_node[256];
|
||||
|
||||
#define NUMA_NO_NODE 0xff
|
||||
|
||||
@@ -15,6 +15,7 @@ struct x8664_pda {
|
||||
int irqcount; /* Irq nesting counter. Starts with -1 */
|
||||
int cpunumber; /* Logical CPU number */
|
||||
char *irqstackptr; /* top of irqstack */
|
||||
int nodenumber; /* number of current node */
|
||||
unsigned int __softirq_pending;
|
||||
unsigned int __nmi_count; /* number of NMI on this CPUs */
|
||||
struct mm_struct *active_mm;
|
||||
|
||||
@@ -28,6 +28,8 @@ extern int __node_distance(int, int);
|
||||
#define pcibus_to_node(bus) ((long)(bus->sysdata))
|
||||
#define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus));
|
||||
|
||||
#define numa_node_id() read_pda(nodenumber)
|
||||
|
||||
/* sched_domains SD_NODE_INIT for x86_64 machines */
|
||||
#define SD_NODE_INIT (struct sched_domain) { \
|
||||
.span = CPU_MASK_NONE, \
|
||||
|
||||
Reference in New Issue
Block a user