/**************************************************************************** | | (C) Copyright 1995-1997 Novell, Inc. | All Rights Reserved. | | This program is free software; you can redistribute it and/or | modify it under the terms of version 2 of the GNU General Public | License as published by the Free Software Foundation. | | This program is distributed in the hope that it will be useful, | but WITHOUT ANY WARRANTY; without even the implied warranty of | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | GNU General Public License for more details. | | You should have received a copy of the GNU General Public License | along with this program; if not, contact Novell, Inc. | | To contact Novell about this file by physical or electronic mail, | you may find current contact information at www.novell.com | |*************************************************************************** | | NetWare Advance File Services (NSS) Initialization module | |--------------------------------------------------------------------------- | | $Author: vandana $ | $Date: 2006-11-16 22:18:20 +0530 (Thu, 16 Nov 2006) $ | | $RCSfile$ | $Revision: 1662 $ | |--------------------------------------------------------------------------- | This module is used to: | Defines structure of Global varibales for controlling cache. | We placed it in this header file to make dumping this information | easier. | | WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! | | This header file should ONLY be used for NSS internal development. | This includes Semantic Agents (SA) and Loadable Storage Services (LSS). | Any other use may cause conflicts which NSS will NOT fix. +-------------------------------------------------------------------------*/ #ifndef _CACHECONTROL_H_ #define _CACHECONTROL_H_ #ifndef _QUE_H_ #include #endif #ifndef _FSM_H_ #include #endif #ifndef _ALARM_H_ #include #endif #ifndef _LATCH_H_ #include #endif #ifdef __cplusplus extern "C" { #endif typedef struct CacheControl_s { CIRhead_t waitQ; /* Queue to wait for a free buffer */ DQhead_t *bucket; /* Table of hash Buffer_s headers */ DQhead_t *bucketPageBuffer; /* Table of PageBuffer_s hash headers */ DQhead_t lruQDirty; /* LRU list for buffers */ DQhead_t lruQBonded; /* LRU list for buffers */ DQhead_t lruQAvail; /* */ DQhead_t lruQAvailUser; /* */ DQhead_t lruQAvailMetaData; /* */ DQhead_t lruQNoLinuxPages; /* */ DQhead_t lruQMetadataPage; /* LRU of Pages that we allocated for himem meta-data blocks. These are linked via a PageBuffer_s and NOT Buffer_s to save low memory. */ STKtop_t bufLists; /* Allocated space for buffer structures */ STKtop_t noPageBufs; /* List of bufs whose data pages were returned */ STKtop_t freePageBuffers;/* List of free Himem Matadata PageBuffer_s */ NINT available; /* Number of cache buffers currently available */ NINT control; NINT slabbed; NINT waitInst; /* Instance of waiting for the cache */ NINT oldNumBuffers; /* Old value for min file system buffers */ BOOL isInitialized; /* Know if we have initialized the cache for * command line parsing. */ /* * There is a routine for giving memory back to the system and one * for taking memory from the system. A giver can be started if * a taker is running. The taker will stop running as soon as it * notices a giver is running. */ struct balance_s { FsmLite_s fsm; /* Fsm to we can schedule work-to-do's */ OneShot_s alarm; /* How often each is allowed to run */ BOOL isRunning; /* Allows only one instance to run */ } giver, taker; LONG loadModuleEventID; #if NSS_DEBUG IS_ENABLED #endif Latch_s CC_HMCCacheTypeLatch; /* Latch used by HMC to serial changes to its cache type - private, linux or none. Config.cache... */ } CacheControl_s; extern CacheControl_s Cache; extern void changeCacheBuffers(void); extern void cacheBalance(void); #ifdef __cplusplus } #endif #endif