Purging and Scavenging Control

RDBSS provides a number of routines to purge and scavenge FOBX structures when they are no longer needed.

At cleanup, there are no more user handles associated with the file object. In such cases, the time window between close and cleanup is dictated by the additional references maintained by Memory Manager and Cache Manager. RDBSS uses a scavenger process that runs on a separate thread to scavenge and purge unneeded FOBX and other structures.

Currently, scavenging has been implemented for SRV_CALL, NET_ROOT and V_NET_ROOT structures. The FCB scavenging is handled separately. The FOBX can and should always be synchronously finalized. The only data structure that will have to be potentially enabled for scavenged finalization are SRV_OPEN structures.

The scavenger process as it is implemented in RDBSS currently will not consume any system resources until there is a need for scavenged finalization. The first entry to be marked for scavenged finalization will result in a timer request being posted for the scavenger. In the current implementation, the timer requests are posted as one-shot timer requests. This implies that there are no guarantees regarding the time interval within which the entries will be finalized. The scavenger activation mechanism is a potential candidate for fine tuning at a later stage.

The RDBSS purging and scavenging routines include the following:

Routine Description

RxPurgeAllFobxs

This routine purges all of the FOBX structures associated with a network mini-redirector.

RxPurgeRelatedFobxs

This routine purges all of the FOBX structures associated with a NET_ROOT structure.

RxScavengeAllFobxs

This routine scavenges all of the FOBX structures associated with a given network mini-redirector device object.

RxScavengeFobxsForNetRoot

This routine scavenges all of the FOBX structures associated with a given NET_ROOT structure.