linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] IB/ehca: Replace vmalloc with kmalloc
@ 2009-04-21 15:16 Stefan Roscher
  2009-04-21 17:34 ` Roland Dreier
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Stefan Roscher @ 2009-04-21 15:16 UTC (permalink / raw)
  To: LinuxPPC-Dev, LKML, OF-EWG, Roland Dreier
  Cc: alexschm, fenkes, stefan.roscher, raisch

From: Anton Blanchard <antonb at au1.ibm.com>

To improve performance of driver ressource allocation,
replace the vmalloc() call with kmalloc().

Signed-off-by: Stefan Roscher <stefan.roscher at de.ibm.com>
---
 drivers/infiniband/hw/ehca/ipz_pt_fn.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/hw/ehca/ipz_pt_fn.c b/drivers/infiniband/hw/ehca/ipz_pt_fn.c
index c3a3284..a260559 100644
--- a/drivers/infiniband/hw/ehca/ipz_pt_fn.c
+++ b/drivers/infiniband/hw/ehca/ipz_pt_fn.c
@@ -220,7 +220,7 @@ int ipz_queue_ctor(struct ehca_pd *pd, struct ipz_queue *queue,
 	queue->small_page = NULL;
 
 	/* allocate queue page pointers */
-	queue->queue_pages = vmalloc(nr_of_pages * sizeof(void *));
+	queue->queue_pages = kmalloc(nr_of_pages * sizeof(void *), GFP_KERNEL);
 	if (!queue->queue_pages) {
 		ehca_gen_err("Couldn't allocate queue page list");
 		return 0;
@@ -240,7 +240,7 @@ int ipz_queue_ctor(struct ehca_pd *pd, struct ipz_queue *queue,
 ipz_queue_ctor_exit0:
 	ehca_gen_err("Couldn't alloc pages queue=%p "
 		 "nr_of_pages=%x",  queue, nr_of_pages);
-	vfree(queue->queue_pages);
+	kfree(queue->queue_pages);
 
 	return 0;
 }
@@ -262,7 +262,7 @@ int ipz_queue_dtor(struct ehca_pd *pd, struct ipz_queue *queue)
 			free_page((unsigned long)queue->queue_pages[i]);
 	}
 
-	vfree(queue->queue_pages);
+	kfree(queue->queue_pages);
 
 	return 1;
 }
-- 
1.5.5

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-04-28 16:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-21 15:16 [PATCH 1/3] IB/ehca: Replace vmalloc with kmalloc Stefan Roscher
2009-04-21 17:34 ` Roland Dreier
2009-04-22  9:11   ` Stefan Roscher
2009-04-22 14:02   ` Stefan Roscher
2009-04-22 14:10     ` michael
2009-04-22 16:00       ` Stefan Roscher
2009-04-22 16:12         ` michael
2009-04-28 13:07     ` [ewg] " Alexander Schmidt
2009-04-28 14:01       ` Roland Dreier
2009-04-28 14:13         ` Alexander Schmidt
2009-04-28 15:12 ` Dave Hansen
2009-04-28 16:02   ` Stefan Roscher
2009-04-28 16:45 ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).