189 #define seg_phashtab_wired pctrl1.p_htabwired
190 #define seg_pkmcache pctrl1.p_kmcache
191 #define seg_pmem_mtx pctrl2.p_mem_mtx
192 #define seg_plocked_window pctrl2.p_locked_win
193 #define seg_plocked pctrl2.p_locked
194 #define seg_pahcur pctrl2.p_ahcur
195 #define seg_pathr_on pctrl2.p_athr_on
196 #define seg_pahhead pctrl2.p_ahhead
197 #define seg_pmax_pcpage pctrl3.p_pcp_maxage
198 #define seg_pathr_empty_ahb pctrl3.p_athr_empty_ahb
199 #define seg_pathr_full_ahb pctrl3.p_athr_full_ahb
200 #define seg_pshrink_shift pctrl3.p_shrink_shft
201 #define seg_pmaxapurge_npages pctrl3.p_maxapurge_npages
202
203 #define P_HASHWIN_MASK (seg_phashsize_win - 1)
204 #define P_HASHWIRED_MASK (seg_phashsize_wired - 1)
205 #define P_BASESHIFT (6)
206
207 kthread_t *seg_pasync_thr;
208
209 extern struct seg_ops segvn_ops;
210 extern struct seg_ops segspt_shmops;
211
212 #define IS_PFLAGS_WIRED(flags) ((flags) & SEGP_FORCE_WIRED)
213 #define IS_PCP_WIRED(pcp) IS_PFLAGS_WIRED((pcp)->p_flags)
214
215 #define LBOLT_DELTA(t) ((ulong_t)(ddi_get_lbolt() - (t)))
216
217 #define PCP_AGE(pcp) LBOLT_DELTA((pcp)->p_lbolt)
218
219 /*
220 * htag0 argument can be a seg or amp pointer.
221 */
222 #define P_HASHBP(seg, htag0, addr, flags) \
223 (IS_PFLAGS_WIRED((flags)) ? \
224 ((struct seg_phash *)&seg_phashtab_wired[P_HASHWIRED_MASK & \
225 ((uintptr_t)(htag0) >> P_BASESHIFT)]) : \
226 (&seg_phashtab_win[P_HASHWIN_MASK & \
227 (((uintptr_t)(htag0) >> 3) ^ \
228 ((uintptr_t)(addr) >> ((flags & SEGP_PSHIFT) ? \
229 (flags >> 16) : page_get_shift((seg)->s_szc))))]))
230
|
189 #define seg_phashtab_wired pctrl1.p_htabwired
190 #define seg_pkmcache pctrl1.p_kmcache
191 #define seg_pmem_mtx pctrl2.p_mem_mtx
192 #define seg_plocked_window pctrl2.p_locked_win
193 #define seg_plocked pctrl2.p_locked
194 #define seg_pahcur pctrl2.p_ahcur
195 #define seg_pathr_on pctrl2.p_athr_on
196 #define seg_pahhead pctrl2.p_ahhead
197 #define seg_pmax_pcpage pctrl3.p_pcp_maxage
198 #define seg_pathr_empty_ahb pctrl3.p_athr_empty_ahb
199 #define seg_pathr_full_ahb pctrl3.p_athr_full_ahb
200 #define seg_pshrink_shift pctrl3.p_shrink_shft
201 #define seg_pmaxapurge_npages pctrl3.p_maxapurge_npages
202
203 #define P_HASHWIN_MASK (seg_phashsize_win - 1)
204 #define P_HASHWIRED_MASK (seg_phashsize_wired - 1)
205 #define P_BASESHIFT (6)
206
207 kthread_t *seg_pasync_thr;
208
209 extern const struct seg_ops segvn_ops;
210 extern const struct seg_ops segspt_shmops;
211
212 #define IS_PFLAGS_WIRED(flags) ((flags) & SEGP_FORCE_WIRED)
213 #define IS_PCP_WIRED(pcp) IS_PFLAGS_WIRED((pcp)->p_flags)
214
215 #define LBOLT_DELTA(t) ((ulong_t)(ddi_get_lbolt() - (t)))
216
217 #define PCP_AGE(pcp) LBOLT_DELTA((pcp)->p_lbolt)
218
219 /*
220 * htag0 argument can be a seg or amp pointer.
221 */
222 #define P_HASHBP(seg, htag0, addr, flags) \
223 (IS_PFLAGS_WIRED((flags)) ? \
224 ((struct seg_phash *)&seg_phashtab_wired[P_HASHWIRED_MASK & \
225 ((uintptr_t)(htag0) >> P_BASESHIFT)]) : \
226 (&seg_phashtab_win[P_HASHWIN_MASK & \
227 (((uintptr_t)(htag0) >> 3) ^ \
228 ((uintptr_t)(addr) >> ((flags & SEGP_PSHIFT) ? \
229 (flags >> 16) : page_get_shift((seg)->s_szc))))]))
230
|