#
95c872c1 |
| 22-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
oem: ibm: Use `truncate(1)` to create NVRAM related files
Use of `dd(1)` results in back-to-back `read(2)` and `write(2)` syscalls; the performance of `dd(1)` is O(n) with respect to the file size.
oem: ibm: Use `truncate(1)` to create NVRAM related files
Use of `dd(1)` results in back-to-back `read(2)` and `write(2)` syscalls; the performance of `dd(1)` is O(n) with respect to the file size. Poor choice of the `bs=` parameter to `dd(1)` can significantly amplify the amount of syscalls required to achieve the task.
By contrast, `truncate(1)` generally invokes a single syscall, either `truncate(2)` or `ftruncate(2)`. As a consequence, `truncate(1)` is O(1) with respect to file size.
Switch to `truncate(1)` to improve runtime efficiency of the scripts.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I69dd925f36e733fc2a1ee71cb8354ee04ee8871b
show more ...
|
#
2cff3015 |
| 10-Sep-2022 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
oem_ibm: Move the NVRAM files to the hostfw directory
This commit would : - Move the NVRAM files from /var/ on the BMC to the hostfw directory so that they don't get erased during a BMC factory re
oem_ibm: Move the NVRAM files to the hostfw directory
This commit would : - Move the NVRAM files from /var/ on the BMC to the hostfw directory so that they don't get erased during a BMC factory reset.
- To help migrate existing systems, check if the files exist in /var/, and if they do, move them to the hostfw destination.
- This also adds dependent services that ensure that the links being setup correctly in var/lib/phosphor-software-manager/hostfw/ is run first.
- The services to clear PHYP NVRAM are not needed anymore. Instead of the BMC clearing them, the hypervisor will now clear them if the pvm_clear_nvram bios attribute is set.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: If8da88347a82d212b30c3cb6354037b62887c67c
show more ...
|