node affine NUMA scheduler 3/5
PATCH 1/1 node affine NUMA scheduler 3/5
---------- Resent Message ----------
Subject: [PATCH] node affine NUMA scheduler 3/5
Date: Fri, 11 Oct 2002 19:58:14 +0200
This is the third part of the node affine NUMA scheduler.
Quoted 4 lines
03-node_affine-2.5.39-10.patch :
This is the heart of the node affine part of the patch. Tasks are assigned a homenode during initial load balancing and they are attracted to the homenode.
Erich
include/linux/sched.h +7 -0
@@ -301,6 +301,7 @@ struct task_struct {unsigned long policy;unsigned long cpus_allowed;unsigned int time_slice, first_time_slice; +int node;struct list_head tasks;struct list_head ptrace_children;
@@ -462,8 +463,14 @@ extern void build_pools(void);extern void pooldata_lock (void );extern void pooldata_unlock (void );extern void sched_balance_exec (void ); +extern void set_task_node (task_t *p,int node); +# define homenode_inc (rq,node) (rq)->nr_homenode[node]++ +# define homenode_dec (rq,node) (rq)->nr_homenode[node]--#else #define sched_balance_exec () {} +#define set_task_node (p,n) {} +# define homenode_inc (rq,node) {} +# define homenode_dec (rq,node) {}#endif extern void sched_migrate_task (task_t *p,int cpu);
kernel/sched.c +105 -2
210 lines not on this page · raw message
kernel/softirq.c +1 -0
@@ -368,6 +368,7 @@ static int ksoftirqd(void * __bind_cpu)set_cpus_allowed (current,1UL << cpu);if (smp_processor_id () != cpu)BUG (); +set_task_node (current,__cpu_to_node (cpu));sprintf (current->comm,"ksoftirqd_CPU%d" , cpu);