Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../.././../../../../usr/include/vm/page_retire_impl.h
Real path: /usr/include/vm/page_retire_impl.h
Zurück
/* * Copyright (c) 2012, 2021, Oracle and/or its affiliates. */ #ifndef _VM_PAGE_RETIRE_IMPL_H #define _VM_PAGE_RETIRE_IMPL_H #include <sys/types.h> #include <sys/list.h> #include <vm/types.h> #ifdef __cplusplus extern "C" { #endif /* ------------------------------------------------------------------------- */ /* Private type definitions. Included here only so mdb dcmds can get at them */ #define PR_INVALID_HANDLE ((void *)NULL) /* Currently there are two hash levels: 4G (2^32) and 16M (2^24) */ #define PR_HASH_LEVELS 2 #define PR_HASH_LEVEL_SHIFT(lvl) ((lvl == 1) ? 32 : 24) #define PR_HASH_LEVEL_BYTES(lvl) (1ull << PR_HASH_LEVEL_SHIFT(lvl)) /* Number of hash buckets at each level. Must be a power of two */ #define PR_NUM_HASH_BUCKETS 1 #define PR_HASH(_pa, lvl) \ (((uint64_t)(_pa) >> PR_HASH_LEVEL_SHIFT(lvl)) & \ (PR_NUM_HASH_BUCKETS - 1)) /* This magic value lets you run /s on a handle pointer to see if it's valid */ #define PR_MAGIC ('P' << 24 | 'R' << 16 | 'H' << 8 | 0) struct pr_handle; typedef struct pr_hash_bucket { uint64_t prhb_magic; /* = "PRH\0" */ struct pr_hash_bucket *prhb_parent; uint_t prhb_refcnt; uint_t prhb_level; union { /* Level >= 1 */ struct pr_hash_bucket *prhb_u_children[PR_NUM_HASH_BUCKETS]; /* Level == 0 */ struct pr_handle *prhb_u_handles[PR_NUM_HASH_BUCKETS]; } prhb_u; #define prhb_child prhb_u.prhb_u_children #define prhb_handle prhb_u.prhb_u_handles } pr_hash_bucket_t; /* * Hash state flags for the handle. */ typedef enum { PRH_FLAGS_CREATING = 0x01, /* entry is being added to hash */ PRH_FLAGS_DELETING = 0x02, /* entry is being removed from hash */ PRH_FLAGS_EXCISE = 0x04 /* entry is marked for excision */ } prh_flags_t; /* * State flags for the handle. */ typedef enum { PRS_FLAGS_DISPATCHED = 0x01 /* entry has been dispatched to taskq */ } prs_flags_t; /* * Page type flags for the handle. */ typedef enum { PRT_FLAGS_VM2 = 0x0, PRT_FLAGS_VM1 = 0x1 } prt_flags_t; /* * Callback context flags for the handle. Used to deal with context-sensitive * operations, such as changing state of a handle from within a callback that * holds the state lock, and to ASSERT callbacks are not doing things that * they should not do. */ typedef enum { PRCTX_FLAGS_STATE_CALLBACK = 0x01, /* state walk callback ctx */ PRCTX_FLAGS_GLOBAL_CALLBACK = 0x02, /* global list walk ctx */ PRCTX_FLAGS_RANGE_CALLBACK = 0x04 /* range walk callback ctx */ } prctx_flags_t; typedef struct pr_handle { uint64_t prh_magic; /* = "PRH\0" */ paddr_t prh_pa; size_t prh_len; pr_state_t prh_state; pr_state_t prh_transtate; /* For state transitions in cb ctx */ prt_flags_t prh_pgtype; /* VM2 or VM1 managed page ? */ uint_t prh_ecc; /* Retire reason: one of PR_UE, */ /* PR_MCE, or PR_FMA */ uint_t prh_aux; /* PR_UE, PR_MCE, and/or PR_FMA */ uint_t prh_refcnt; kcondvar_t prh_cv; /* prh_refcnt went to zero */ prh_flags_t prh_flags; /* PRH_FLAGS_* protected by hash mtx */ prs_flags_t prh_sflags; /* PRS_FLAGS_* protected by state mtx */ prctx_flags_t prh_ctxflags; /* not protected by a lock */ /* Every handle is on the global list */ list_node_t prh_global_anchor; /* List of all handles in the same state */ list_node_t prh_state_anchor; /* Chain of handles in the same level 0 hash bucket */ struct pr_handle *prh_hash_chain; /* Back pointer to level 0 hash bucket that links to this handle */ pr_hash_bucket_t *prh_hash_bucket; #ifdef DEBUG /* Time of state transition */ hrtime_t prh_timestamp[PR_NUM_STATES]; #define PRH_NUM_REFERER 8 kthread_t *prh_hold_thread[PRH_NUM_REFERER]; caddr_t prh_hold_pc[PRH_NUM_REFERER]; hrtime_t prh_hold_time[PRH_NUM_REFERER]; kthread_t *prh_release_thread[PRH_NUM_REFERER]; caddr_t prh_release_pc[PRH_NUM_REFERER]; hrtime_t prh_release_time[PRH_NUM_REFERER]; #endif } pr_handle_t; #ifdef __cplusplus } #endif #endif /* _VM_PAGE_RETIRE_IMPL_H */