[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> * BEGIN_DESC</FONT>
<BR><FONT SIZE=3D2> * </FONT>
<BR><FONT SIZE=3D2> * File: </FONT>
<BR><FONT SIZE=3D2> * =
@(#) common/sys/vfs_vm.h =
$Revision: $</FONT>
<BR><FONT SIZE=3D2> * </FONT>
<BR><FONT SIZE=3D2> * Purpose:</FONT>
<BR><FONT SIZE=3D2> * <<please =
update with a synopis of the functionality provided by this =
file>></FONT>
<BR><FONT SIZE=3D2> * </FONT>
<BR><FONT SIZE=3D2> * Classification: =
=
Release to Release =
Consistency Req:</FONT>
<BR><FONT SIZE=3D2> * =
<<please select one of =
the following:>></FONT>
<BR><FONT SIZE=3D2> * kernel subsystem =
private =
none</FONT>
<BR><FONT SIZE=3D2> * kernel private =
=
=
none</FONT>
<BR><FONT SIZE=3D2> * kernel 3rd party =
private =
limited source</FONT>
<BR><FONT SIZE=3D2> * public =
=
=
=
binary & source</FONT>
<BR><FONT SIZE=3D2> * </FONT>
<BR><FONT SIZE=3D2> * BE header: no</FONT>
<BR><FONT SIZE=3D2> *</FONT>
<BR><FONT SIZE=3D2> * Shipped: no</FONT>
<BR><FONT SIZE=3D2> *</FONT>
<BR><FONT SIZE=3D2> * NOTE:</FONT>
<BR><FONT SIZE=3D2> * This header =
file contains information specific to the internals</FONT>
<BR><FONT SIZE=3D2> * of the HP-UX =
implementation. The contents of this header file</FONT>
<BR><FONT SIZE=3D2> * are subject to =
change without notice. Such changes may affect</FONT>
<BR><FONT SIZE=3D2> * source code, =
object code, or binary compatibility between</FONT>
<BR><FONT SIZE=3D2> * releases of =
HP-UX. Code which uses the symbols contained within</FONT>
<BR><FONT SIZE=3D2> * this header =
file is inherently non-portable (even between HP-UX</FONT>
<BR><FONT SIZE=3D2> * =
implementations).</FONT>
<BR><FONT SIZE=3D2> * </FONT>
<BR><FONT SIZE=3D2> * END_DESC </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 <sys/pregion.h></FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * max number of pages that vfs_pagein may bring =
in at a time</FONT>
<BR><FONT SIZE=3D2> * max number of pages that vfs_pageout may =
write out at a time</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>#define VFS_MAXPGIN 64</FONT>
<BR><FONT SIZE=3D2>#define VFS_MAXPGOUT 16</FONT>
</P>
<P><FONT SIZE=3D2>#define MAX_PGCNT_T =
MAXINT /* ?? this should live near pgcnt_t typedef */</FONT>
<BR><FONT SIZE=3D2>#define BIG_OK_DBD =
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; /* 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> * Gross stuff for NFS...</FONT>
<BR><FONT SIZE=3D2> *</FONT>
<BR><FONT SIZE=3D2> * NFS requires memory resources to perform a =
pageout. However, if</FONT>
<BR><FONT SIZE=3D2> * vhand is trying to steal pages, we probably =
do not have memory</FONT>
<BR><FONT SIZE=3D2> * available to page out NFS pages. To =
avoid a deadlock, we do the</FONT>
<BR><FONT SIZE=3D2> * following for NFS (but only when called by =
vhand):</FONT>
<BR><FONT SIZE=3D2> *</FONT>
<BR><FONT SIZE=3D2> * . When paging out an NFS region, =
we conditionally reserve enough</FONT>
<BR><FONT SIZE=3D2> * pages =
(NFS_PAGEOUT_MEM) to guarantee that the NFS will never</FONT>
<BR><FONT SIZE=3D2> * have to sleep waiting =
for memory. This is essentially one page</FONT>
<BR><FONT SIZE=3D2> * for every distinct =
size of memory that NFS needs (i.e. 1 page for</FONT>
<BR><FONT SIZE=3D2> * 128 byte buffers, 1 =
page for 512 byte buffers, etc). If we</FONT>
<BR><FONT SIZE=3D2> * cannot get the =
memory, we skip the dirty page and go on.</FONT>
<BR><FONT SIZE=3D2> *</FONT>
<BR><FONT SIZE=3D2> * . In pagein, we do not allow an =
NFS pagein to proceed until there</FONT>
<BR><FONT SIZE=3D2> * is at least minumum =
number of free pages (2 * NFS_PAGEOUT_MEM).</FONT>
<BR><FONT SIZE=3D2> * This guarantees that =
there will always be enough non-NFS pages</FONT>
<BR><FONT SIZE=3D2> * to page out so that =
we can reserve enough pages to page out</FONT>
<BR><FONT SIZE=3D2> * dirty NFS =
pages.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>#define NFS_PAGEOUT_MEM =
=
7 /* empirically determined */</FONT>
<BR><FONT SIZE=3D2>#define NFS_PAGEIN_MEM =
14</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * VM Pagein/Pageout Flags</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2> </FONT>
<BR><FONT SIZE=3D2>/* Parameters for calling VOP_PAGEOUT. =
*/</FONT>
<BR><FONT SIZE=3D2>#define PAGEOUT_HARD 0x01 /* Take =
all the pages you can, wait for locks */</FONT>
<BR><FONT SIZE=3D2>#define PAGEOUT_FREE 0x02 /* Free =
the pages once the I/O is complete */</FONT>
<BR><FONT SIZE=3D2>#define PAGEOUT_WAIT 0x04 /* Wait =
for the I/O to complete */</FONT>
<BR><FONT SIZE=3D2>#define PAGEOUT_VHAND 0x08 /* Pageout =
request by vhand */</FONT>
<BR><FONT SIZE=3D2>#define PAGEOUT_PURGE 0x20 /* purge pages =
from the page cache */</FONT>
<BR><FONT SIZE=3D2>#define PAGEOUT_RESERVED 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 0x1</FONT>
<BR><FONT SIZE=3D2>#define COMMIT_WAIT =
0x2</FONT>
<BR><FONT SIZE=3D2>#define COMMIT_NOW =
0x4</FONT>
<BR><FONT SIZE=3D2>#define COMMIT_INIT =
0x8</FONT>
<BR><FONT SIZE=3D2>#define COMMIT_DONE =
0x10</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>#define COMMIT_FLAGS (COMMIT_NOWAIT | COMMIT_WAIT | =
COMMIT_NOW | \</FONT>
<BR> =
<FONT SIZE=3D2>COMMIT_INIT | =
COMMIT_DONE)</FONT>
</P>
<P><FONT SIZE=3D2>#define VALID_COMMIT_FLAG(flag) (flag & =
COMMIT_FLAGS)</FONT>
</P>
<P><FONT SIZE=3D2>#define COMMIT_CLUSTER_SIZE =
8 /* pages */</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Pagein/Pageout Specific Flags.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>#define VM_NOWAIT =
0x100 /* Can't sleep for resources. */</FONT>
<BR><FONT SIZE=3D2>#define =
VM_INVALIDATE =
0x200</FONT>
<BR><FONT SIZE=3D2>#define =
VM_ERROR  =
; 0x400</FONT>
<BR><FONT SIZE=3D2>#define =
VM_FREE_PAGE &=
nbsp; 0x800</FONT>
<BR><FONT SIZE=3D2>#define =
VM_MLOCK  =
; 0x1000</FONT>
<BR><FONT SIZE=3D2>#define =
VM_LARGEPAGE_IO =
0x2000</FONT>
<BR><FONT SIZE=3D2>#define =
VM_LARGEPAGE_RUN 0x4000</FONT>
<BR><FONT SIZE=3D2>#define =
VM_IO_RUN &nbs=
p; 0x8000</FONT>
<BR><FONT SIZE=3D2>#define PAGEOUT_NO_PHYSICAL =
0x10000</FONT>
<BR><FONT SIZE=3D2>#define =
VM_VFS_LGPG_FLAGS (VM_INVALIDATE | =
VM_ERROR | VM_FREE_PAGE | \</FONT>
<BR> =
=
=
<FONT SIZE=3D2> VM_MLOCK =
| VM_LARGEPAGE_IO | VM_LARGEPAGE_RUN)</FONT>
<BR><FONT SIZE=3D2>#define VM_DEVSWAP_LGPG_FLAGS =
(VM_LARGEPAGE_RUN | VM_MLOCK | VM_ERROR | \</FONT>
<BR> =
=
=
<FONT SIZE=3D2> =
PAGEOUT_NO_PHYSICAL)</FONT>
</P>
<P><FONT SIZE=3D2>typedef enum vm_freepage_ret {</FONT>
<BR> <FONT =
SIZE=3D2>PAGE_DIRTY,</FONT>
<BR> <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> <FONT =
SIZE=3D2>VM_SUCCESS,</FONT>
<BR> <FONT =
SIZE=3D2>VM_TERMINATE_RUN,</FONT>
<BR> <FONT =
SIZE=3D2>VM_NOT_INCLUDED,</FONT>
<BR> <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> <FONT =
SIZE=3D2>FREE_PAGE,</FONT>
<BR> <FONT =
SIZE=3D2>DONT_TOUCH,</FONT>
<BR> <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> * DETECT_HOLES is set by those file systems who =
can determine sparse access.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>#define DETECT_HOLES =
0x1</FONT>
<BR><FONT SIZE=3D2>#define =
DONT_BPURGE &n=
bsp; 0x2</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Set by NFS to inform upper layer a truncation =
on the object is necessary.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>#define PAGEOUT_TRUNCATE =
0x2</FONT>
</P>
<P><FONT SIZE=3D2>/* </FONT>
<BR><FONT SIZE=3D2> * Defines used for read-ahead. ADJUST_SIZE =
causes the pagein size to adjust,</FONT>
<BR><FONT SIZE=3D2> * while ADJUST_STRENGTH adjusts the pregion =
strength indicator.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>#define ADJUST_SIZE =
0x1</FONT>
<BR><FONT SIZE=3D2>#define ADJUST_STRENGTH 0x2</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * The following defines are used for read-ahead =
I/O's.</FONT>
<BR><FONT SIZE=3D2> *</FONT>
<BR><FONT SIZE=3D2> * MULTI_CONVERT_THRESHOLD is the =
"p_strength" value when single to multi-page</FONT>
<BR><FONT SIZE=3D2> * conversion takes place.</FONT>
<BR><FONT SIZE=3D2> *</FONT>
<BR><FONT SIZE=3D2> * PURELY_RANDOM and PURELY_SEQUENTIAL are =
"p_strength" indicators used by</FONT>
<BR><FONT SIZE=3D2> * madvise() when the user specifies MADV_RANDOM =
or MADV_SEQUENTIAL. They</FONT>
<BR><FONT SIZE=3D2> * also bound p_strength to that range.</FONT>
<BR><FONT SIZE=3D2> *</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>#define MULTI_CONVERT_THRESHOLD =
15</FONT>
<BR><FONT SIZE=3D2>#define PURELY_RANDOM =
=
-100</FONT>
<BR><FONT SIZE=3D2>#define =
PURELY_SEQUENTIAL =
100</FONT>
<BR><FONT SIZE=3D2>#define DEFAULT_PAGEIN_SIZE =
8</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Passed to read ahead process pages =
(ra_process_pages)</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>#define DO_READ_AHEAD =
=
0x1</FONT>
<BR><FONT SIZE=3D2>#define =
DONT_DO_READ_AHEAD =
0x2</FONT>
<BR><FONT SIZE=3D2>#define =
HOLD_PAGE_LOCK  =
; 0x4</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Passed to VM truncation.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>#define VP_TRUNCATE =
0x1</FONT>
<BR><FONT SIZE=3D2>#define VP_INVALIDATE 0x2</FONT>
</P>
<P><FONT SIZE=3D2>#define =
DBD_TYPE(vm_info) &n=
bsp; ((vm_info)->dbd->dbd_type)</FONT>
<BR><FONT SIZE=3D2>#define =
DBD_DATA(vm_info) &n=
bsp; ((vm_info)->dbd->dbd_data)</FONT>
</P>
<P><FONT SIZE=3D2>#define RESET_BUFCACHE_STEALSCAN(bufcache_preg) =
(bufcache_preg->p_stealscan =3D 1)</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Returns "1" if the pageout routine =
should stop.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>#define VM_STOP_PAGING(vm_info) =
=
=
\</FONT>
<BR> <FONT =
SIZE=3D2>((((vm_info)->vm_flags & PAGEOUT_VHAND) && =
\</FONT>
<BR> <FONT =
SIZE=3D2>!((vm_info)->vm_flags & PAGEOUT_HARD) && =
\</FONT>
<BR> <FONT SIZE=3D2>parolemem =
>=3D maxpendpageouts) ? 1 : 0) =
\</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> *</FONT>
<BR><FONT SIZE=3D2> * #define's for large pages.</FONT>
<BR><FONT SIZE=3D2> *</FONT>
<BR><FONT SIZE=3D2> */</FONT>
</P>
<P><FONT SIZE=3D2>/* </FONT>
<BR><FONT SIZE=3D2> * LGPG_ENABLE flag is passed to =
vm_pagein_init() by VOP_PAGEIN routines</FONT>
<BR><FONT SIZE=3D2> * such as ufs_pagein() to indicate that they =
have been adapted for paging</FONT>
<BR><FONT SIZE=3D2> * in a large page.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
</P>
<P><FONT SIZE=3D2>#define LGPG_ENABLE =
0x01 </FONT>
</P>
<P><FONT SIZE=3D2>#define LGPG_RETRY_MAX 8</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Status of an instance of a large page during =
VOP_PAGEIN. These flags </FONT>
<BR><FONT SIZE=3D2> * are set by various "vm_" routines =
in vfs_vm.c file. Also used by </FONT>
<BR><FONT SIZE=3D2> * devswap_pagein(), a VOP_PAGEIN =
routine.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
</P>
<P><FONT SIZE=3D2>typedef enum lgpg_stat_flags {</FONT>
<BR> <FONT =
SIZE=3D2>LGPG_CLR_FLAGS =
=3D 0x00,</FONT>
<BR> <FONT =
SIZE=3D2>LGPG_TRY =
=3D 0x10,</FONT>
<BR> <FONT =
SIZE=3D2>LGPG_EXPAND_FAILED =3D =
0x20,</FONT>
<BR> <FONT =
SIZE=3D2>LGPG_ALLOCATED &n=
bsp; =3D 0x40,</FONT>
<BR> <FONT =
SIZE=3D2>LGPG_ALLOC_FAILED =3D =
0x80,</FONT>
<BR> <FONT =
SIZE=3D2>LGPG_CACHE_ERROR =3D =
0x100</FONT>
<BR> <FONT SIZE=3D2>} =
lgpg_stat_flags_t;</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Reasons for terminating fault expansion. =
Returned by</FONT>
<BR><FONT SIZE=3D2> * expand_faultin_up() and =
expand_faultin_down().</FONT>
<BR><FONT SIZE=3D2> */</FONT>
</P>
<P><FONT SIZE=3D2>typedef enum expnd_flags {</FONT>
<BR> <FONT =
SIZE=3D2>CLR_FLAGS =
=3D 0x00,</FONT>
<BR> <FONT SIZE=3D2>PAGELIMIT =
=
=3D 0x01,</FONT>
<BR> <FONT =
SIZE=3D2>NONCONTIGUOUS_BLOCK =3D 0x02,</FONT>
<BR> <FONT =
SIZE=3D2>VM_REASONS =
=3D 0x04 </FONT>
<BR> <FONT SIZE=3D2>} =
expnd_flags_t;</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>typedef enum vmpgin_return_values {</FONT>
<BR> <FONT SIZE=3D2>VM_NONE =
=
=3D 0,</FONT>
<BR> <FONT SIZE=3D2>VM_DONE =
=
=3D 1,</FONT>
<BR> <FONT =
SIZE=3D2>VM_PAGE_PRESENT =3D =
2,</FONT>
<BR> <FONT =
SIZE=3D2>VM_RETRY =
=3D 3</FONT>
<BR> <FONT SIZE=3D2>} =
retval_t;</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Flags passed to vm_expand_ok().</FONT>
<BR><FONT SIZE=3D2> */</FONT>
</P>
<P><FONT SIZE=3D2>#define =
MIN_PAGE =
0x100</FONT>
<BR><FONT SIZE=3D2>#define =
MAX_PAGE =
0x200</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * The following macros VM_SET_FS_MAX_PAGES and =
VM_SET_FS_MIN_PAGES are</FONT>
<BR><FONT SIZE=3D2> * called by VOP_PAGEIN routines to specify the =
maximum-pages (for each </FONT>
<BR><FONT SIZE=3D2> * IO) allowed and the minimum_pages desired =
(for each IO) respectively.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
</P>
<P><FONT SIZE=3D2>#define VM_SET_FS_MAX_PAGES(vm_info, max) =
{ =
=
\</FONT>
<BR> <FONT =
SIZE=3D2>vm_info->fs_maxpages =3D max; =
=
=
=
\</FONT>
<BR><FONT SIZE=3D2>}</FONT>
</P>
<P><FONT SIZE=3D2>#define VM_SET_FS_MIN_PAGES(vm_info, min) =
{ =
=
\</FONT>
<BR> <FONT =
SIZE=3D2>vm_info->fs_minpages =3D min; =
=
=
=
\</FONT>
<BR><FONT SIZE=3D2>}</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Called by VOP_PAGEIN routines to determine if =
multiple IO ranges need </FONT>
<BR><FONT SIZE=3D2> * to be setup. Multiple IO may be needed for =
paging in a large page.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
</P>
<P><FONT SIZE=3D2>#define VM_GET_IO_INFO(vm_info, maxpagein, =
max_io){ =
=
\</FONT>
<BR> <FONT SIZE=3D2>maxpagein =
=3D vm_info->maxpagein; =
=
=
\</FONT>
<BR> <FONT SIZE=3D2>if =
(vm_info->vm_pgin_flags & LGPG_TRY) =
{ =
\</FONT>
<BR> =
<FONT SIZE=3D2>max_io =3D =
vm_info->max_num_io; =
=
=
\</FONT>
<BR> <FONT SIZE=3D2>} else { =
=
=
=
=
=
=
\</FONT>
<BR> =
<FONT SIZE=3D2>max_io =3D =
1; =
=
=
=
\</FONT>
<BR> <FONT =
SIZE=3D2>} =
=
=
=
=
=
=
\</FONT>
<BR><FONT SIZE=3D2>}</FONT>
</P>
<P><FONT SIZE=3D2>/* </FONT>
<BR><FONT SIZE=3D2> * Called by VOP_PAGEIN routines to communicate =
that multiple IO </FONT>
<BR><FONT SIZE=3D2> * cannot be set up. </FONT>
<BR><FONT SIZE=3D2> */</FONT>
</P>
<P><FONT SIZE=3D2>#define VM_MULT_IO_FAILURE(vm_info) { =
=
=
=
\</FONT>
<BR> <FONT =
SIZE=3D2>vm_info->vm_pgin_flags &=3D ~LGPG_TRY; =
=
=
\</FONT>
<BR> <FONT =
SIZE=3D2>vm_info->vm_pgin_flags |=3D LGPG_EXPAND_FAILED; =
=
\</FONT>
<BR> <FONT =
SIZE=3D2>vm_info->num_io =3D 1; =
=
=
=
=
\</FONT>
<BR><FONT SIZE=3D2>}</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Disallow read-ahead for large pages.</FONT>
<BR><FONT SIZE=3D2> * In the future, we may want to allow =
read-aheads for low-end large</FONT>
<BR><FONT SIZE=3D2> * pages such as 8K (tahoe) and 16K.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
</P>
<P><FONT SIZE=3D2>#define VM_READ_AHEAD_ALLOWED(vm_info) =
=
=
=
\</FONT>
<BR> <FONT =
SIZE=3D2>(((vm_info->vm_pgin_flags & LGPG_TRY) =
|| =
=
\</FONT>
<BR> <FONT SIZE=3D2> =
(vm_info->vm_pgin_flags & LGPG_ALLOCATED) || =
=
\</FONT>
<BR> <FONT SIZE=3D2> =
(vm_info->vm_pgin_flags & LGPG_CACHE_ERROR)) ? 0 : 1) </FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Called by VOP_PAGEIN routines to refresh the =
vfd and dbd, when</FONT>
<BR><FONT SIZE=3D2> * there is a chance they might have changed, =
for instance, when region</FONT>
<BR><FONT SIZE=3D2> * lock was released and re-acquired.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
</P>
<P><FONT SIZE=3D2>#define VM_REINIT_FAULT_DBDVFD(vm_info) =
=
=
=
\</FONT>
<BR> <FONT =
SIZE=3D2>FINDENTRY(vm_info->prp->p_reg, vm_info->fault_index, =
\</FONT>
<BR> =
<FONT SIZE=3D2> =
&(vm_info->vfd), &(vm_info->dbd));</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Structure to hold page-io information for =
page-in involving multiple</FONT>
<BR><FONT SIZE=3D2> * IO. Added for paging-in a large page. Maximum =
number of IO allowed</FONT>
<BR><FONT SIZE=3D2> * by default is LGPG_FSTORE_MAX_IO (=3D 512) as =
defined below. In the current</FONT>
<BR><FONT SIZE=3D2> * implementation, a global "short =
lgpg_fstore_max_io" is being set to</FONT>
<BR><FONT SIZE=3D2> * LGPG_FSTORE_MAX_IO and this variable serves =
as a hook through which </FONT>
<BR><FONT SIZE=3D2> * it is possible to change the maximum number =
of I/O's allowed. An array </FONT>
<BR><FONT SIZE=3D2> * of this page-io structure is MALLOC'ed and a =
pointer to this array is </FONT>
<BR><FONT SIZE=3D2> * placed in "struct vfspage" =
(vm_info). </FONT>
<BR><FONT SIZE=3D2> */</FONT>
</P>
<P><FONT SIZE=3D2>typedef struct {</FONT>
<BR> <FONT SIZE=3D2>daddr_t =
start_blk;</FONT>
<BR> <FONT SIZE=3D2>pgcnt_t =
count;</FONT>
<BR> <FONT SIZE=3D2>pgcnt_t =
startindex;</FONT>
<BR> <FONT SIZE=3D2>struct buf =
*bp;</FONT>
<BR> <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> * Pageout data structure used when =
"multiple" I/O's are required to write out</FONT>
<BR><FONT SIZE=3D2> * a single large page. Note, =
"io_cnt" is different from vminfo->piocnt in</FONT>
<BR><FONT SIZE=3D2> * that piocnt tracks the number distinct =
pageouts over a range and io_cnt is</FONT>
<BR><FONT SIZE=3D2> * the number of I/O's to complete one distinct =
pageout.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>struct b_lgpg_io {</FONT>
<BR> <FONT SIZE=3D2>int =
io_cnt; =
/* Count of I/O's for a =
"single" large page. </FONT>
<BR> =
=
=
<FONT SIZE=3D2> =
When =3D=3D 0, finished. */</FONT>
<BR> <FONT SIZE=3D2>int =
io_flags; /* =
Flags(see below) */</FONT>
<BR> <FONT SIZE=3D2>caddr_t =
io_addr; /* Starting address =
of I/O */</FONT>
<BR> <FONT SIZE=3D2>pgcnt_t =
io_pages; /* Length of I/O */</FONT>
<BR><FONT SIZE=3D2>};</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Flags for io_flags</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>#define LGPG_IO_SLEEP 0x1</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Pageout data structure used to hold the =
block/length information when</FONT>
<BR><FONT SIZE=3D2> * multiple I/O's are required for a large =
page.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>typedef struct pageout_info {</FONT>
<BR><FONT SIZE=3D2> pgcnt_t =
start; /* start of an i/o in a =
largepage */</FONT>
<BR><FONT SIZE=3D2> daddr_t =
blkno; /* block number of the i/o =
*/</FONT>
<BR><FONT SIZE=3D2> int =
cnt_bytes; /* 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> * Artifical maximum on the number of I/O's we =
are willing to do for a large</FONT>
<BR><FONT SIZE=3D2> * page pageout.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>#define PAGEOUT_IO_MAX 1</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * The following macros are used by =
Pagein/Pageout routines to inform, query or</FONT>
<BR><FONT SIZE=3D2> * modify information in the VM system. =
The purpose of the macros is to remove</FONT>
<BR><FONT SIZE=3D2> * all references to VM data structures from =
file system dependent pagein</FONT>
<BR><FONT SIZE=3D2> * routines.</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>#define VM_CLEAR_PAGEOUT_RUN(vm_info) =
((vm_info)->run =3D 0)</FONT>
<BR><FONT SIZE=3D2>#define VM_BASE_OFFSET(vm_info) =
=
((vm_info)->prp->p_off)</FONT>
<BR><FONT SIZE=3D2>#define VM_START_PAGEOUT_INDX(vm_info) =
((vm_info)->start)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_END_PAGEOUT_INDX(vm_info) =
((vm_info)->end)</FONT>
<BR><FONT SIZE=3D2>#define VM_START_PAGEOUT_BLK(vm_info) =
((vm_info)->dbd_start.dbd_data)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_END_PAGEOUT_BLK(vm_info) =
((vm_info)->dbd_end.dbd_data)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_NO_PAGEOUT_RUN(vm_info) =
((vm_info)->run ? 0 : 1 )</FONT>
<BR><FONT SIZE=3D2>#define VM_MEM_RESERVED(vm_info) =
=
((vm_info)->vm_mem_reserved)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_SHARED_OBJECT(vm_info) =
((vm_info)->shared)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_MAPPED_SPACE(vm_info) =
((vm_info)->space)</FONT>
<BR><FONT SIZE=3D2>#define VM_MAPPED_ADDR(vm_info) =
=
((vm_info)->mapped_vaddr)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_MEMORY_RESERVED(vm_info) =
((vm_info)->memreserved)</FONT>
<BR><FONT SIZE=3D2>#define VM_IS_ZOMBIE(vm_info) =
=
((vm_info)->prp->p_reg->r_zomb)</FONT>
<BR><FONT SIZE=3D2>#define VM_PAGE_VALID(vm_info) =
=
((vm_info)->vfd->pgm.pg_v)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_FILE_OFFSET(vm_info) =
((vm_info)->prp->p_reg->r_off)</FONT>
<BR><FONT SIZE=3D2>#define VM_SETFS_FLAGS(vm_info, flag) =
((vm_info)->fs_flags |=3D flag)</FONT>
<BR><FONT SIZE=3D2>#define VM_UNSETFS_FLAGS(vm_info, flag) =
((vm_info)->fs_flags &=3D ~flag)</FONT>
<BR><FONT SIZE=3D2>#define VM_FS_FLAGS(vm_info) =
((vm_info)->fs_flags)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_ZOMBIE_OBJECT(vm_info) =
((vm_info)->prp->p_reg->r_zomb =3D 1)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_SET_CACHE_LIMIT(vm_info,limit) =
((vm_info)->dbd_limit =3D limit)</FONT>
<BR><FONT SIZE=3D2>#define VM_SET_STARTINDX(vm_info,start) =
((vm_info)->startindex =3D start)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_GET_STARTINDX(vm_info) =
((vm_info)->startindex)</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * The following macros are used to set and get =
values of the fields in</FONT>
<BR><FONT SIZE=3D2> * page-io information structure [see =
pagein_info_t].</FONT>
<BR><FONT SIZE=3D2> * =
VM_SET_IO_STARTINDX =
VM_GET_IO_STARTINDX</FONT>
<BR><FONT SIZE=3D2> * VM_SET_IO_COUNT =
=
VM_GET_IO_COUNT</FONT>
<BR><FONT SIZE=3D2> * =
VM_SET_IO_STARTBLK =
VM_GET_IO_STARTBLK</FONT>
<BR><FONT SIZE=3D2> * =
VM_SET_IO_BP =
=
VM_GET_IO_BP</FONT>
<BR><FONT SIZE=3D2> * VM_SET_IO_ERROR =
=
VM_GET_IO_ERROR</FONT>
<BR><FONT SIZE=3D2> */</FONT>
</P>
<P><FONT SIZE=3D2>#define VM_SET_IO_STARTINDX(vm_info, indx, =
start) =
=
\</FONT>
<BR> =
<FONT =
SIZE=3D2>((vm_info)->io[indx].startindex =3D start)</FONT>
<BR><FONT SIZE=3D2>#define VM_GET_IO_STARTINDX(vm_info, =
indx) =
=
=
\</FONT>
<BR> =
<FONT =
SIZE=3D2>((vm_info)->io[indx].startindex)</FONT>
</P>
<P><FONT SIZE=3D2>#define VM_SET_IO_COUNT(vm_info, indx, =
cnt) =
=
\</FONT>
<BR> =
<FONT =
SIZE=3D2>((vm_info)->io[indx].count =3D cnt)</FONT>
<BR><FONT SIZE=3D2>#define VM_GET_IO_COUNT(vm_info, indx) =
=
=
=
\</FONT>
<BR> =
<FONT =
SIZE=3D2>((vm_info)->io[indx].count)</FONT>
</P>
<P><FONT SIZE=3D2>#define VM_SET_IO_STARTBLK(vm_info, indx, =
block) =
=
\</FONT>
<BR> =
<FONT =
SIZE=3D2>((vm_info)->io[indx].start_blk =3D block)</FONT>
<BR><FONT SIZE=3D2>#define VM_GET_IO_STARTBLK(vm_info, =
indx) =
=
=
\</FONT>
<BR> =
<FONT =
SIZE=3D2>((vm_info)->io[indx].start_blk)</FONT>
</P>
<P><FONT SIZE=3D2>#define VM_SET_IO_BP(vm_info, indx, =
bswp) =
=
=
\</FONT>
<BR> =
<FONT =
SIZE=3D2>((vm_info)->io[indx].bp =3D bswp)</FONT>
<BR><FONT SIZE=3D2>#define VM_GET_IO_BP(vm_info, =
indx) =
=
=
\</FONT>
<BR> =
<FONT =
SIZE=3D2>((vm_info)->io[indx].bp)</FONT>
</P>
<P><FONT SIZE=3D2>#define VM_SET_IO_ERROR(vm_info, indx, =
ioerr) =
=
\</FONT>
<BR> =
<FONT =
SIZE=3D2>((vm_info)->io[indx].error =3D ioerr)</FONT>
<BR><FONT SIZE=3D2>#define VM_GET_IO_ERROR(vm_info, indx) =
=
=
=
\</FONT>
<BR> =
<FONT =
SIZE=3D2>((vm_info)->io[indx].error)</FONT>
</P>
<P><FONT SIZE=3D2>#define =
VM_REGION(vm_info) =
=
((vm_info)->prp->p_reg)</FONT>
<BR><FONT SIZE=3D2>#define VM_REGION_SIZE(vm_info) =
=
((vm_info)->prp->p_reg->r_pgsz)</FONT>
<BR><FONT SIZE=3D2>#define VM_IS_MMAP(vm_info) =
((vm_info)->prp->p_type =
=3D=3D PT_MMAP)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_PAGEOUT_NOWAIT(vm_info) =
((vm_info)->vm_flags & PAGEOUT_VHAND)</FONT>
<BR><FONT SIZE=3D2>#define VM_SET_ERROR(vm_info, =
error) ((vm_info)->error =3D error)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_CLEAR_ERROR(vm_info) =
((vm_info)->error =3D 0)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_GET_PAGEIN_VNODE(vm_info) ((vm_info)->vp)</FONT>
<BR><FONT SIZE=3D2>#define VM_GET_PAGEOUT_VNODE(vm_info) =
((vm_info)->vp)</FONT>
<BR><FONT SIZE=3D2>#define VM_CACHE_LIMIT(vm_info) =
=
((vm_info)->dbd_limit)</FONT>
<BR><FONT SIZE=3D2>#define VM_PAGEIN_INFO(vm_info) =
((vm_info)->io)</FONT>
<BR><FONT SIZE=3D2>#define VM_PRP(vm_info) =
=
((vm_info)->prp)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_ADDR(vm_info) =
((vm_info)->vaddr)</FONT>
<BR><FONT SIZE=3D2>#define VM_WRT(vm_info) =
=
((vm_info)->wrt)</FONT>
<BR><FONT SIZE=3D2>#define =
VM_SPACE(vm_info) =
((vm_info)->space)</FONT>
<BR><FONT SIZE=3D2>#define VM_GET_NUM_IO(vm_info) =
((vm_info)->num_io)</FONT>
<BR><FONT SIZE=3D2>#define VM_SET_NUM_IO(vm_info, count) =
((vm_info)->num_io =3D count)</FONT>
<BR><FONT SIZE=3D2>#define VM_PAGEOUT_INFO(vm_info, num_io, io_start, =
io_blkno, io_bytes) \</FONT>
<BR> <FONT SIZE=3D2>(io_start) =
=3D (vm_info)->io_array[num_io].start; =
\</FONT>
<BR> <FONT SIZE=3D2>(io_blkno) =
=3D (vm_info)->io_array[num_io].blkno; =
\</FONT>
<BR> <FONT SIZE=3D2>(io_bytes) =
=3D (vm_info)->io_array[num_io].cnt_bytes;</FONT>
</P>
<P><FONT SIZE=3D2>/*</FONT>
<BR><FONT SIZE=3D2> * Used by NFS to transmit information from VM =
back to the FS layer. </FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>typedef struct {</FONT>
<BR><FONT SIZE=3D2> k_off_t =
isize; /* file size */</FONT>
<BR><FONT SIZE=3D2> u_int =
bsize; /* file system block =
size */</FONT>
<BR><FONT SIZE=3D2> int =
remote; /* the file is remote (DUX, =
NFS) */</FONT>
<BR><FONT SIZE=3D2> int =
remote_down; /* is the remote system down now? */</FONT>
<BR><FONT SIZE=3D2>} fsdata_t;</FONT>
</P>
<P><FONT SIZE=3D2>/* </FONT>
<BR><FONT SIZE=3D2> * The global VM pagein/pageout structure. =
It houses everything for the sparse</FONT>
<BR><FONT SIZE=3D2> * walker as well as information needed to =
communicate with the VM services</FONT>
<BR><FONT SIZE=3D2> * found in vfs_vm.c</FONT>
<BR><FONT SIZE=3D2> */</FONT>
<BR><FONT SIZE=3D2>typedef struct vfspage {</FONT>
<BR><FONT SIZE=3D2> preg_t =
*prp; /* The pregion for the =
pagein/pageout. */</FONT>
<BR><FONT SIZE=3D2> struct vnode *vp; /* =
file vnode pointer for the pagein/pageout. */</FONT>
<BR><FONT SIZE=3D2> struct vnode *cache_vp;/* file =
vnode pointer for the pagein/pageout. */</FONT>
<BR><FONT SIZE=3D2> pgcnt_t =
maxpgs; /* maximum length a run(pageout) can be =
*/</FONT>
<BR><FONT SIZE=3D2> dbd_t dbd_start; =
/* dbd for start of a pageout. */</FONT>
<BR><FONT SIZE=3D2> dbd_t =
dbd_end; /* dbd for end of a pageout. */</FONT>
<BR><FONT SIZE=3D2> dbd_t =
cur_dbd; /* The current dbd for the =
"current"(pageout) index. */</FONT>
<BR><FONT SIZE=3D2> pgcnt_t =
start; /* start of a run(pageout) =
*/</FONT>
<BR><FONT SIZE=3D2> pgcnt_t =
end; /* end of a run(pageout) =
*/</FONT>
<BR><FONT SIZE=3D2> int run; =
/* a run has been =
detected(pageout) */</FONT>
<BR><FONT SIZE=3D2> caddr_t fs_data; =
/* A pointer used for any specific fs data needed. */</FONT>
<BR><FONT SIZE=3D2> space_t =
space; /* The faulting space for a pagein. =
*/</FONT>
<BR><FONT SIZE=3D2> caddr_t =
vaddr; /* The starting addr for a pagein. =
*/</FONT>
<BR><FONT SIZE=3D2> caddr_t mapped_vaddr; /* The =
faulting addr for a pagein/out. */</FONT>
<BR><FONT SIZE=3D2> pgcnt_t dbd_limit; /* one =
past the last dbd that we can trust */</FONT>
<BR><FONT SIZE=3D2> int =
*piocnt; /* An integer pointer =
used with PAGEOUT_WAIT. */</FONT>
<BR><FONT SIZE=3D2> dbd_t =
*dbd; /* The dbd for a pagein =
fault. */</FONT>
<BR><FONT SIZE=3D2> vfd_t *vfd; =
/* The vfd for a pagein =
fault. */</FONT>
<BR><FONT SIZE=3D2> pgcnt_t fault_index; /* The index =
where the pagein fault occurred. */</FONT>
<BR><FONT SIZE=3D2> pgcnt_t startindex; /* The =
starting page index for a faulting range. */</FONT>
<BR><FONT SIZE=3D2> int =
steal_flag; /* Set to 1 if the PAGEOUT_STEAL is =
set. */</FONT>
<BR><FONT SIZE=3D2> int =
vm_flags; /* The vm flags passed to =
pageout. */</FONT>
<BR><FONT SIZE=3D2> int =
fs_flags; /* The FS flags used for a =
pagein. */</FONT>
<BR><FONT SIZE=3D2> int wrt; =
/* Set to one if the page =
fault(pagein) was a write. */</FONT>
<BR><FONT SIZE=3D2> pgcnt_t memreserved; /* Amount of =
memory reserved for pagein/pageout. */</FONT>
<BR><FONT SIZE=3D2> int shared; =
/* Are the region fstore and =
bstore equal? */</FONT>
<BR><FONT SIZE=3D2> int =
error; /* Error =
value set by lower routine. */</FONT>
<BR><FONT SIZE=3D2> physpfn_t =
*pfn; /* Page frame array for pagein's only. =
*/</FONT>
<BR><FONT SIZE=3D2> pagein_info_t *io; /* =
information on each IO for page-in */</FONT>
<BR><FONT SIZE=3D2> lgpg_stat_flags_t vm_pgin_flags; =
/* large page status flags */</FONT>
<BR><FONT SIZE=3D2> short =
num_io; /* number of IO's for =
paging-in/out a large page */</FONT>
<BR><FONT SIZE=3D2> short max_num_io; /* =
max number of I/O for paging-in/out a large page*/</FONT>
<BR><FONT SIZE=3D2> pgcnt_t maxpagein; /* =
maximum number 4K pages to be paged-in */</FONT>
<BR><FONT SIZE=3D2> pgcnt_t fs_minpages;/* min number =
of pagein pages specified by filesys */</FONT>
<BR><FONT SIZE=3D2> pgcnt_t fs_maxpages;/* max number =
of pagein pages allowed by filesys */</FONT>
<BR><FONT SIZE=3D2> pgcnt_t lgpg_minpage;/* lower =
region index of a large page */</FONT>
<BR><FONT SIZE=3D2> pgcnt_t lgpg_maxpage;/* upper =
region index of a large page */</FONT>
<BR><FONT SIZE=3D2> struct b_lgpg_io *lgpg_io; =
/* If not NULL, points to pageout multi-I/O </FONT>
<BR> =
=
=
<FONT SIZE=3D2> =
data structure. */</FONT>
<BR><FONT SIZE=3D2> pageout_info_t =
io_array[PAGEOUT_IO_MAX]; /* pageout array. Size is 1 </FONT>
<BR> =
=
=
=
=
<FONT SIZE=3D2>until MMF's =
supported. */</FONT>
<BR><FONT SIZE=3D2> pgcnt_t pgout_start;/* Where the =
initial pageout started. */</FONT>
<BR><FONT SIZE=3D2> pgcnt_t pgout_end; /* Where =
the initial pageout ended. */</FONT>
<BR><FONT SIZE=3D2> int =
pgbits; /* 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--