[OpenAFS-devel] RE: Progress with snapshot-02-28 on HP-UX 11.0, 11i and ia64 11.22

Carl E. Davidson carl_davidson@hp.com
Fri, 28 Feb 2003 15:00:20 -0800


This is a multi-part message in MIME format.

------=_NextPart_000_0155_01C2DF3A.1D69DED0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Doug,

The HP-UX 11.11 version of vfs_vm.h is in the attachment. It will
be great if you can coalesce all the HP-UX 11.* changes so that
the same code compiles on any of our current releases. Thanks for
taking the time to do it.

Regards,
Carl

> -----Original Message-----
> From: Douglas E. Engert [mailto:deengert@anl.gov] 
> Sent: Friday, February 28, 2003 2:27 PM
> To: Derrick J Brashear
> Cc: Srikanth Vishwanathan; carl_davidson@hp.com; 
> openafs-devel@openafs.org
> Subject: Progress with snapshot-02-28 on HP-UX 11.0, 11i and 
> ia64 11.22
> 
> 
> Carl,
> I need the vfs_vm.h for the 11i. This was the header missing 
> for 11.0. It 
> looks like it is also missing from 11i. 
> 
> I now have three HP systems:  a 11.0, a 11.11 and a 11.22 on which 
> I am building the openafs-snap-2003-02-28. (Derrick, thanks 
> for updating the CVS.)
> 
> There are difference between the vfs_vm.h on 11.0 and 11.22 
> versions, so I 
> am reluctant to just use the 11.0 version with 11i. 
> 
> Almost all the mods I originally made for 11.22 where 
> actually for features 
> introduced in 11.0. But the AFS 11.0 code had not been 
> updated to use these 
> new features but continued to use the depreciated routines. 
> The release of 11.22 
> (and maybe 11i) forced the issue that these needed to be updated.   
> 
> So what I am doing now is changing many of the #if 
> defined(AFS_HPUX1122_ENV)
> to use AFS_HPUX110_ENV or AFS_HPUX1111_ENV as needed so as to 
> use these same 
> features in  11., 11i and 11.22, thus making the code a 
> little cleaner, and 
> maybe more efficient. 
> 
> -- 
> 
>  Douglas E. Engert  <DEEngert@anl.gov>
>  Argonne National Laboratory
>  9700 South Cass Avenue
>  Argonne, Illinois  60439 
>  (630) 252-5444
> 

------=_NextPart_000_0155_01C2DF3A.1D69DED0
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment

From: "Carl E Davidson" <ced@cup.hp.com>
To: <ced@cup.hp.com>
Subject: vfs_vm.h for 11.11
Date: Fri, 28 Feb 2003 14:57:33 -0800
Message-ID: <200302282257.OAA25573@theo.cup.hp.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0151_01C2DF3A.1D6523E0"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.4510
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Importance: Normal

This is a multi-part message in MIME format.

------=_NextPart_000_0151_01C2DF3A.1D6523E0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

/*
 * BEGIN_DESC
 * 
 *  File: 
 *      @(#)	common/sys/vfs_vm.h		$Revision: $
 * 
 *  Purpose:
 *      <<please update with a synopis of the functionality provided by this file>>
 * 
 *  Classification:			Release to Release Consistency Req:
 *		<<please select one of the following:>>
 * 	kernel subsystem private		none
 * 	kernel private				none
 * 	kernel 3rd party private		limited source
 * 	public					binary & source
 * 
 *  BE header:  no
 *
 *  Shipped:  no
 *
 *  NOTE:
 *	This header file contains information specific to the internals
 *	of the HP-UX implementation.  The contents of this header file
 *	are subject to change without notice.  Such changes may affect
 *	source code, object code, or binary compatibility between
 *	releases of HP-UX.  Code which uses the symbols contained within
 *	this header file is inherently non-portable (even between HP-UX
 *	implementations).
 * 
 * END_DESC  
*/


#ifndef _VFS_INCLUDED /* allows multiple inclusion */
#define _VFS_INCLUDED

#include <sys/pregion.h>

/*
 * max number of pages that vfs_pagein may bring in at a time
 * max number of pages that vfs_pageout may write out at a time
 */
#define VFS_MAXPGIN	64
#define VFS_MAXPGOUT	16

#define MAX_PGCNT_T	MAXINT	/* ?? this should live near pgcnt_t typedef */
#define BIG_OK_DBD	MAX_PGCNT_T

extern double idleness[];
extern double real_run[];
extern int deactive_cnt;
extern pgcnt_t max_pgrate;
extern int memory_sleepers;
extern pgcnt_t pageoutrate;
extern pgcnt_t kpageoutrate;
extern int prepage;
extern int vhandrunrate;
extern int waitio_proc_cnt;
extern int maxslp;
extern lock_t *swap_buf_list_lock;
extern pgcnt_t avefree;
extern pgcnt_t desfree;
extern pgcnt_t freemem;
extern pgcnt_t gpgslim;
extern pgcnt_t lotsfree;
extern int maxpageout;
extern pgcnt_t maxpendpageouts;
extern pgcnt_t mem_deficit;
extern pgcnt_t minsleepmem;
extern pgcnt_t minfree;
extern pgcnt_t pageoutcnt;
extern pgcnt_t kpageoutcnt;
extern pgcnt_t parolemem;
extern pgcnt_t stealvisited;
extern preg_t *stealhand;
extern b_sema_t vhandsema;
extern dev_t swapdev;        /* swapping device */

extern int unhash;

extern struct buf *bswalloc();
extern void pregtrunc();
extern void mtrunc();

/*
 * Gross stuff for NFS...
 *
 * NFS requires memory resources to perform a pageout.  However, if
 * vhand is trying to steal pages, we probably do not have memory
 * available to page out NFS pages.  To avoid a deadlock, we do the
 * following for NFS (but only when called by vhand):
 *
 *   . When paging out an NFS region, we conditionally reserve enough
 *     pages (NFS_PAGEOUT_MEM) to guarantee that the NFS will never
 *     have to sleep waiting for memory.  This is essentially one page
 *     for every distinct size of memory that NFS needs (i.e. 1 page for
 *     128 byte buffers, 1 page for 512 byte buffers, etc).  If we
 *     cannot get the memory, we skip the dirty page and go on.
 *
 *   . In pagein, we do not allow an NFS pagein to proceed until there
 *     is at least minumum number of free pages (2 * NFS_PAGEOUT_MEM).
 *     This guarantees that there will always be enough non-NFS pages
 *     to page out so that we can reserve enough pages to page out
 *     dirty NFS pages.
 */
#define NFS_PAGEOUT_MEM		    7	/* empirically determined */
#define NFS_PAGEIN_MEM		   14

/*
 * VM Pagein/Pageout Flags
 */
 
/* Parameters for calling VOP_PAGEOUT.  */
#define PAGEOUT_HARD	0x01 /* Take all the pages you can, wait for locks */
#define PAGEOUT_FREE	0x02 /* Free the pages once the I/O is complete */
#define PAGEOUT_WAIT	0x04 /* Wait for the I/O to complete */
#define PAGEOUT_VHAND	0x08 /* Pageout request by vhand */
#define PAGEOUT_PURGE	0x20 /* purge pages from the page cache */
#define PAGEOUT_RESERVED   0x80

/* Parameters for VOP_VM_COMMIT - Will be used for future V3 Patch */
#define COMMIT_NOWAIT	0x1
#define COMMIT_WAIT	0x2
#define COMMIT_NOW	0x4
#define COMMIT_INIT	0x8
#define COMMIT_DONE	0x10


#define COMMIT_FLAGS (COMMIT_NOWAIT | COMMIT_WAIT | COMMIT_NOW | \
		COMMIT_INIT | COMMIT_DONE)

#define VALID_COMMIT_FLAG(flag) (flag & COMMIT_FLAGS)

#define COMMIT_CLUSTER_SIZE	8	/* pages */

/*
 * Pagein/Pageout Specific Flags.
 */
#define	VM_NOWAIT	0x100	/* Can't sleep for resources. */
#define VM_INVALIDATE           0x200
#define VM_ERROR                0x400
#define VM_FREE_PAGE            0x800
#define VM_MLOCK                0x1000
#define VM_LARGEPAGE_IO         0x2000
#define VM_LARGEPAGE_RUN        0x4000
#define VM_IO_RUN               0x8000
#define PAGEOUT_NO_PHYSICAL     0x10000
#define VM_VFS_LGPG_FLAGS	(VM_INVALIDATE | VM_ERROR | VM_FREE_PAGE | \
				 VM_MLOCK | VM_LARGEPAGE_IO | VM_LARGEPAGE_RUN)
#define VM_DEVSWAP_LGPG_FLAGS	(VM_LARGEPAGE_RUN | VM_MLOCK | VM_ERROR | \
				 PAGEOUT_NO_PHYSICAL)

typedef enum vm_freepage_ret {
	PAGE_DIRTY,
	PAGE_CLEAN
} vm_freepage_ret_t;

typedef enum vm_fscheck_rets {
	VM_SUCCESS,
	VM_TERMINATE_RUN,
	VM_NOT_INCLUDED,
	VM_FS_ERROR
} vm_fscheck_rets_t;

typedef enum vm_devswap_examine_ret {
	FREE_PAGE,
	DONT_TOUCH,
	WRITE_PAGE
} vm_devswap_examine_ret_t;

/* 
 * DETECT_HOLES is set by those file systems who can determine sparse access.
 */
#define DETECT_HOLES		0x1
#define DONT_BPURGE             0x2

/*
 * Set by NFS to inform upper layer a truncation on the object is necessary.
 */
#define PAGEOUT_TRUNCATE   	0x2

/* 
 * Defines used for read-ahead. ADJUST_SIZE causes the pagein size to adjust,
 * while ADJUST_STRENGTH adjusts the pregion strength indicator.
 */
#define ADJUST_SIZE	0x1
#define ADJUST_STRENGTH	0x2

/*
 * The following defines are used for read-ahead I/O's.
 *
 * MULTI_CONVERT_THRESHOLD is the "p_strength" value when single to multi-page
 * conversion takes place.
 *
 * PURELY_RANDOM and PURELY_SEQUENTIAL are "p_strength" indicators used by
 * madvise() when the user specifies MADV_RANDOM or MADV_SEQUENTIAL.  They
 * also bound p_strength to that range.
 *
 */
#define MULTI_CONVERT_THRESHOLD		15
#define PURELY_RANDOM			-100
#define PURELY_SEQUENTIAL		100
#define DEFAULT_PAGEIN_SIZE		8

/*
 * Passed to read ahead process pages (ra_process_pages)
 */
#define DO_READ_AHEAD			0x1
#define DONT_DO_READ_AHEAD		0x2
#define HOLD_PAGE_LOCK                  0x4

/*
 * Passed to VM truncation.
 */
#define VP_TRUNCATE     0x1
#define VP_INVALIDATE   0x2

#define DBD_TYPE(vm_info)           	((vm_info)->dbd->dbd_type)
#define DBD_DATA(vm_info)           	((vm_info)->dbd->dbd_data)

#define RESET_BUFCACHE_STEALSCAN(bufcache_preg) (bufcache_preg->p_stealscan = 1)

/*
 * Returns "1" if the pageout routine should stop.
 */
#define VM_STOP_PAGING(vm_info)				\
	((((vm_info)->vm_flags & PAGEOUT_VHAND) && 	\
	!((vm_info)->vm_flags & PAGEOUT_HARD) && 	\
	parolemem >= maxpendpageouts) ? 1 : 0)		\

/*
 *
 * #define's for large pages.
 *
 */

/* 
 * LGPG_ENABLE flag is passed to vm_pagein_init() by VOP_PAGEIN routines
 * such as ufs_pagein() to indicate that they have been adapted for paging
 * in a large page.
 */

#define LGPG_ENABLE	0x01	

#define LGPG_RETRY_MAX 	8

/*
 * Status of an instance of a large page during VOP_PAGEIN. These flags 
 * are set by various "vm_" routines in vfs_vm.c file. Also used by 
 * devswap_pagein(), a VOP_PAGEIN routine.
 */

typedef enum lgpg_stat_flags {
	LGPG_CLR_FLAGS		= 0x00,
	LGPG_TRY		= 0x10,
	LGPG_EXPAND_FAILED	= 0x20,
	LGPG_ALLOCATED         	= 0x40,
	LGPG_ALLOC_FAILED	= 0x80,
	LGPG_CACHE_ERROR   	= 0x100
	} lgpg_stat_flags_t;

/*
 * Reasons for terminating fault expansion. Returned by
 * expand_faultin_up() and expand_faultin_down().
 */

typedef enum expnd_flags {
	CLR_FLAGS		= 0x00,
	PAGELIMIT 		= 0x01,
	NONCONTIGUOUS_BLOCK	= 0x02,
	VM_REASONS		= 0x04 
	} expnd_flags_t;


typedef enum vmpgin_return_values {
	VM_NONE			= 0,
	VM_DONE			= 1,
	VM_PAGE_PRESENT		= 2,
	VM_RETRY		= 3
	} retval_t;

/*
 * Flags passed to vm_expand_ok().
 */

#define MIN_PAGE		0x100
#define MAX_PAGE		0x200

/*
 * The following macros VM_SET_FS_MAX_PAGES and VM_SET_FS_MIN_PAGES are
 * called by VOP_PAGEIN routines to specify the maximum-pages (for each 
 * IO) allowed and the minimum_pages desired (for each IO) respectively.
 */

#define VM_SET_FS_MAX_PAGES(vm_info, max) {				\
	vm_info->fs_maxpages = max;					\
}

#define VM_SET_FS_MIN_PAGES(vm_info, min) {				\
	vm_info->fs_minpages = min;					\
}

/*
 * Called by VOP_PAGEIN routines to determine if multiple IO ranges need 
 * to be setup. Multiple IO may be needed for paging in a large page.
 */

#define VM_GET_IO_INFO(vm_info, maxpagein, max_io){			\
	maxpagein = vm_info->maxpagein;					\
	if (vm_info->vm_pgin_flags & LGPG_TRY) {             		\
		max_io = vm_info->max_num_io;				\
	} else { 							\
		max_io = 1;						\
	}								\
}

/* 
 * Called by VOP_PAGEIN routines to communicate that multiple IO 
 * cannot be set up. 
 */

#define VM_MULT_IO_FAILURE(vm_info) {					\
	vm_info->vm_pgin_flags &= ~LGPG_TRY;				\
	vm_info->vm_pgin_flags |= LGPG_EXPAND_FAILED;			\
	vm_info->num_io = 1;						\
}

/*
 * Disallow read-ahead for large pages.
 * In the future, we may want to allow read-aheads for low-end large
 * pages such as 8K (tahoe) and 16K.
 */

#define VM_READ_AHEAD_ALLOWED(vm_info) 					\
	(((vm_info->vm_pgin_flags & LGPG_TRY) ||			\
	  (vm_info->vm_pgin_flags & LGPG_ALLOCATED) ||			\
	  (vm_info->vm_pgin_flags & LGPG_CACHE_ERROR)) ? 0 : 1) 

/*
 * Called by VOP_PAGEIN routines to refresh the vfd and dbd, when
 * there is a chance they might have changed, for instance, when region
 * lock was released and re-acquired.
 */

#define VM_REINIT_FAULT_DBDVFD(vm_info)					\
	FINDENTRY(vm_info->prp->p_reg, vm_info->fault_index, 		\
		  &(vm_info->vfd), &(vm_info->dbd));

/*
 * Structure to hold page-io information for page-in involving multiple
 * IO. Added for paging-in a large page. Maximum number of IO allowed
 * by default is LGPG_FSTORE_MAX_IO (= 512) as defined below. In the current
 * implementation, a global "short lgpg_fstore_max_io" is being set to
 * LGPG_FSTORE_MAX_IO and this variable serves as a hook through which 
 * it is possible to change the maximum number of I/O's allowed. An array 
 * of this page-io structure is MALLOC'ed and a pointer to this array is 
 * placed in "struct vfspage" (vm_info). 
 */

typedef struct {
	daddr_t start_blk;
	pgcnt_t count;
	pgcnt_t startindex;
	struct buf *bp;
	int error;
} pagein_info_t; 

#define	LGPG_FSTORE_MAX_IO 512

/*
 * Pageout data structure used when "multiple" I/O's are required to write out
 * a single large page.  Note, "io_cnt" is different from vminfo->piocnt in
 * that piocnt tracks the number distinct pageouts over a range and io_cnt is
 * the number of I/O's to complete one distinct pageout.
 */
