Print this page
5508 move segvn #defines into seg_vn.c
Reviewed by: Marcel Telka <marcel@telka.sk>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/vm/pvn.h
+++ new/usr/src/uts/common/vm/pvn.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 26 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
27 27 /* All Rights Reserved */
28 28
29 29 /*
30 30 * University Copyright- Copyright (c) 1982, 1986, 1988
31 31 * The Regents of the University of California
32 32 * All Rights Reserved
33 33 *
34 34 * University Acknowledgment- Portions of this document are derived from
35 35 * software developed by the University of California, Berkeley, and its
36 36 * contributors.
37 37 */
38 38
39 39 #ifndef _VM_PVN_H
40 40 #define _VM_PVN_H
41 41
42 42 #include <sys/buf.h>
43 43 #include <vm/seg.h>
44 44
45 45 #ifdef __cplusplus
46 46 extern "C" {
47 47 #endif
48 48
49 49 #ifdef _KERNEL
50 50
51 51 /*
52 52 * VM - paged vnode.
53 53 *
54 54 * The VM system manages memory as a cache of paged vnodes.
55 55 * This file desribes the interfaces to common subroutines
56 56 * used to help implement the VM/file system routines.
57 57 */
58 58
59 59 struct page *pvn_read_kluster(struct vnode *vp, u_offset_t off,
60 60 struct seg *seg, caddr_t addr, u_offset_t *offp,
61 61 size_t *lenp, u_offset_t vp_off, size_t vp_len,
62 62 int isra);
63 63 struct page *pvn_write_kluster(struct vnode *vp, struct page *pp,
64 64 u_offset_t *offp, size_t *lenp, u_offset_t vp_off,
65 65 size_t vp_len, int flags);
66 66 void pvn_read_done(struct page *plist, int flags);
67 67 void pvn_write_done(struct page *plist, int flags);
68 68 void pvn_io_done(struct page *plist);
69 69 int pvn_vplist_dirty(struct vnode *vp, u_offset_t off,
70 70 int (*putapage)(vnode_t *, struct page *, u_offset_t *,
71 71 size_t *, int, cred_t *),
72 72 int flags, struct cred *cred);
73 73 void pvn_vplist_setdirty(vnode_t *vp, int (*page_check)(page_t *));
74 74 int pvn_getdirty(struct page *pp, int flags);
75 75 void pvn_vpzero(struct vnode *vp, u_offset_t vplen, size_t zbytes);
76 76 int pvn_getpages(
77 77 int (*getpage)(vnode_t *, u_offset_t, size_t, uint_t *,
78 78 struct page *[], size_t, struct seg *,
79 79 caddr_t, enum seg_rw, cred_t *),
80 80 struct vnode *vp, u_offset_t off, size_t len,
81 81 uint_t *protp, struct page **pl, size_t plsz,
82 82 struct seg *seg, caddr_t addr, enum seg_rw rw,
83 83 struct cred *cred);
↓ open down ↓ |
83 lines elided |
↑ open up ↑ |
84 84 void pvn_plist_init(struct page *pp, struct page **pl, size_t plsz,
85 85 u_offset_t off, size_t io_len, enum seg_rw rw);
86 86 void pvn_init(void);
87 87
88 88 /*
89 89 * The value is put in p_hash to identify marker pages. It is safe to
90 90 * test p_hash ==(!=) PVN_VPLIST_HASH_TAG even without holding p_selock.
91 91 */
92 92 #define PVN_VPLIST_HASH_TAG ((page_t *)-1)
93 93
94 -/*
95 - * When requesting pages from the getpage routines, pvn_getpages will
96 - * allocate space to return PVN_GETPAGE_NUM pages which map PVN_GETPAGE_SZ
97 - * worth of bytes. These numbers are chosen to be the minimum of the max's
98 - * given in terms of bytes and pages.
99 - */
100 -#define PVN_MAX_GETPAGE_SZ 0x10000 /* getpage size limit */
101 -#define PVN_MAX_GETPAGE_NUM 0x8 /* getpage page limit */
102 -
103 -#if PVN_MAX_GETPAGE_SZ > PVN_MAX_GETPAGE_NUM * PAGESIZE
104 -
105 -#define PVN_GETPAGE_SZ ptob(PVN_MAX_GETPAGE_NUM)
106 -#define PVN_GETPAGE_NUM PVN_MAX_GETPAGE_NUM
107 -
108 -#else
109 -
110 -#define PVN_GETPAGE_SZ PVN_MAX_GETPAGE_SZ
111 -#define PVN_GETPAGE_NUM btop(PVN_MAX_GETPAGE_SZ)
112 -
113 -#endif
114 -
115 94 #endif /* _KERNEL */
116 95
117 96 #ifdef __cplusplus
118 97 }
119 98 #endif
120 99
121 100 #endif /* _VM_PVN_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX