Skip to content

Commit cd0c019

Browse files
committed
skip source free when the reserved memory is not crossing arc_max
1 parent 3a718c0 commit cd0c019

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

module/os/windows/spl/spl-kmem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4968,8 +4968,8 @@ spl_abd_prealloc_thread(void *notused)
49684968
spl_abd_prealloc_thread_exit = FALSE;
49694969
dprintf("SPL: %s thread_exit\n", __func__);
49704970

4971-
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, "SPL: abd prealloc done segkmem_total_mem_allocated: %lld total_memory: %lld zfs_prealloc_percent: %d%\n",
4972-
segkmem_total_mem_allocated, total_memory, zfs_abd_prealloc_percent));
4971+
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, "SPL: abd prealloc done segkmem_total_mem_allocated: %lld total_memory: %lld zfs_arc_max: %llu zfs_prealloc_percent: %d%\n",
4972+
segkmem_total_mem_allocated, total_memory, zfs_arc_max, zfs_abd_prealloc_percent));
49734973
thread_exit();
49744974
}
49754975

module/os/windows/spl/spl-vmem.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,10 +1737,7 @@ vmem_xfree(vmem_t *vmp, void *vaddr, size_t size)
17371737
// don;t want to do this unless we are near the arc limit
17381738
boolean_t skip_sfree = true;
17391739
if (segkmem_total_mem_allocated >
1740-
(zfs_arc_max * 100) / 100) {
1741-
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL,
1742-
"vmem_xfree: skip source free segkmem_total_mem_allocated: %llu zfs_arc_max: %llu\n",
1743-
segkmem_total_mem_allocated, zfs_arc_max));
1740+
(zfs_arc_max * 102) / 100) {
17441741
skip_sfree = false;
17451742
}
17461743

0 commit comments

Comments
 (0)