struct b_lgpg_io {
	int io_cnt;		/* Count of I/O's for a "single" large page.  
				   When == 0, finished. */
	int io_flags;		/* Flags(see below) */
	caddr_t io_addr;	/* Starting address of I/O */
	pgcnt_t io_pages;	/* Length of I/O */
};

/*
 * Flags for io_flags
 */
#define LGPG_IO_SLEEP	0x1

/*
 * Pageout data structure used to hold the block/length information when
 * multiple I/O's are required for a large page.
 */
typedef struct pageout_info {
   pgcnt_t start;	/* start of an i/o in a largepage */
   daddr_t blkno;	/* block number of the i/o */
   int cnt_bytes;	/* Count of number of 4k i/o's in a largepage */
} pageout_info_t;

/*
 * Artifical maximum on the number of I/O's we are willing to do for a large
 * page pageout.
 */
#define PAGEOUT_IO_MAX 1

/*
 * The following macros are used by Pagein/Pageout routines to inform, query or
 * modify information in the VM system.  The purpose of the macros is to remove
 * all references to VM data structures from file system dependent pagein
 * routines.
 */
#define VM_CLEAR_PAGEOUT_RUN(vm_info)	((vm_info)->run = 0)
#define VM_BASE_OFFSET(vm_info)		((vm_info)->prp->p_off)
#define VM_START_PAGEOUT_INDX(vm_info)	((vm_info)->start)
#define VM_END_PAGEOUT_INDX(vm_info)	((vm_info)->end)
#define VM_START_PAGEOUT_BLK(vm_info)	((vm_info)->dbd_start.dbd_data)
#define VM_END_PAGEOUT_BLK(vm_info)	((vm_info)->dbd_end.dbd_data)
#define VM_NO_PAGEOUT_RUN(vm_info)	((vm_info)->run ? 0 : 1 )
#define VM_MEM_RESERVED(vm_info) 	((vm_info)->vm_mem_reserved)
#define VM_SHARED_OBJECT(vm_info)	((vm_info)->shared)
#define VM_MAPPED_SPACE(vm_info)	((vm_info)->space)
#define VM_MAPPED_ADDR(vm_info)		((vm_info)->mapped_vaddr)
#define VM_MEMORY_RESERVED(vm_info)	((vm_info)->memreserved)
#define VM_IS_ZOMBIE(vm_info)		((vm_info)->prp->p_reg->r_zomb)
#define VM_PAGE_VALID(vm_info)		((vm_info)->vfd->pgm.pg_v)
#define VM_FILE_OFFSET(vm_info)      	((vm_info)->prp->p_reg->r_off)
#define VM_SETFS_FLAGS(vm_info, flag)	((vm_info)->fs_flags |= flag)
#define VM_UNSETFS_FLAGS(vm_info, flag)	((vm_info)->fs_flags &= ~flag)
#define VM_FS_FLAGS(vm_info)	 	((vm_info)->fs_flags)
#define VM_ZOMBIE_OBJECT(vm_info)	((vm_info)->prp->p_reg->r_zomb = 1)
#define VM_SET_CACHE_LIMIT(vm_info,limit)	((vm_info)->dbd_limit = limit)
#define VM_SET_STARTINDX(vm_info,start)	((vm_info)->startindex = start)
#define VM_GET_STARTINDX(vm_info)	((vm_info)->startindex)

/*
 * The following macros are used to set and get values of the fields in
 * page-io information structure [see pagein_info_t].
 *	VM_SET_IO_STARTINDX		VM_GET_IO_STARTINDX
 *	VM_SET_IO_COUNT			VM_GET_IO_COUNT
 *	VM_SET_IO_STARTBLK		VM_GET_IO_STARTBLK
 * 	VM_SET_IO_BP			VM_GET_IO_BP
 *	VM_SET_IO_ERROR			VM_GET_IO_ERROR
 */

#define VM_SET_IO_STARTINDX(vm_info, indx, start)			\
		((vm_info)->io[indx].startindex = start)
#define VM_GET_IO_STARTINDX(vm_info, indx)				\
		((vm_info)->io[indx].startindex)

#define VM_SET_IO_COUNT(vm_info, indx, cnt)				\
		((vm_info)->io[indx].count = cnt)
#define VM_GET_IO_COUNT(vm_info, indx)					\
		((vm_info)->io[indx].count)

#define VM_SET_IO_STARTBLK(vm_info, indx, block)			\
		((vm_info)->io[indx].start_blk = block)
#define VM_GET_IO_STARTBLK(vm_info, indx)				\
		((vm_info)->io[indx].start_blk)

#define VM_SET_IO_BP(vm_info, indx, bswp)				\
		((vm_info)->io[indx].bp = bswp)
#define VM_GET_IO_BP(vm_info, indx)					\
		((vm_info)->io[indx].bp)

#define VM_SET_IO_ERROR(vm_info, indx, ioerr)				\
		((vm_info)->io[indx].error = ioerr)
#define VM_GET_IO_ERROR(vm_info, indx)					\
		((vm_info)->io[indx].error)

#define VM_REGION(vm_info)		((vm_info)->prp->p_reg)
#define VM_REGION_SIZE(vm_info)		((vm_info)->prp->p_reg->r_pgsz)
#define VM_IS_MMAP(vm_info)		((vm_info)->prp->p_type == PT_MMAP)
#define VM_PAGEOUT_NOWAIT(vm_info)      ((vm_info)->vm_flags & PAGEOUT_VHAND)
#define VM_SET_ERROR(vm_info, error)    ((vm_info)->error = error)
#define VM_CLEAR_ERROR(vm_info)         ((vm_info)->error = 0)
#define VM_GET_PAGEIN_VNODE(vm_info)    ((vm_info)->vp)
#define VM_GET_PAGEOUT_VNODE(vm_info)   ((vm_info)->vp)
#define VM_CACHE_LIMIT(vm_info)		((vm_info)->dbd_limit)
#define VM_PAGEIN_INFO(vm_info)		((vm_info)->io)
#define VM_PRP(vm_info)			((vm_info)->prp)
#define VM_ADDR(vm_info)		((vm_info)->vaddr)
#define VM_WRT(vm_info)			((vm_info)->wrt)
#define VM_SPACE(vm_info)		((vm_info)->space)
#define VM_GET_NUM_IO(vm_info)		((vm_info)->num_io)
#define VM_SET_NUM_IO(vm_info, count)	((vm_info)->num_io = count)
#define VM_PAGEOUT_INFO(vm_info, num_io, io_start, io_blkno, io_bytes) 	\
	(io_start) = (vm_info)->io_array[num_io].start;		\
	(io_blkno) = (vm_info)->io_array[num_io].blkno;		\
	(io_bytes) = (vm_info)->io_array[num_io].cnt_bytes;

/*
 * Used by NFS to transmit information from VM back to the FS layer.  
 */
typedef struct {
    k_off_t isize;	 /* file size */
    u_int  bsize;	 /* file system block size */
    int	   remote;	 /* the file is remote (DUX, NFS) */
    int	   remote_down;  /* is the remote system down now? */
} fsdata_t;

/* 
 * The global VM pagein/pageout structure.  It houses everything for the sparse
 * walker as well as information needed to communicate with the VM services
 * found in vfs_vm.c
 */
typedef struct vfspage {
    preg_t *prp;	/* The pregion for the pagein/pageout. */
    struct vnode *vp;	/* file vnode pointer for the pagein/pageout. */
    struct vnode *cache_vp;/* file vnode pointer for the pagein/pageout. */
    pgcnt_t maxpgs;	/* maximum length a run(pageout) can be */
    dbd_t  dbd_start;	/* dbd for start of a pageout. */
    dbd_t  dbd_end;	/* dbd for end of a pageout. */
    dbd_t  cur_dbd;	/* The current dbd for the "current"(pageout) index. */
    pgcnt_t start;	/* start of a run(pageout) */
    pgcnt_t end;	/* end of a run(pageout) */
    int    run;		/* a run has been detected(pageout) */
    caddr_t fs_data;	/* A pointer used for any specific fs data needed. */
    space_t space;	/* The faulting space for a pagein. */
    caddr_t vaddr;	/* The starting addr for a pagein. */
    caddr_t mapped_vaddr; /* The faulting addr for a pagein/out. */
    pgcnt_t dbd_limit; 	/* one past the last dbd that we can trust */
    int *piocnt;	/* An integer pointer used with PAGEOUT_WAIT. */
    dbd_t  *dbd;	/* The dbd for a pagein fault. */
    vfd_t *vfd;		/* The vfd for a pagein fault. */
    pgcnt_t fault_index; /* The index where the pagein fault occurred. */
    pgcnt_t startindex;	/* The starting page index for a faulting range. */
    int steal_flag;	/* Set to 1 if the PAGEOUT_STEAL is set. */
    int vm_flags;	/* The vm flags passed to pageout. */
    int fs_flags;	/* The FS flags used for a pagein. */
    int wrt;		/* Set to one if the page fault(pagein) was a write.  */
    pgcnt_t memreserved; /* Amount of memory reserved for pagein/pageout. */
    int shared;		/* Are the region fstore and bstore equal? */
    int error;          /* Error value set by lower routine. */
    physpfn_t *pfn;	/* Page frame array for pagein's only. */
    pagein_info_t *io; 	/* information on each IO for page-in */
    lgpg_stat_flags_t vm_pgin_flags; /* large page status flags */
    short num_io;	/* number of IO's for paging-in/out a large page */
    short max_num_io;   /* max number of I/O for paging-in/out a large page*/
    pgcnt_t maxpagein;	/* maximum number 4K pages to be paged-in */
    pgcnt_t fs_minpages;/* min number of pagein pages specified by filesys */
    pgcnt_t fs_maxpages;/* max number of pagein pages allowed by filesys */
    pgcnt_t lgpg_minpage;/* lower region index of a large page */
    pgcnt_t lgpg_maxpage;/* upper region index of a large page */
    struct b_lgpg_io *lgpg_io;  /* If not NULL, points to pageout multi-I/O 
				   data structure. */
    pageout_info_t io_array[PAGEOUT_IO_MAX]; /* pageout array.  Size is 1 
						until MMF's supported. */
    pgcnt_t pgout_start;/* Where the initial pageout started. */
    pgcnt_t pgout_end;  /* Where the initial pageout ended. */
    int pgbits;         /* ref/mod bits for the current pageout. */
} vfspage_t;
#define _VFSPAGE_T

#endif /* _VFS_INCLUDED */

------=_NextPart_000_0151_01C2DF3A.1D6523E0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.4630.0">
<TITLE>vfs_vm.h for 11.11</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* BEGIN_DESC</FONT>

<BR><FONT SIZE=3D2>&nbsp;* </FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp; File: </FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
@(#)&nbsp;&nbsp;&nbsp; common/sys/vfs_vm.h&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $Revision: $</FONT>

<BR><FONT SIZE=3D2>&nbsp;* </FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp; Purpose:</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&lt;please =
update with a synopis of the functionality provided by this =
file&gt;&gt;</FONT>

<BR><FONT SIZE=3D2>&nbsp;* </FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp; Classification:&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Release to Release =
Consistency Req:</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&lt;please select one of =
the following:&gt;&gt;</FONT>

<BR><FONT SIZE=3D2>&nbsp;* &nbsp;&nbsp;&nbsp;&nbsp; kernel subsystem =
private&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; none</FONT>

<BR><FONT SIZE=3D2>&nbsp;* &nbsp;&nbsp;&nbsp;&nbsp; kernel private&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; none</FONT>

<BR><FONT SIZE=3D2>&nbsp;* &nbsp;&nbsp;&nbsp;&nbsp; kernel 3rd party =
private&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; limited source</FONT>

<BR><FONT SIZE=3D2>&nbsp;* &nbsp;&nbsp;&nbsp;&nbsp; public&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; binary &amp; source</FONT>

<BR><FONT SIZE=3D2>&nbsp;* </FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp; BE header:&nbsp; no</FONT>

<BR><FONT SIZE=3D2>&nbsp;*</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp; Shipped:&nbsp; no</FONT>

<BR><FONT SIZE=3D2>&nbsp;*</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp; NOTE:</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This header =
file contains information specific to the internals</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of the HP-UX =
implementation.&nbsp; The contents of this header file</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; are subject to =
change without notice.&nbsp; Such changes may affect</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; source code, =
object code, or binary compatibility between</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; releases of =
HP-UX.&nbsp; Code which uses the symbols contained within</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this header =
file is inherently non-portable (even between HP-UX</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
implementations).</FONT>

<BR><FONT SIZE=3D2>&nbsp;* </FONT>

<BR><FONT SIZE=3D2>&nbsp;* END_DESC&nbsp; </FONT>

<BR><FONT SIZE=3D2>*/</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>#ifndef _VFS_INCLUDED /* allows multiple inclusion =
*/</FONT>

<BR><FONT SIZE=3D2>#define _VFS_INCLUDED</FONT>
</P>

<P><FONT SIZE=3D2>#include &lt;sys/pregion.h&gt;</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* max number of pages that vfs_pagein may bring =
in at a time</FONT>

<BR><FONT SIZE=3D2>&nbsp;* max number of pages that vfs_pageout may =
write out at a time</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>#define VFS_MAXPGIN&nbsp;&nbsp;&nbsp;&nbsp; 64</FONT>

<BR><FONT SIZE=3D2>#define VFS_MAXPGOUT&nbsp;&nbsp;&nbsp; 16</FONT>
</P>

<P><FONT SIZE=3D2>#define MAX_PGCNT_T&nbsp;&nbsp;&nbsp;&nbsp; =
MAXINT&nbsp; /* ?? this should live near pgcnt_t typedef */</FONT>

<BR><FONT SIZE=3D2>#define BIG_OK_DBD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
MAX_PGCNT_T</FONT>
</P>

<P><FONT SIZE=3D2>extern double idleness[];</FONT>

<BR><FONT SIZE=3D2>extern double real_run[];</FONT>

<BR><FONT SIZE=3D2>extern int deactive_cnt;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t max_pgrate;</FONT>

<BR><FONT SIZE=3D2>extern int memory_sleepers;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t pageoutrate;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t kpageoutrate;</FONT>

<BR><FONT SIZE=3D2>extern int prepage;</FONT>

<BR><FONT SIZE=3D2>extern int vhandrunrate;</FONT>

<BR><FONT SIZE=3D2>extern int waitio_proc_cnt;</FONT>

<BR><FONT SIZE=3D2>extern int maxslp;</FONT>

<BR><FONT SIZE=3D2>extern lock_t *swap_buf_list_lock;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t avefree;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t desfree;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t freemem;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t gpgslim;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t lotsfree;</FONT>

<BR><FONT SIZE=3D2>extern int maxpageout;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t maxpendpageouts;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t mem_deficit;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t minsleepmem;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t minfree;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t pageoutcnt;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t kpageoutcnt;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t parolemem;</FONT>

<BR><FONT SIZE=3D2>extern pgcnt_t stealvisited;</FONT>

<BR><FONT SIZE=3D2>extern preg_t *stealhand;</FONT>

<BR><FONT SIZE=3D2>extern b_sema_t vhandsema;</FONT>

<BR><FONT SIZE=3D2>extern dev_t =
swapdev;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* swapping device =
*/</FONT>
</P>

<P><FONT SIZE=3D2>extern int unhash;</FONT>
</P>

<P><FONT SIZE=3D2>extern struct buf *bswalloc();</FONT>

<BR><FONT SIZE=3D2>extern void pregtrunc();</FONT>

<BR><FONT SIZE=3D2>extern void mtrunc();</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Gross stuff for NFS...</FONT>

<BR><FONT SIZE=3D2>&nbsp;*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* NFS requires memory resources to perform a =
pageout.&nbsp; However, if</FONT>

<BR><FONT SIZE=3D2>&nbsp;* vhand is trying to steal pages, we probably =
do not have memory</FONT>

<BR><FONT SIZE=3D2>&nbsp;* available to page out NFS pages.&nbsp; To =
avoid a deadlock, we do the</FONT>

<BR><FONT SIZE=3D2>&nbsp;* following for NFS (but only when called by =
vhand):</FONT>

<BR><FONT SIZE=3D2>&nbsp;*</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp; . When paging out an NFS region, =
we conditionally reserve enough</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp; pages =
(NFS_PAGEOUT_MEM) to guarantee that the NFS will never</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp; have to sleep waiting =
for memory.&nbsp; This is essentially one page</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp; for every distinct =
size of memory that NFS needs (i.e. 1 page for</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp; 128 byte buffers, 1 =
page for 512 byte buffers, etc).&nbsp; If we</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp; cannot get the =
memory, we skip the dirty page and go on.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp; . In pagein, we do not allow an =
NFS pagein to proceed until there</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp; is at least minumum =
number of free pages (2 * NFS_PAGEOUT_MEM).</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp; This guarantees that =
there will always be enough non-NFS pages</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp; to page out so that =
we can reserve enough pages to page out</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp; dirty NFS =
pages.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>#define NFS_PAGEOUT_MEM =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
7&nbsp;&nbsp; /* empirically determined */</FONT>

<BR><FONT SIZE=3D2>#define NFS_PAGEIN_MEM&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 14</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* VM Pagein/Pageout Flags</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>&nbsp;</FONT>

<BR><FONT SIZE=3D2>/* Parameters for calling VOP_PAGEOUT.&nbsp; =
*/</FONT>

<BR><FONT SIZE=3D2>#define PAGEOUT_HARD&nbsp;&nbsp;&nbsp; 0x01 /* Take =
all the pages you can, wait for locks */</FONT>

<BR><FONT SIZE=3D2>#define PAGEOUT_FREE&nbsp;&nbsp;&nbsp; 0x02 /* Free =
the pages once the I/O is complete */</FONT>

<BR><FONT SIZE=3D2>#define PAGEOUT_WAIT&nbsp;&nbsp;&nbsp; 0x04 /* Wait =
for the I/O to complete */</FONT>

<BR><FONT SIZE=3D2>#define PAGEOUT_VHAND&nbsp;&nbsp; 0x08 /* Pageout =
request by vhand */</FONT>

<BR><FONT SIZE=3D2>#define PAGEOUT_PURGE&nbsp;&nbsp; 0x20 /* purge pages =
from the page cache */</FONT>

<BR><FONT SIZE=3D2>#define PAGEOUT_RESERVED&nbsp;&nbsp; 0x80</FONT>
</P>

<P><FONT SIZE=3D2>/* Parameters for VOP_VM_COMMIT - Will be used for =
future V3 Patch */</FONT>

<BR><FONT SIZE=3D2>#define COMMIT_NOWAIT&nbsp;&nbsp; 0x1</FONT>

<BR><FONT SIZE=3D2>#define COMMIT_WAIT&nbsp;&nbsp;&nbsp;&nbsp; =
0x2</FONT>

<BR><FONT SIZE=3D2>#define COMMIT_NOW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
0x4</FONT>

<BR><FONT SIZE=3D2>#define COMMIT_INIT&nbsp;&nbsp;&nbsp;&nbsp; =
0x8</FONT>

<BR><FONT SIZE=3D2>#define COMMIT_DONE&nbsp;&nbsp;&nbsp;&nbsp; =
0x10</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>#define COMMIT_FLAGS (COMMIT_NOWAIT | COMMIT_WAIT | =
COMMIT_NOW | \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>COMMIT_INIT | =
COMMIT_DONE)</FONT>
</P>

<P><FONT SIZE=3D2>#define VALID_COMMIT_FLAG(flag) (flag &amp; =
COMMIT_FLAGS)</FONT>
</P>

<P><FONT SIZE=3D2>#define COMMIT_CLUSTER_SIZE&nbsp;&nbsp;&nbsp;&nbsp; =
8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* pages */</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Pagein/Pageout Specific Flags.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>#define VM_NOWAIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
0x100&nbsp;&nbsp; /* Can't sleep for resources. */</FONT>

<BR><FONT SIZE=3D2>#define =
VM_INVALIDATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 0x200</FONT>

<BR><FONT SIZE=3D2>#define =
VM_ERROR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp; 0x400</FONT>

<BR><FONT SIZE=3D2>#define =
VM_FREE_PAGE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; 0x800</FONT>

<BR><FONT SIZE=3D2>#define =
VM_MLOCK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp; 0x1000</FONT>

<BR><FONT SIZE=3D2>#define =
VM_LARGEPAGE_IO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
0x2000</FONT>

<BR><FONT SIZE=3D2>#define =
VM_LARGEPAGE_RUN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x4000</FONT>

<BR><FONT SIZE=3D2>#define =
VM_IO_RUN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp; 0x8000</FONT>

<BR><FONT SIZE=3D2>#define PAGEOUT_NO_PHYSICAL&nbsp;&nbsp;&nbsp;&nbsp; =
0x10000</FONT>

<BR><FONT SIZE=3D2>#define =
VM_VFS_LGPG_FLAGS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (VM_INVALIDATE | =
VM_ERROR | VM_FREE_PAGE | \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> VM_MLOCK =
| VM_LARGEPAGE_IO | VM_LARGEPAGE_RUN)</FONT>

<BR><FONT SIZE=3D2>#define VM_DEVSWAP_LGPG_FLAGS&nbsp;&nbsp; =
(VM_LARGEPAGE_RUN | VM_MLOCK | VM_ERROR | \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT SIZE=3D2> =
PAGEOUT_NO_PHYSICAL)</FONT>
</P>

<P><FONT SIZE=3D2>typedef enum vm_freepage_ret {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>PAGE_DIRTY,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>PAGE_CLEAN</FONT>

<BR><FONT SIZE=3D2>} vm_freepage_ret_t;</FONT>
</P>

<P><FONT SIZE=3D2>typedef enum vm_fscheck_rets {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>VM_SUCCESS,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>VM_TERMINATE_RUN,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>VM_NOT_INCLUDED,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>VM_FS_ERROR</FONT>

<BR><FONT SIZE=3D2>} vm_fscheck_rets_t;</FONT>
</P>

<P><FONT SIZE=3D2>typedef enum vm_devswap_examine_ret {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>FREE_PAGE,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>DONT_TOUCH,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>WRITE_PAGE</FONT>

<BR><FONT SIZE=3D2>} vm_devswap_examine_ret_t;</FONT>
</P>

