Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dist/uts/common/fs/zfs fix ARC checks fo...



details:   https://anonhg.NetBSD.org/src/rev/948c8d2bb3e9
branches:  trunk
changeset: 365950:948c8d2bb3e9
user:      chs <chs%NetBSD.org@localhost>
date:      Wed May 04 15:49:55 2022 +0000

description:
fix ARC checks for available memory:
there's an extra check that we inherited from FreeBSD that tries to
detect KVA exhaustion on platforms with limited KVA, but the condition
that decided whether to use the extra check was using a FreeBSDism
that doesn't exist on NetBSD, resulting in this check being used on
all platforms.  on amd64 systems with lots of memory, this extra check
would result in the ARC thinking that it constantly needed to reclaim memory,
resulting in all the xcall threads running all the time but not doing
anything useful.  change this condition so that this extra check for
KVA exhaustion is only used on 32-bit platforms.  fixes PR 55707.

diffstat:

 external/cddl/osnet/dist/uts/common/fs/zfs/arc.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 97850c5cf74d -r 948c8d2bb3e9 external/cddl/osnet/dist/uts/common/fs/zfs/arc.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c  Wed May 04 14:30:04 2022 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c  Wed May 04 15:49:55 2022 +0000
@@ -3963,7 +3963,7 @@
        }
 
 #endif /* illumos */
-#if defined(__i386) || !defined(UMA_MD_SMALL_ALLOC)
+#if !defined(_LP64)
        /*
         * If we're on an i386 platform, it's possible that we'll exhaust the
         * kernel heap space before we ever run out of available physical
@@ -5750,7 +5750,7 @@
        static uint64_t page_load = 0;
        static uint64_t last_txg = 0;
 
-#if defined(__i386) || !defined(UMA_MD_SMALL_ALLOC)
+#if !defined(_LP64)
        available_memory =
            MIN(available_memory, ptob(vmem_size(heap_arena, VMEM_FREE)));
 #endif



Home | Main Index | Thread Index | Old Index