SLOF/lib/libnvram
Nikunj A Dadhania b6c46e72f2 rtas-nvram: optimize erase
As this was done at byte granularity, erasing complete nvram(64K
default) took a lot of time. To reduce the number of rtas call per byte
write which is expensive, the erase is done at one shot using the
nvram_buffer that is initiated during the nvram_init call for
RTAS_NVRAM.

After this patch there is ~450msec improvement during boot. Default qemu
booting does not provide file backed nvram, so every boot there would be
full erase of 64K.

Before this patch:

real	0m2.214s
user	0m0.015s
sys	  0m0.006s

real	0m2.222s
user	0m0.014s
sys	  0m0.005s

real	0m2.201s
user	0m0.010s
sys	  0m0.005s

After this patch:

real	0m1.762s
user	0m0.014s
sys	  0m0.006s

real	0m1.773s
user	0m0.011s
sys   0m0.004s

real	0m1.754s
user	0m0.013s
sys	  0m0.005s

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-05-19 13:53:32 +10:00
..
Makefile Fixed some problems with libnvram 2011-08-19 14:57:32 +02:00
envvar.c Improve stack usage in libnvram environment variable code 2015-12-02 14:54:30 +11:00
libnvram.code Improve stack usage with libnvram get_partition function 2015-12-02 14:54:41 +11:00
libnvram.in SLOF: Support PAPR NVRAM RTAS calls 2012-10-17 16:30:58 +11:00
nvram.c rtas-nvram: optimize erase 2016-05-19 13:53:32 +10:00
nvram.h Improve stack usage with libnvram get_partition function 2015-12-02 14:54:41 +11:00