I've been trying to figure out how I can check to see if resources for kernel malloc() and mget() are nearing (but not at) their allocation limit. Wading around in the vm sources, I haven't figured out much. The following snippet of code is all I've come up with. (It looks like uz_allocs might also be useful, but I have no idea what upper bound would make sense, if any.) if ((zone_mbuf->uz_keg->uk_maxpages > 0 && (zone_mbuf->uz_keg->uk_pages + zone_mbuf->uz_keg->uk_pages/10) >= zone_mbuf->uz_keg->uk_maxpages) || (zone_clust->uz_keg->uk_maxpages > 0 && (zone_clust->uz_keg->uk_pages+zone_clust->uz_keg->uk_pages/10) >= zone_clust->uz_keg->uk_maxpages)) { - Allocation near limit for mbufs/clusters This would be useful, so that my NFSv4 server knows when to return NFS4ERR_RESOURCE. Any help with this would be appreciated. Thanks, rickReceived on Tue Mar 07 2006 - 20:27:04 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:53 UTC