<P><FONT SIZE=3D2>/* </FONT>

<BR><FONT SIZE=3D2>&nbsp;* DETECT_HOLES is set by those file systems who =
can determine sparse access.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>#define DETECT_HOLES&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x1</FONT>

<BR><FONT SIZE=3D2>#define =
DONT_BPURGE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp; 0x2</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Set by NFS to inform upper layer a truncation =
on the object is necessary.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>#define PAGEOUT_TRUNCATE&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp; 0x2</FONT>
</P>

<P><FONT SIZE=3D2>/* </FONT>

<BR><FONT SIZE=3D2>&nbsp;* Defines used for read-ahead. ADJUST_SIZE =
causes the pagein size to adjust,</FONT>

<BR><FONT SIZE=3D2>&nbsp;* while ADJUST_STRENGTH adjusts the pregion =
strength indicator.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>#define ADJUST_SIZE&nbsp;&nbsp;&nbsp;&nbsp; =
0x1</FONT>

<BR><FONT SIZE=3D2>#define ADJUST_STRENGTH 0x2</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* The following defines are used for read-ahead =
I/O's.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* MULTI_CONVERT_THRESHOLD is the =
&quot;p_strength&quot; value when single to multi-page</FONT>

<BR><FONT SIZE=3D2>&nbsp;* conversion takes place.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* PURELY_RANDOM and PURELY_SEQUENTIAL are =
&quot;p_strength&quot; indicators used by</FONT>

<BR><FONT SIZE=3D2>&nbsp;* madvise() when the user specifies MADV_RANDOM =
or MADV_SEQUENTIAL.&nbsp; They</FONT>

<BR><FONT SIZE=3D2>&nbsp;* also bound p_strength to that range.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>#define MULTI_CONVERT_THRESHOLD =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15</FONT>

<BR><FONT SIZE=3D2>#define PURELY_RANDOM&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -100</FONT>

<BR><FONT SIZE=3D2>#define =
PURELY_SEQUENTIAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100</FONT>

<BR><FONT SIZE=3D2>#define DEFAULT_PAGEIN_SIZE&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Passed to read ahead process pages =
(ra_process_pages)</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>#define DO_READ_AHEAD&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x1</FONT>

<BR><FONT SIZE=3D2>#define =
DONT_DO_READ_AHEAD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x2</FONT>

<BR><FONT SIZE=3D2>#define =
HOLD_PAGE_LOCK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x4</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Passed to VM truncation.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>#define VP_TRUNCATE&nbsp;&nbsp;&nbsp;&nbsp; =
0x1</FONT>

<BR><FONT SIZE=3D2>#define VP_INVALIDATE&nbsp;&nbsp; 0x2</FONT>
</P>

<P><FONT SIZE=3D2>#define =
DBD_TYPE(vm_info)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; &nbsp;&nbsp;&nbsp; ((vm_info)-&gt;dbd-&gt;dbd_type)</FONT>

<BR><FONT SIZE=3D2>#define =
DBD_DATA(vm_info)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; &nbsp;&nbsp;&nbsp; ((vm_info)-&gt;dbd-&gt;dbd_data)</FONT>
</P>

<P><FONT SIZE=3D2>#define RESET_BUFCACHE_STEALSCAN(bufcache_preg) =
(bufcache_preg-&gt;p_stealscan =3D 1)</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Returns &quot;1&quot; if the pageout routine =
should stop.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>#define VM_STOP_PAGING(vm_info) =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>((((vm_info)-&gt;vm_flags &amp; PAGEOUT_VHAND) &amp;&amp; =
&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>!((vm_info)-&gt;vm_flags &amp; PAGEOUT_HARD) &amp;&amp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>parolemem =
&gt;=3D maxpendpageouts) ? 1 : 0)&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* #define's for large pages.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>
</P>

<P><FONT SIZE=3D2>/* </FONT>

<BR><FONT SIZE=3D2>&nbsp;* LGPG_ENABLE flag is passed to =
vm_pagein_init() by VOP_PAGEIN routines</FONT>

<BR><FONT SIZE=3D2>&nbsp;* such as ufs_pagein() to indicate that they =
have been adapted for paging</FONT>

<BR><FONT SIZE=3D2>&nbsp;* in a large page.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>
</P>

<P><FONT SIZE=3D2>#define LGPG_ENABLE&nbsp;&nbsp;&nbsp;&nbsp; =
0x01&nbsp;&nbsp;&nbsp; </FONT>
</P>

<P><FONT SIZE=3D2>#define LGPG_RETRY_MAX&nbsp; 8</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Status of an instance of a large page during =
VOP_PAGEIN. These flags </FONT>

<BR><FONT SIZE=3D2>&nbsp;* are set by various &quot;vm_&quot; routines =
in vfs_vm.c file. Also used by </FONT>

<BR><FONT SIZE=3D2>&nbsp;* devswap_pagein(), a VOP_PAGEIN =
routine.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>
</P>

<P><FONT SIZE=3D2>typedef enum lgpg_stat_flags {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>LGPG_CLR_FLAGS&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
=3D 0x00,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>LGPG_TRY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D 0x10,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>LGPG_EXPAND_FAILED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D =
0x20,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>LGPG_ALLOCATED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; =3D 0x40,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>LGPG_ALLOC_FAILED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D =
0x80,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>LGPG_CACHE_ERROR&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; =3D =
0x100</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>} =
lgpg_stat_flags_t;</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Reasons for terminating fault expansion. =
Returned by</FONT>

<BR><FONT SIZE=3D2>&nbsp;* expand_faultin_up() and =
expand_faultin_down().</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>
</P>

<P><FONT SIZE=3D2>typedef enum expnd_flags {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>CLR_FLAGS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D 0x00,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>PAGELIMIT =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D 0x01,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>NONCONTIGUOUS_BLOCK&nbsp;&nbsp;&nbsp;&nbsp; =3D 0x02,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>VM_REASONS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D 0x04 </FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>} =
expnd_flags_t;</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>typedef enum vmpgin_return_values {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>VM_NONE =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D 0,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>VM_DONE =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D 1,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>VM_PAGE_PRESENT &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D =
2,</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>VM_RETRY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D 3</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>} =
retval_t;</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Flags passed to vm_expand_ok().</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>
</P>

<P><FONT SIZE=3D2>#define =
MIN_PAGE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x100</FONT>

<BR><FONT SIZE=3D2>#define =
MAX_PAGE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x200</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* The following macros VM_SET_FS_MAX_PAGES and =
VM_SET_FS_MIN_PAGES are</FONT>

<BR><FONT SIZE=3D2>&nbsp;* called by VOP_PAGEIN routines to specify the =
maximum-pages (for each </FONT>

<BR><FONT SIZE=3D2>&nbsp;* IO) allowed and the minimum_pages desired =
(for each IO) respectively.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>
</P>

<P><FONT SIZE=3D2>#define VM_SET_FS_MAX_PAGES(vm_info, max) =
{&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>vm_info-&gt;fs_maxpages =3D max;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR><FONT SIZE=3D2>}</FONT>
</P>

<P><FONT SIZE=3D2>#define VM_SET_FS_MIN_PAGES(vm_info, min) =
{&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>vm_info-&gt;fs_minpages =3D min;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR><FONT SIZE=3D2>}</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Called by VOP_PAGEIN routines to determine if =
multiple IO ranges need </FONT>

<BR><FONT SIZE=3D2>&nbsp;* to be setup. Multiple IO may be needed for =
paging in a large page.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>
</P>

<P><FONT SIZE=3D2>#define VM_GET_IO_INFO(vm_info, maxpagein, =
max_io){&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>maxpagein =
=3D vm_info-&gt;maxpagein; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>if =
(vm_info-&gt;vm_pgin_flags &amp; LGPG_TRY) =
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>max_io =3D =
vm_info-&gt;max_num_io;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>} else { =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>max_io =3D =
1;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR><FONT SIZE=3D2>}</FONT>
</P>

<P><FONT SIZE=3D2>/* </FONT>

<BR><FONT SIZE=3D2>&nbsp;* Called by VOP_PAGEIN routines to communicate =
that multiple IO </FONT>

<BR><FONT SIZE=3D2>&nbsp;* cannot be set up. </FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>
</P>

<P><FONT SIZE=3D2>#define VM_MULT_IO_FAILURE(vm_info) {&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>vm_info-&gt;vm_pgin_flags &amp;=3D ~LGPG_TRY;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>vm_info-&gt;vm_pgin_flags |=3D LGPG_EXPAND_FAILED;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>vm_info-&gt;num_io =3D 1;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR><FONT SIZE=3D2>}</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Disallow read-ahead for large pages.</FONT>

<BR><FONT SIZE=3D2>&nbsp;* In the future, we may want to allow =
read-aheads for low-end large</FONT>

<BR><FONT SIZE=3D2>&nbsp;* pages such as 8K (tahoe) and 16K.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>
</P>

<P><FONT SIZE=3D2>#define VM_READ_AHEAD_ALLOWED(vm_info)&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>(((vm_info-&gt;vm_pgin_flags &amp; LGPG_TRY) =
||&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>&nbsp; =
(vm_info-&gt;vm_pgin_flags &amp; LGPG_ALLOCATED) ||&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>&nbsp; =
(vm_info-&gt;vm_pgin_flags &amp; LGPG_CACHE_ERROR)) ? 0 : 1) </FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Called by VOP_PAGEIN routines to refresh the =
vfd and dbd, when</FONT>

<BR><FONT SIZE=3D2>&nbsp;* there is a chance they might have changed, =
for instance, when region</FONT>

<BR><FONT SIZE=3D2>&nbsp;* lock was released and re-acquired.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>
</P>

<P><FONT SIZE=3D2>#define VM_REINIT_FAULT_DBDVFD(vm_info) =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>FINDENTRY(vm_info-&gt;prp-&gt;p_reg, vm_info-&gt;fault_index, =
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>&nbsp; =
&amp;(vm_info-&gt;vfd), &amp;(vm_info-&gt;dbd));</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Structure to hold page-io information for =
page-in involving multiple</FONT>

<BR><FONT SIZE=3D2>&nbsp;* IO. Added for paging-in a large page. Maximum =
number of IO allowed</FONT>

<BR><FONT SIZE=3D2>&nbsp;* by default is LGPG_FSTORE_MAX_IO (=3D 512) as =
defined below. In the current</FONT>

<BR><FONT SIZE=3D2>&nbsp;* implementation, a global &quot;short =
lgpg_fstore_max_io&quot; is being set to</FONT>

<BR><FONT SIZE=3D2>&nbsp;* LGPG_FSTORE_MAX_IO and this variable serves =
as a hook through which </FONT>

<BR><FONT SIZE=3D2>&nbsp;* it is possible to change the maximum number =
of I/O's allowed. An array </FONT>

<BR><FONT SIZE=3D2>&nbsp;* of this page-io structure is MALLOC'ed and a =
pointer to this array is </FONT>

<BR><FONT SIZE=3D2>&nbsp;* placed in &quot;struct vfspage&quot; =
(vm_info). </FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>
</P>

<P><FONT SIZE=3D2>typedef struct {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>daddr_t =
start_blk;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>pgcnt_t =
count;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>pgcnt_t =
startindex;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>struct buf =
*bp;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>int =
error;</FONT>

<BR><FONT SIZE=3D2>} pagein_info_t; </FONT>
</P>

<P><FONT SIZE=3D2>#define LGPG_FSTORE_MAX_IO 512</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Pageout data structure used when =
&quot;multiple&quot; I/O's are required to write out</FONT>

<BR><FONT SIZE=3D2>&nbsp;* a single large page.&nbsp; Note, =
&quot;io_cnt&quot; is different from vminfo-&gt;piocnt in</FONT>

<BR><FONT SIZE=3D2>&nbsp;* that piocnt tracks the number distinct =
pageouts over a range and io_cnt is</FONT>

<BR><FONT SIZE=3D2>&nbsp;* the number of I/O's to complete one distinct =
pageout.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>struct b_lgpg_io {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>int =
io_cnt;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Count of I/O's for a =
&quot;single&quot; large page.&nbsp; </FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>&nbsp;&nbsp; =
When =3D=3D 0, finished. */</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>int =
io_flags;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* =
Flags(see below) */</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>caddr_t =
io_addr;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Starting address =
of I/O */</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>pgcnt_t =
io_pages;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Length of I/O */</FONT>

<BR><FONT SIZE=3D2>};</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Flags for io_flags</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>#define LGPG_IO_SLEEP&nbsp;&nbsp; 0x1</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Pageout data structure used to hold the =
block/length information when</FONT>

<BR><FONT SIZE=3D2>&nbsp;* multiple I/O's are required for a large =
page.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>typedef struct pageout_info {</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp; pgcnt_t =
start;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* start of an i/o in a =
largepage */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp; daddr_t =
blkno;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* block number of the i/o =
*/</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp; int =
cnt_bytes;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Count of number of 4k =
i/o's in a largepage */</FONT>

<BR><FONT SIZE=3D2>} pageout_info_t;</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Artifical maximum on the number of I/O's we =
are willing to do for a large</FONT>

<BR><FONT SIZE=3D2>&nbsp;* page pageout.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>#define PAGEOUT_IO_MAX 1</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* The following macros are used by =
Pagein/Pageout routines to inform, query or</FONT>

<BR><FONT SIZE=3D2>&nbsp;* modify information in the VM system.&nbsp; =
The purpose of the macros is to remove</FONT>

<BR><FONT SIZE=3D2>&nbsp;* all references to VM data structures from =
file system dependent pagein</FONT>

<BR><FONT SIZE=3D2>&nbsp;* routines.</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>#define VM_CLEAR_PAGEOUT_RUN(vm_info)&nbsp;&nbsp; =
((vm_info)-&gt;run =3D 0)</FONT>

<BR><FONT SIZE=3D2>#define VM_BASE_OFFSET(vm_info) =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;prp-&gt;p_off)</FONT>

<BR><FONT SIZE=3D2>#define VM_START_PAGEOUT_INDX(vm_info)&nbsp; =
((vm_info)-&gt;start)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_END_PAGEOUT_INDX(vm_info)&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;end)</FONT>

<BR><FONT SIZE=3D2>#define VM_START_PAGEOUT_BLK(vm_info)&nbsp;&nbsp; =
((vm_info)-&gt;dbd_start.dbd_data)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_END_PAGEOUT_BLK(vm_info)&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;dbd_end.dbd_data)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_NO_PAGEOUT_RUN(vm_info)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;run ? 0 : 1 )</FONT>

<BR><FONT SIZE=3D2>#define VM_MEM_RESERVED(vm_info) =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;vm_mem_reserved)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_SHARED_OBJECT(vm_info)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;shared)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_MAPPED_SPACE(vm_info)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;space)</FONT>

<BR><FONT SIZE=3D2>#define VM_MAPPED_ADDR(vm_info) =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;mapped_vaddr)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_MEMORY_RESERVED(vm_info)&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;memreserved)</FONT>

<BR><FONT SIZE=3D2>#define VM_IS_ZOMBIE(vm_info)&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;prp-&gt;p_reg-&gt;r_zomb)</FONT>

<BR><FONT SIZE=3D2>#define VM_PAGE_VALID(vm_info)&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;vfd-&gt;pgm.pg_v)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_FILE_OFFSET(vm_info)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; =
((vm_info)-&gt;prp-&gt;p_reg-&gt;r_off)</FONT>

<BR><FONT SIZE=3D2>#define VM_SETFS_FLAGS(vm_info, flag)&nbsp;&nbsp; =
((vm_info)-&gt;fs_flags |=3D flag)</FONT>

<BR><FONT SIZE=3D2>#define VM_UNSETFS_FLAGS(vm_info, flag) =
((vm_info)-&gt;fs_flags &amp;=3D ~flag)</FONT>

<BR><FONT SIZE=3D2>#define VM_FS_FLAGS(vm_info)&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((vm_info)-&gt;fs_flags)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_ZOMBIE_OBJECT(vm_info)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;prp-&gt;p_reg-&gt;r_zomb =3D 1)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_SET_CACHE_LIMIT(vm_info,limit)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;dbd_limit =3D limit)</FONT>

<BR><FONT SIZE=3D2>#define VM_SET_STARTINDX(vm_info,start) =
((vm_info)-&gt;startindex =3D start)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_GET_STARTINDX(vm_info)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;startindex)</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* The following macros are used to set and get =
values of the fields in</FONT>

<BR><FONT SIZE=3D2>&nbsp;* page-io information structure [see =
pagein_info_t].</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
VM_SET_IO_STARTINDX&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VM_GET_IO_STARTINDX</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VM_SET_IO_COUNT =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VM_GET_IO_COUNT</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
VM_SET_IO_STARTBLK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VM_GET_IO_STARTBLK</FONT>

<BR><FONT SIZE=3D2>&nbsp;* &nbsp;&nbsp;&nbsp;&nbsp; =
VM_SET_IO_BP&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VM_GET_IO_BP</FONT>

<BR><FONT SIZE=3D2>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VM_SET_IO_ERROR =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VM_GET_IO_ERROR</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>
</P>

<P><FONT SIZE=3D2>#define VM_SET_IO_STARTINDX(vm_info, indx, =
start)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>((vm_info)-&gt;io[indx].startindex =3D start)</FONT>

<BR><FONT SIZE=3D2>#define VM_GET_IO_STARTINDX(vm_info, =
indx)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>((vm_info)-&gt;io[indx].startindex)</FONT>
</P>

<P><FONT SIZE=3D2>#define VM_SET_IO_COUNT(vm_info, indx, =
cnt)&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>((vm_info)-&gt;io[indx].count =3D cnt)</FONT>

<BR><FONT SIZE=3D2>#define VM_GET_IO_COUNT(vm_info, indx)&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>((vm_info)-&gt;io[indx].count)</FONT>
</P>

<P><FONT SIZE=3D2>#define VM_SET_IO_STARTBLK(vm_info, indx, =
block)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>((vm_info)-&gt;io[indx].start_blk =3D block)</FONT>

<BR><FONT SIZE=3D2>#define VM_GET_IO_STARTBLK(vm_info, =
indx)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>((vm_info)-&gt;io[indx].start_blk)</FONT>
</P>

<P><FONT SIZE=3D2>#define VM_SET_IO_BP(vm_info, indx, =
bswp)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>((vm_info)-&gt;io[indx].bp =3D bswp)</FONT>

<BR><FONT SIZE=3D2>#define VM_GET_IO_BP(vm_info, =
indx)&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>((vm_info)-&gt;io[indx].bp)</FONT>
</P>

<P><FONT SIZE=3D2>#define VM_SET_IO_ERROR(vm_info, indx, =
ioerr)&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>((vm_info)-&gt;io[indx].error =3D ioerr)</FONT>

