NetBSD-Bugs archive

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

Re: kern/57558: pgdaemon 100% busy - no scanning (ZFS case)



The following reply was made to PR kern/57558; it has been noted by GNATS.

From: Frank Kardel <kardel%netbsd.org@localhost>
To: Chuck Silvers <chuq%chuq.com@localhost>
Cc: gnats-bugs%netbsd.org@localhost, kern-bug-people%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/57558: pgdaemon 100% busy - no scanning (ZFS case)
Date: Thu, 9 May 2024 21:06:43 +0200

 On 05/09/24 19:48, Chuck Silvers wrote:
 
 > great, thanks for testing.
 >
 > which other cases are you talking about?
 >
 > -Chuck
 
 The cases in the KVA nkmempages determination.
 
 #if defined(NKMEMPAGES_MAX_UNLIMITED) && !defined(KMSAN)
          /*
           * The extra 1/9 here is to account for uvm_km_va_starved_p()
           * wanting to keep 10% of kmem virtual space free.
           * The intent is that on "unlimited" platforms we should be able
           * to allocate all of physical memory as kmem without running short
           * of kmem virtual space.
           */
          npages = (physmem * 10) / 9;
 #else
 
 #if defined(KMSAN)
          npages = (physmem / 4);
 #elif defined(PMAP_MAP_POOLPAGE)
          npages = (physmem / 4);
 #else
          npages = (physmem / 3) * 2;
 #endif /* defined(PMAP_MAP_POOLPAGE) */
 
 #if !defined(NKMEMPAGES_MAX_UNLIMITED)
          if (npages > NKMEMPAGES_MAX)
                  npages = NKMEMPAGES_MAX;
 #endif
 
 #endif
 
          if (npages < NKMEMPAGES_MIN)
                  npages = NKMEMPAGES_MIN;
 
          nkmempages = npages;
 
 defined(NKMEMPAGES_MAX_UNLIMITED) && !defined(KMSAN) is running fine now.
 
 I wonder whether we could hit the starvation scenario where ZFS does not 
 reclaim memory in time in
 
 the other cases as there nkmempages is set to a value less than physmem.
 
 Just wondering.
 
 -Frank
 
 


Home | Main Index | Thread Index | Old Index