scripts/setup: Check if hugepage files are used before removal
If DPDK was not told to unlink the hugepage backing files during the hugepage_init, the application will keep them open while holding a lock on each file. Check if said lock is held, if not, remove the file. Change-Id: I738a3d7756c335b63388a2efeb03debd734d9c9e Signed-off-by: Michal Berger <michalx.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5065 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
bcf9f8ffc4
commit
c0648d4b45
@ -533,7 +533,9 @@ function reset_linux_pci() {
|
||||
function reset_linux() {
|
||||
reset_linux_pci
|
||||
for mount in $(linux_hugetlbfs_mounts); do
|
||||
rm -f "$mount"/spdk*map_*
|
||||
for hp in "$mount"/spdk*map_*; do
|
||||
flock -n "$hp" true && rm -f "$hp"
|
||||
done
|
||||
done
|
||||
rm -f /run/.spdk*
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user