<BR><FONT SIZE=3D2>#define VM_GET_IO_ERROR(vm_info, indx)&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>((vm_info)-&gt;io[indx].error)</FONT>
</P>

<P><FONT SIZE=3D2>#define =
VM_REGION(vm_info)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;prp-&gt;p_reg)</FONT>

<BR><FONT SIZE=3D2>#define VM_REGION_SIZE(vm_info) =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;prp-&gt;p_reg-&gt;r_pgsz)</FONT>

<BR><FONT SIZE=3D2>#define VM_IS_MMAP(vm_info)&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((vm_info)-&gt;prp-&gt;p_type =
=3D=3D PT_MMAP)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_PAGEOUT_NOWAIT(vm_info)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;vm_flags &amp; PAGEOUT_VHAND)</FONT>

<BR><FONT SIZE=3D2>#define VM_SET_ERROR(vm_info, =
error)&nbsp;&nbsp;&nbsp; ((vm_info)-&gt;error =3D error)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_CLEAR_ERROR(vm_info)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;error =3D 0)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_GET_PAGEIN_VNODE(vm_info)&nbsp;&nbsp;&nbsp; ((vm_info)-&gt;vp)</FONT>

<BR><FONT SIZE=3D2>#define VM_GET_PAGEOUT_VNODE(vm_info)&nbsp;&nbsp; =
((vm_info)-&gt;vp)</FONT>

<BR><FONT SIZE=3D2>#define VM_CACHE_LIMIT(vm_info) =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
((vm_info)-&gt;dbd_limit)</FONT>

<BR><FONT SIZE=3D2>#define VM_PAGEIN_INFO(vm_info) =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((vm_info)-&gt;io)</FONT>

<BR><FONT SIZE=3D2>#define VM_PRP(vm_info) =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((vm_info)-&gt;prp)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_ADDR(vm_info)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((vm_info)-&gt;vaddr)</FONT>

<BR><FONT SIZE=3D2>#define VM_WRT(vm_info) =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((vm_info)-&gt;wrt)</FONT>

<BR><FONT SIZE=3D2>#define =
VM_SPACE(vm_info)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((vm_info)-&gt;space)</FONT>

<BR><FONT SIZE=3D2>#define VM_GET_NUM_IO(vm_info)&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((vm_info)-&gt;num_io)</FONT>

<BR><FONT SIZE=3D2>#define VM_SET_NUM_IO(vm_info, count)&nbsp;&nbsp; =
((vm_info)-&gt;num_io =3D count)</FONT>

<BR><FONT SIZE=3D2>#define VM_PAGEOUT_INFO(vm_info, num_io, io_start, =
io_blkno, io_bytes)&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>(io_start) =
=3D (vm_info)-&gt;io_array[num_io].start; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>(io_blkno) =
=3D (vm_info)-&gt;io_array[num_io].blkno; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>(io_bytes) =
=3D (vm_info)-&gt;io_array[num_io].cnt_bytes;</FONT>
</P>

<P><FONT SIZE=3D2>/*</FONT>

<BR><FONT SIZE=3D2>&nbsp;* Used by NFS to transmit information from VM =
back to the FS layer.&nbsp; </FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>typedef struct {</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; k_off_t =
isize;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* file size */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; u_int&nbsp; =
bsize;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* file system block =
size */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; int &nbsp;&nbsp; =
remote;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* the file is remote (DUX, =
NFS) */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; int &nbsp;&nbsp; =
remote_down;&nbsp; /* is the remote system down now? */</FONT>

<BR><FONT SIZE=3D2>} fsdata_t;</FONT>
</P>

<P><FONT SIZE=3D2>/* </FONT>

<BR><FONT SIZE=3D2>&nbsp;* The global VM pagein/pageout structure.&nbsp; =
It houses everything for the sparse</FONT>

<BR><FONT SIZE=3D2>&nbsp;* walker as well as information needed to =
communicate with the VM services</FONT>

<BR><FONT SIZE=3D2>&nbsp;* found in vfs_vm.c</FONT>

<BR><FONT SIZE=3D2>&nbsp;*/</FONT>

<BR><FONT SIZE=3D2>typedef struct vfspage {</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; preg_t =
*prp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* The pregion for the =
pagein/pageout. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; struct vnode *vp;&nbsp;&nbsp; /* =
file vnode pointer for the pagein/pageout. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; struct vnode *cache_vp;/* file =
vnode pointer for the pagein/pageout. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t =
maxpgs;&nbsp;&nbsp;&nbsp;&nbsp; /* maximum length a run(pageout) can be =
*/</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; dbd_t&nbsp; dbd_start;&nbsp;&nbsp; =
/* dbd for start of a pageout. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; dbd_t&nbsp; =
dbd_end;&nbsp;&nbsp;&nbsp;&nbsp; /* dbd for end of a pageout. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; dbd_t&nbsp; =
cur_dbd;&nbsp;&nbsp;&nbsp;&nbsp; /* The current dbd for the =
&quot;current&quot;(pageout) index. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t =
start;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* start of a run(pageout) =
*/</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t =
end;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* end of a run(pageout) =
*/</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; int&nbsp;&nbsp;&nbsp; run; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* a run has been =
detected(pageout) */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; caddr_t fs_data;&nbsp;&nbsp;&nbsp; =
/* A pointer used for any specific fs data needed. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; space_t =
space;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* The faulting space for a pagein. =
*/</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; caddr_t =
vaddr;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* The starting addr for a pagein. =
*/</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; caddr_t mapped_vaddr; /* The =
faulting addr for a pagein/out. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t dbd_limit;&nbsp; /* one =
past the last dbd that we can trust */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; int =
*piocnt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* An integer pointer =
used with PAGEOUT_WAIT. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; dbd_t&nbsp; =
*dbd;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* The dbd for a pagein =
fault. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; vfd_t *vfd; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* The vfd for a pagein =
fault. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t fault_index; /* The index =
where the pagein fault occurred. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t startindex; /* The =
starting page index for a faulting range. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; int =
steal_flag;&nbsp;&nbsp;&nbsp;&nbsp; /* Set to 1 if the PAGEOUT_STEAL is =
set. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; int =
vm_flags;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* The vm flags passed to =
pageout. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; int =
fs_flags;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* The FS flags used for a =
pagein. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; int wrt;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Set to one if the page =
fault(pagein) was a write.&nbsp; */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t memreserved; /* Amount of =
memory reserved for pagein/pageout. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; int shared; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Are the region fstore and =
bstore equal? */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; int =
error;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Error =
value set by lower routine. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; physpfn_t =
*pfn;&nbsp;&nbsp;&nbsp;&nbsp; /* Page frame array for pagein's only. =
*/</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pagein_info_t *io;&nbsp; /* =
information on each IO for page-in */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; lgpg_stat_flags_t vm_pgin_flags; =
/* large page status flags */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; short =
num_io;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* number of IO's for =
paging-in/out a large page */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; short max_num_io;&nbsp;&nbsp; /* =
max number of I/O for paging-in/out a large page*/</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t maxpagein;&nbsp; /* =
maximum number 4K pages to be paged-in */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t fs_minpages;/* min number =
of pagein pages specified by filesys */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t fs_maxpages;/* max number =
of pagein pages allowed by filesys */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t lgpg_minpage;/* lower =
region index of a large page */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t lgpg_maxpage;/* upper =
region index of a large page */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; struct b_lgpg_io *lgpg_io;&nbsp; =
/* If not NULL, points to pageout multi-I/O </FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>&nbsp;&nbsp; =
data structure. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pageout_info_t =
io_array[PAGEOUT_IO_MAX]; /* pageout array.&nbsp; Size is 1 </FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>until MMF's =
supported. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t pgout_start;/* Where the =
initial pageout started. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; pgcnt_t pgout_end;&nbsp; /* Where =
the initial pageout ended. */</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; int =
pgbits;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* ref/mod bits =
for the current pageout. */</FONT>

<BR><FONT SIZE=3D2>} vfspage_t;</FONT>

<BR><FONT SIZE=3D2>#define _VFSPAGE_T</FONT>
</P>

<P><FONT SIZE=3D2>#endif /* _VFS_INCLUDED */</FONT>
</P>

</BODY>
</HTML>
------=_NextPart_000_0151_01C2DF3A.1D6523E0--

------=_NextPart_000_0155_01C2DF3A.1D69DED0--