134
135 hrtime_t red_deep_hires;
136 kthread_t *red_deep_thread;
137
138 uint32_t red_nmapped;
139 uint32_t red_closest = UINT_MAX;
140 uint32_t red_ndoubles;
141
142 pgcnt_t anon_segkp_pages_locked; /* See vm/anon.h */
143 pgcnt_t anon_segkp_pages_resv; /* anon reserved by seg_kp */
144
145 static struct seg_ops segkp_ops = {
146 .fault = segkp_fault,
147 .checkprot = segkp_checkprot,
148 .kluster = segkp_kluster,
149 .dump = segkp_dump,
150 .pagelock = segkp_pagelock,
151 .getmemid = segkp_getmemid,
152 .getpolicy = segkp_getpolicy,
153 .capable = segkp_capable,
154 .inherit = seg_inherit_notsup,
155 };
156
157
158 static void segkpinit_mem_config(struct seg *);
159
160 static uint32_t segkp_indel;
161
162 /*
163 * Allocate the segment specific private data struct and fill it in
164 * with the per kp segment mutex, anon ptr. array and hash table.
165 */
166 int
167 segkp_create(struct seg *seg)
168 {
169 struct segkp_segdata *kpsd;
170 size_t np;
171
172 ASSERT(seg != NULL && seg->s_as == &kas);
173 ASSERT(RW_WRITE_HELD(&seg->s_as->a_lock));
174
|
134
135 hrtime_t red_deep_hires;
136 kthread_t *red_deep_thread;
137
138 uint32_t red_nmapped;
139 uint32_t red_closest = UINT_MAX;
140 uint32_t red_ndoubles;
141
142 pgcnt_t anon_segkp_pages_locked; /* See vm/anon.h */
143 pgcnt_t anon_segkp_pages_resv; /* anon reserved by seg_kp */
144
145 static struct seg_ops segkp_ops = {
146 .fault = segkp_fault,
147 .checkprot = segkp_checkprot,
148 .kluster = segkp_kluster,
149 .dump = segkp_dump,
150 .pagelock = segkp_pagelock,
151 .getmemid = segkp_getmemid,
152 .getpolicy = segkp_getpolicy,
153 .capable = segkp_capable,
154 };
155
156
157 static void segkpinit_mem_config(struct seg *);
158
159 static uint32_t segkp_indel;
160
161 /*
162 * Allocate the segment specific private data struct and fill it in
163 * with the per kp segment mutex, anon ptr. array and hash table.
164 */
165 int
166 segkp_create(struct seg *seg)
167 {
168 struct segkp_segdata *kpsd;
169 size_t np;
170
171 ASSERT(seg != NULL && seg->s_as == &kas);
172 ASSERT(RW_WRITE_HELD(&seg->s_as->a_lock));
173
|