[09/14] vcompound: crypto: Fallback for temporary order 2 allocation

Previous thread: [10/14] vcompound: slub: Use for buffer to correlate allocation addresses by Christoph Lameter on Friday, March 21, 2008 - 2:17 am. (1 message)

Next thread: [14/14] vcompound: Avoid vmalloc for ehash_locks by Christoph Lameter on Friday, March 21, 2008 - 2:17 am. (7 messages)
To: <linux-mm@...>
Cc: <linux-kernel@...>, Dan Williams <dan.j.williams@...>
Date: Friday, March 21, 2008 - 2:17 am

The crypto subsystem needs an order 2 allocation. This is a temporary buffer
for xoring data so we can safely allow fallback.

Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
crypto/xor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6.25-rc5-mm1/crypto/xor.c
===================================================================
--- linux-2.6.25-rc5-mm1.orig/crypto/xor.c 2008-03-20 18:04:44.649120096 -0700
+++ linux-2.6.25-rc5-mm1/crypto/xor.c 2008-03-20 19:41:35.383789613 -0700
@@ -101,7 +101,7 @@ calibrate_xor_blocks(void)
void *b1, *b2;
struct xor_block_template *f, *fastest;

- b1 = (void *) __get_free_pages(GFP_KERNEL, 2);
+ b1 = __alloc_vcompound(GFP_KERNEL, 2);
if (!b1) {
printk(KERN_WARNING "xor: Yikes! No memory available.\n");
return -ENOMEM;
@@ -140,7 +140,7 @@ calibrate_xor_blocks(void)

#undef xor_speed

- free_pages((unsigned long)b1, 2);
+ __free_vcompound(b1);

active_template = fastest;
return 0;

--
--

Previous thread: [10/14] vcompound: slub: Use for buffer to correlate allocation addresses by Christoph Lameter on Friday, March 21, 2008 - 2:17 am. (1 message)

Next thread: [14/14] vcompound: Avoid vmalloc for ehash_locks by Christoph Lameter on Friday, March 21, 2008 - 2:17 am. (7 messages)