Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
deadcf58
Commit
deadcf58
authored
Jun 30, 2003
by
Rusty Russell
Committed by
Anton Blanchard
Jun 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Make runqueues a per-cpu variable
Makes scheduler use per-cpu variables for the runqueues.
parent
b9cc291f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
kernel/sched.c
kernel/sched.c
+5
-4
No files found.
kernel/sched.c
View file @
deadcf58
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include <linux/timer.h>
#include <linux/timer.h>
#include <linux/rcupdate.h>
#include <linux/rcupdate.h>
#include <linux/cpu.h>
#include <linux/cpu.h>
#include <linux/percpu.h>
#ifdef CONFIG_NUMA
#ifdef CONFIG_NUMA
#define cpu_to_node_mask(cpu) node_to_cpumask(cpu_to_node(cpu))
#define cpu_to_node_mask(cpu) node_to_cpumask(cpu_to_node(cpu))
...
@@ -170,12 +171,12 @@ struct runqueue {
...
@@ -170,12 +171,12 @@ struct runqueue {
struct
list_head
migration_queue
;
struct
list_head
migration_queue
;
atomic_t
nr_iowait
;
atomic_t
nr_iowait
;
}
____cacheline_aligned
;
};
static
struct
runqueue
runqueues
[
NR_CPUS
]
__cacheline_aligned
;
static
DEFINE_PER_CPU
(
struct
runqueue
,
runqueues
)
;
#define cpu_rq(cpu) (
runqueues + (cpu
))
#define cpu_rq(cpu) (
&per_cpu(runqueues, (cpu)
))
#define this_rq()
cpu_rq(smp_processor_id(
))
#define this_rq()
(&__get_cpu_var(runqueues
))
#define task_rq(p) cpu_rq(task_cpu(p))
#define task_rq(p) cpu_rq(task_cpu(p))
#define cpu_curr(cpu) (cpu_rq(cpu)->curr)
#define cpu_curr(cpu) (cpu_rq(cpu)->curr)
#define rt_task(p) ((p)->prio < MAX_RT_PRIO)
#define rt_task(p) ((p)->prio < MAX_RT_PRIO)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment