SLUB: use page allocator for PAGE_SIZE requests
PATCH 1/1 SLUB: use page allocator for PAGE_SIZE requests
Quoted 1 line
From
4d526db4781aaab86cb79ff8135bb0e2bc560598Mon Sep 17 00:00:00 2001
From: Vegard Nossum <[email protected]>
Date: Sat, 22 Nov 2008 13:27:54 +0100
Subject: [PATCH] SLUB: use page allocator for PAGE_SIZE requests
It seems strange that we should use the page allocator for requests of (PAGE_SIZE + 1) bytes or more, and not for requests that are exactly PAGE_SIZE.
--- include/linux/slub_def.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/slub_def.h +1 -1
@@ -212,7 +212,7 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags) static __always_inline void *kmalloc(size_t size, gfp_t flags) {if (__builtin_constant_p (size)) { -if (size >PAGE_SIZE ) +if (size >=PAGE_SIZE )return kmalloc_large (size, flags);if (!(flags &SLUB_DMA )) {
Signature · 1 line
1.5.6.5
Quoted 8 lines · Vegard Nossum
From
4d526db4781aaab86cb79ff8135bb0e2bc560598Mon Sep 17 00:00:00 2001
From: Vegard Nossum <[email protected]>
Date: Sat, 22 Nov 2008 13:27:54 +0100
Subject: [PATCH] SLUB: use page allocator forPAGE_SIZErequestsIt seems strange that we should use the page allocator for requests of (
PAGE_SIZE+ 1) bytes or more, and not for requests that are exactlyPAGE_SIZE.
Actually, there are some more places that need to be fixed. I think I'll send an updated patch that fixes all of them.
Vegard
Signature · 4 lines
"The animistic metaphor of the bug that maliciously sneaked in while the programmer was not looking is intellectually dishonest as it disguises that the error is the programmer's own creation." -- E. W. Dijkstra, EWD1036
Quoted 6 lines · Vegard Nossum
Quoted 5 lines · Vegard Nossum
From
4d526db4781aaab86cb79ff8135bb0e2bc560598Mon Sep 17 00:00:00 2001
From: Vegard Nossum <[email protected]>
Date: Sat, 22 Nov 2008 13:27:54 +0100
Subject: [PATCH] SLUB: use page allocator forPAGE_SIZErequests
Quoted 6 lines
Quoted 3 lines
It seems strange that we should use the page allocator for requests of (
PAGE_SIZE+ 1) bytes or more, and not for requests that are exactlyPAGE_SIZE.Actually, there are some more places that need to be fixed. I think I'll send an updated patch that fixes all of them.
ACTUALLY, please ignore whole thread. I now read the commit message of
commit 331dc558fa020451ff773973cee855fd721aa88e
Author: Christoph Lameter <[email protected]> Date: Thu Feb 14 14:28:09 2008 -0800
slub: Support 4k kmallocs again to compensate for page allocator slowness
:-/
Sorry for the noise.
Vegard
Signature · 4 lines
"The animistic metaphor of the bug that maliciously sneaked in while the programmer was not looking is intellectually dishonest as it disguises that the error is the programmer's own creation." -- E. W. Dijkstra, EWD1036