diff options
author | jhb <jhb@FreeBSD.org> | 2007-01-05 19:09:01 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2007-01-05 19:09:01 +0000 |
commit | db17c1d99766e8e363022d2083401fc77d932e08 (patch) | |
tree | c0e8cfc6237dd518f03177e06513d08464de61d2 /sys/vm/uma.h | |
parent | 38b3d2db725b086c9db5c0c2f981b19a911c7aa6 (diff) | |
download | FreeBSD-src-db17c1d99766e8e363022d2083401fc77d932e08.zip FreeBSD-src-db17c1d99766e8e363022d2083401fc77d932e08.tar.gz |
- Add a new function uma_zone_exhausted() to see if a zone is full.
- Add a printf in swp_pager_meta_build() to warn if the swapzone becomes
exhausted so that there's at least a warning before a box that runs out
of swapzone space before running out of swap space deadlocks.
MFC after: 1 week
Reviwed by: alc
Diffstat (limited to 'sys/vm/uma.h')
-rw-r--r-- | sys/vm/uma.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/vm/uma.h b/sys/vm/uma.h index 2181ec7..08a55d6 100644 --- a/sys/vm/uma.h +++ b/sys/vm/uma.h @@ -509,6 +509,17 @@ void uma_prealloc(uma_zone_t zone, int itemcnt); u_int32_t *uma_find_refcnt(uma_zone_t zone, void *item); /* + * Used to determine if a fixed-size zone is exhausted. + * + * Arguments: + * zone The zone to check + * + * Returns: + * Non-zero if zone is exhausted. + */ +int uma_zone_exhausted(uma_zone_t zone); + +/* * Exported statistics structures to be used by user space monitoring tools. * Statistics stream consusts of a uma_stream_header, followed by a series of * alternative uma_type_header and uma_type_stat structures. Statistics |