All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] eal: decrease the memory init time with many hugepages setup
@ 2015-04-02 11:30 jerry.lilijun-hv44wF8Li93QT0dZR+AlfA
       [not found] ` <1427974230-8572-1-git-send-email-jerry.lilijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: jerry.lilijun-hv44wF8Li93QT0dZR+AlfA @ 2015-04-02 11:30 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Lilijun <jerry.lilijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

In the function map_all_hugepages(), hugepage memory is truly allocated by
memset(virtaddr, 0, hugepage_sz). Then it costs about 40s to finish the
dpdk memory initialization when 40000 2M hugepages are setup in host os.
In fact we can only write one byte to finish  the allocation.

Signed-off-by: Lilijun <jerry.lilijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
 lib/librte_eal/linuxapp/eal/eal_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index 5f9f92e..8bbee9c 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -378,7 +378,7 @@ map_all_hugepages(struct hugepage_file *hugepg_tbl,
 
 		if (orig) {
 			hugepg_tbl[i].orig_va = virtaddr;
-			memset(virtaddr, 0, hugepage_sz);
+			memset(virtaddr, 0, 1);
 		}
 		else {
 			hugepg_tbl[i].final_va = virtaddr;
-- 
1.9.4.msysgit.1

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

end of thread, other threads:[~2015-04-03 12:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-02 11:30 [PATCH] eal: decrease the memory init time with many hugepages setup jerry.lilijun-hv44wF8Li93QT0dZR+AlfA
     [not found] ` <1427974230-8572-1-git-send-email-jerry.lilijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-04-02 12:55   ` Thomas Monjalon
2015-04-02 13:41     ` Jay Rolette
     [not found]       ` <CADNuJVpPYTx5eJW9rLqp2GcoHN3AqHyrGs-H5GMjGd=8emicBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-03  9:04         ` Gonzalez Monroy, Sergio
     [not found]           ` <551E57A6.9070405-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-04-03  9:14             ` Thomas Monjalon
2015-04-03  9:37               ` Lilijun
2015-04-03 12:00               ` Gonzalez Monroy, Sergio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.