When we are running low on vnodes, there is currently no way to ask other

subsystems to release some vnodes. Implement backpressure based on
vfs_lowvnodes event (similar to vm_lowmem for memory).
This commit is contained in:
Pawel Jakub Dawidek 2007-04-13 08:38:48 +00:00
parent e70b852038
commit 6bc3ab2574
2 changed files with 5 additions and 0 deletions

View File

@ -736,6 +736,7 @@ vnlru_proc(void)
}
mtx_unlock(&mountlist_mtx);
if (done == 0) {
EVENTHANDLER_INVOKE(vfs_lowvnodes, desiredvnodes / 10);
#if 0
/* These messages are temporary debugging aids */
if (vnlru_nowhere < 5)

View File

@ -167,6 +167,10 @@ typedef void (*vm_lowmem_handler_t)(void *, int);
#define LOWMEM_PRI_DEFAULT EVENTHANDLER_PRI_FIRST
EVENTHANDLER_DECLARE(vm_lowmem, vm_lowmem_handler_t);
/* Low vnodes event */
typedef void (*vfs_lowvnodes_handler_t)(void *, int);
EVENTHANDLER_DECLARE(vfs_lowvnodes, vfs_lowvnodes_handler_t);
/*
* Process events
* process_fork and exit handlers are called without Giant.