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
nexedi
linux
Commits
a3a132ea
Commit
a3a132ea
authored
Sep 18, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If slab debugging is enabled, don't batch slabs on the per-cpu
lists by default. The batching avoids some debug tests.
parent
737fc38a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
mm/slab.c
mm/slab.c
+7
-2
No files found.
mm/slab.c
View file @
a3a132ea
...
@@ -1547,8 +1547,7 @@ static inline void __kmem_cache_free (kmem_cache_t *cachep, void* objp)
...
@@ -1547,8 +1547,7 @@ static inline void __kmem_cache_free (kmem_cache_t *cachep, void* objp)
STATS_INC_FREEMISS
(
cachep
);
STATS_INC_FREEMISS
(
cachep
);
batchcount
=
cachep
->
batchcount
;
batchcount
=
cachep
->
batchcount
;
cc
->
avail
-=
batchcount
;
cc
->
avail
-=
batchcount
;
free_block
(
cachep
,
free_block
(
cachep
,
&
cc_entry
(
cc
)[
cc
->
avail
],
batchcount
);
&
cc_entry
(
cc
)[
cc
->
avail
],
batchcount
);
cc_entry
(
cc
)[
cc
->
avail
++
]
=
objp
;
cc_entry
(
cc
)[
cc
->
avail
++
]
=
objp
;
return
;
return
;
}
else
{
}
else
{
...
@@ -1729,8 +1728,13 @@ static int kmem_tune_cpucache (kmem_cache_t* cachep, int limit, int batchcount)
...
@@ -1729,8 +1728,13 @@ static int kmem_tune_cpucache (kmem_cache_t* cachep, int limit, int batchcount)
return
0
;
return
0
;
}
}
/*
* If slab debugging is enabled, don't batch slabs
* on the per-cpu lists by defaults.
*/
static
void
enable_cpucache
(
kmem_cache_t
*
cachep
)
static
void
enable_cpucache
(
kmem_cache_t
*
cachep
)
{
{
#ifndef CONFIG_DEBUG_SLAB
int
err
;
int
err
;
int
limit
;
int
limit
;
...
@@ -1748,6 +1752,7 @@ static void enable_cpucache (kmem_cache_t *cachep)
...
@@ -1748,6 +1752,7 @@ static void enable_cpucache (kmem_cache_t *cachep)
if
(
err
)
if
(
err
)
printk
(
KERN_ERR
"enable_cpucache failed for %s, error %d.
\n
"
,
printk
(
KERN_ERR
"enable_cpucache failed for %s, error %d.
\n
"
,
cachep
->
name
,
-
err
);
cachep
->
name
,
-
err
);
#endif
}
}
static
void
enable_all_cpucaches
(
void
)
static
void
enable_all_cpucaches
(
void
)
...
...
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