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
bfb91fb6
Commit
bfb91fb6
authored
May 23, 2011
by
Pekka Enberg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'slab/next' into for-linus
Conflicts: mm/slub.c
parents
caebc160
3e0c2ab6
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
104 deletions
+69
-104
include/linux/slub_def.h
include/linux/slub_def.h
+4
-4
mm/slub.c
mm/slub.c
+65
-100
No files found.
include/linux/slub_def.h
View file @
bfb91fb6
...
...
@@ -37,9 +37,7 @@ enum stat_item {
struct
kmem_cache_cpu
{
void
**
freelist
;
/* Pointer to next available object */
#ifdef CONFIG_CMPXCHG_LOCAL
unsigned
long
tid
;
/* Globally unique transaction id */
#endif
struct
page
*
page
;
/* The slab from which we are allocating */
int
node
;
/* The node of the page (or -1 for debug) */
#ifdef CONFIG_SLUB_STATS
...
...
@@ -179,7 +177,8 @@ static __always_inline int kmalloc_index(size_t size)
if
(
size
<=
4
*
1024
)
return
12
;
/*
* The following is only needed to support architectures with a larger page
* size than 4k.
* size than 4k. We need to support 2 * PAGE_SIZE here. So for a 64k page
* size we would have to go up to 128k.
*/
if
(
size
<=
8
*
1024
)
return
13
;
if
(
size
<=
16
*
1024
)
return
14
;
...
...
@@ -190,7 +189,8 @@ static __always_inline int kmalloc_index(size_t size)
if
(
size
<=
512
*
1024
)
return
19
;
if
(
size
<=
1024
*
1024
)
return
20
;
if
(
size
<=
2
*
1024
*
1024
)
return
21
;
return
-
1
;
BUG
();
return
-
1
;
/* Will never be reached */
/*
* What we really wanted to do and cannot do because of compiler issues is:
...
...
mm/slub.c
View file @
bfb91fb6
This diff is collapsed.
Click to expand it.
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