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
42ddc4cb
Commit
42ddc4cb
authored
May 06, 2009
by
Pekka Enberg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'topic/documentation', 'topic/slub/fixes' and 'topic/urgent' into for-linus
parents
51e95bed
818cf590
1f0532eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
mm/slob.c
mm/slob.c
+4
-1
mm/slub.c
mm/slub.c
+5
-1
No files found.
mm/slob.c
View file @
42ddc4cb
...
...
@@ -60,6 +60,7 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/swap.h>
/* struct reclaim_state */
#include <linux/cache.h>
#include <linux/init.h>
#include <linux/module.h>
...
...
@@ -255,6 +256,8 @@ static void *slob_new_pages(gfp_t gfp, int order, int node)
static
void
slob_free_pages
(
void
*
b
,
int
order
)
{
if
(
current
->
reclaim_state
)
current
->
reclaim_state
->
reclaimed_slab
+=
1
<<
order
;
free_pages
((
unsigned
long
)
b
,
order
);
}
...
...
@@ -407,7 +410,7 @@ static void slob_free(void *block, int size)
spin_unlock_irqrestore
(
&
slob_lock
,
flags
);
clear_slob_page
(
sp
);
free_slob_page
(
sp
);
free_page
((
unsigned
long
)
b
);
slob_free_pages
(
b
,
0
);
return
;
}
...
...
mm/slub.c
View file @
42ddc4cb
...
...
@@ -9,6 +9,7 @@
*/
#include <linux/mm.h>
#include <linux/swap.h>
/* struct reclaim_state */
#include <linux/module.h>
#include <linux/bit_spinlock.h>
#include <linux/interrupt.h>
...
...
@@ -1170,6 +1171,8 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
__ClearPageSlab
(
page
);
reset_page_mapcount
(
page
);
if
(
current
->
reclaim_state
)
current
->
reclaim_state
->
reclaimed_slab
+=
pages
;
__free_pages
(
page
,
order
);
}
...
...
@@ -1909,7 +1912,7 @@ static inline int calculate_order(int size)
* Doh this slab cannot be placed using slub_max_order.
*/
order
=
slab_order
(
size
,
1
,
MAX_ORDER
,
1
);
if
(
order
<
=
MAX_ORDER
)
if
(
order
<
MAX_ORDER
)
return
order
;
return
-
ENOSYS
;
}
...
...
@@ -2522,6 +2525,7 @@ __setup("slub_min_order=", setup_slub_min_order);
static
int
__init
setup_slub_max_order
(
char
*
str
)
{
get_option
(
&
str
,
&
slub_max_order
);
slub_max_order
=
min
(
slub_max_order
,
MAX_ORDER
-
1
);
return
1
;
}
...
...
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