linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, Pekka Enberg <penberg@cs.helsinki.fi>
Subject: [09/11] slub: Use virtualizable compound for buffer
Date: Tue, 29 Apr 2008 21:43:00 -0700	[thread overview]
Message-ID: <20080430044321.016890376@sgi.com> (raw)
In-Reply-To: <20080430044251.266380837@sgi.com>

[-- Attachment #1: vcp_fallback_slub_buffer --]
[-- Type: text/plain, Size: 1562 bytes --]

The caller table can get quite large if there are many call sites for a
particular slab. Using a virtual compound page allows fallback to vmalloc in
case the caller table gets too big and memory is fragmented. Currently we
would fail the operation.

Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
 mm/slub.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c	2008-04-29 16:40:30.851208783 -0700
+++ linux-2.6/mm/slub.c	2008-04-29 16:46:46.471205957 -0700
@@ -21,6 +21,7 @@
 #include <linux/ctype.h>
 #include <linux/kallsyms.h>
 #include <linux/memory.h>
+#include <linux/vmalloc.h>
 
 /*
  * Lock order:
@@ -3689,8 +3690,7 @@ struct loc_track {
 static void free_loc_track(struct loc_track *t)
 {
 	if (t->max)
-		free_pages((unsigned long)t->loc,
-			get_order(sizeof(struct location) * t->max));
+		__free_vcompound(t->loc);
 }
 
 static int alloc_loc_track(struct loc_track *t, unsigned long max, gfp_t flags)
@@ -3700,7 +3700,7 @@ static int alloc_loc_track(struct loc_tr
 
 	order = get_order(sizeof(struct location) * max);
 
-	l = (void *)__get_free_pages(flags, order);
+	l = __alloc_vcompound(flags, order);
 	if (!l)
 		return 0;
 

-- 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2008-04-30  4:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30  4:42 [00/11] Virtualizable Compound Page Support V5 Christoph Lameter
2008-04-30  4:42 ` [01/11] vmalloc: Return page array on vunmap Christoph Lameter
2008-04-30  4:42 ` [02/11] vcompound: pageflags: Add PageVcompound() Christoph Lameter
2008-04-30  4:42 ` [03/11] vmallocinfo: Support display of virtualized compound pages Christoph Lameter
2008-04-30  4:42 ` [04/11] vcompound: Core piece for virtualizable compound page allocation Christoph Lameter
2008-04-30  4:42 ` [05/11] vcompound: Debugging aid Christoph Lameter
2008-04-30  4:42 ` [06/11] sparsemem: Use virtualizable compound page Christoph Lameter
2008-04-30  4:42 ` [07/11] vcompound: bit waitqueue support Christoph Lameter
2008-04-30  4:42 ` [08/11] crypto: Use virtualizable compounds for temporary order 2 allocation Christoph Lameter
2008-04-30  4:43 ` Christoph Lameter [this message]
2008-04-30  4:43 ` [10/11] vcompound: Fallback for zone wait table Christoph Lameter
2008-04-30  4:43 ` [11/11] e1000: Avoid vmalloc through virtualizable compound page Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080430044321.016890376@sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@cs.helsinki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox