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
6f9199b5
Commit
6f9199b5
authored
Jul 02, 2003
by
Rusty Russell
Committed by
Linus Torvalds
Jul 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Per-cpu variable in mm/slab.c
Rather trivial conversion. Tested on SMP.
parent
26e48e57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mm/slab.c
mm/slab.c
+3
-3
No files found.
mm/slab.c
View file @
6f9199b5
...
@@ -475,7 +475,7 @@ enum {
...
@@ -475,7 +475,7 @@ enum {
FULL
FULL
}
g_cpucache_up
;
}
g_cpucache_up
;
static
struct
timer_list
reap_timers
[
NR_CPUS
]
;
static
DEFINE_PER_CPU
(
struct
timer_list
,
reap_timers
)
;
static
void
reap_timer_fnc
(
unsigned
long
data
);
static
void
reap_timer_fnc
(
unsigned
long
data
);
...
@@ -525,7 +525,7 @@ static void __slab_error(const char *function, kmem_cache_t *cachep, char *msg)
...
@@ -525,7 +525,7 @@ static void __slab_error(const char *function, kmem_cache_t *cachep, char *msg)
*/
*/
static
void
start_cpu_timer
(
int
cpu
)
static
void
start_cpu_timer
(
int
cpu
)
{
{
struct
timer_list
*
rt
=
&
reap_timers
[
cpu
]
;
struct
timer_list
*
rt
=
&
per_cpu
(
reap_timers
,
cpu
)
;
if
(
rt
->
function
==
NULL
)
{
if
(
rt
->
function
==
NULL
)
{
init_timer
(
rt
);
init_timer
(
rt
);
...
@@ -2457,7 +2457,7 @@ static inline void cache_reap (void)
...
@@ -2457,7 +2457,7 @@ static inline void cache_reap (void)
static
void
reap_timer_fnc
(
unsigned
long
data
)
static
void
reap_timer_fnc
(
unsigned
long
data
)
{
{
int
cpu
=
smp_processor_id
();
int
cpu
=
smp_processor_id
();
struct
timer_list
*
rt
=
&
reap_timers
[
cpu
]
;
struct
timer_list
*
rt
=
&
__get_cpu_var
(
reap_timers
)
;
cache_reap
();
cache_reap
();
mod_timer
(
rt
,
jiffies
+
REAPTIMEOUT_CPUC
+
cpu
);
mod_timer
(
rt
,
jiffies
+
REAPTIMEOUT_CPUC
+
cpu
);
...
...
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