|
Motr
M0
|
Data Structures | |
| struct | chore_local |
| struct | locality_global |
| struct | m0_locality |
| struct | m0_locality_chore |
| struct | m0_locality_chore_ops |
Macros | |
| #define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_LIB |
| #define | LOC_FOR(idx_var, loc_var) |
| #define | LOC_ENDFOR } } while (0) |
| #define | CHORES_FOR(chvar) |
| #define | CHORES_ENDFOR m0_tl_endfor; } while (0) |
Enumerations | |
| enum | { M0_CHORE_L_MAGIC, M0_CHORE_L_HEAD_MAGIC, M0_CHORES_G_MAGIC, M0_CHORES_G_HEAD_MAGIC } |
| enum | { M0_LOCALITY_LOCKERS_NR = 256 } |
Functions | |
| M0_LOCKERS_DEFINE (M0_INTERNAL, m0_locality, lo_lockers) | |
| M0_TL_DESCR_DEFINE (chore_l, "chores-local", static, struct chore_local, lo_linkage, lo_magix, M0_CHORE_L_MAGIC, M0_CHORE_L_HEAD_MAGIC) | |
| M0_TL_DEFINE (chore_l, static, struct chore_local) | |
| M0_TL_DESCR_DEFINE (chores_g, "chores-global", static, struct m0_locality_chore, lc_linkage, lc_magix, M0_CHORES_G_MAGIC, M0_CHORES_G_HEAD_MAGIC) | |
| M0_TL_DEFINE (chores_g, static, struct m0_locality_chore) | |
| static struct locality_global * | loc_glob (void) |
| static int | loc_nr (void) |
| static void | chore_del (struct m0_locality *loc, struct m0_locality_chore *chore) |
| static int | chore_add (struct m0_locality *loc, struct m0_locality_chore *chore) |
| static void | chore_post (struct m0_locality *loc, struct m0_locality_chore *chore, void(*cb)(struct m0_sm_group *, struct m0_sm_ast *)) |
| static int | chore_add_all (struct m0_locality_chore *chore) |
| static void | chore_del_all (struct m0_locality_chore *chore) |
| static void | chore_add_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
| static void | chore_del_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
| static int | locality_data_alloc (int key) |
| static void | locality_data_free (int key) |
| static void | locality_data_free_all (void) |
| static int | ldata_alloc (struct m0_locality *loc, int key) |
| static void | ldata_free (struct m0_locality *loc, int key) |
| M0_INTERNAL void | m0_locality_init (struct m0_locality *loc, struct m0_sm_group *grp, struct m0_fom_domain *dom, size_t idx) |
| M0_INTERNAL void | m0_locality_fini (struct m0_locality *loc) |
| M0_INTERNAL struct m0_locality * | m0_locality_here (void) |
| M0_INTERNAL struct m0_locality * | m0_locality_get (uint64_t value) |
| M0_INTERNAL struct m0_locality * | m0_locality0_get (void) |
| M0_INTERNAL void | m0_locality_dom_set (struct m0_fom_domain *dom) |
| M0_INTERNAL void | m0_locality_dom_unset (struct m0_fom_domain *dom) |
| static void | locs_ast_handler (void *__unused) |
| static int | ast_thread_init (void *__unused) |
| M0_INTERNAL int | m0_localities_init (void) |
| M0_INTERNAL void | m0_localities_fini (void) |
| int | m0_locality_chore_init (struct m0_locality_chore *chore, const struct m0_locality_chore_ops *ops, void *datum, m0_time_t interval, size_t datasize) |
| void | m0_locality_chore_fini (struct m0_locality_chore *chore) |
| M0_INTERNAL void | m0_locality_chores_run (struct m0_locality *locality) |
| int | m0_locality_data_alloc (size_t nob, int(*ctor)(void *, void *), void(*dtor)(void *, void *), void *datum) |
| void | m0_locality_data_free (int key) |
| void * | m0_locality_data (int key) |
| void | m0_locality_data_iterate (int key, void(*func)(int idx, void *data, void *datum), void *datum) |
| static int | ctor_cb (void *arg) |
| static int | dtor_cb (void *arg) |
| int | m0_locality_call (struct m0_locality *loc, int(*cb)(void *), void *data) |
| M0_INTERNAL struct m0_fom_domain * | m0_fom_dom (void) |
| M0_LOCKERS_DECLARE (M0_EXTERN, m0_locality, M0_LOCALITY_LOCKERS_NR) | |
| void | m0_locality_chore_quit (struct m0_locality_chore *chore) |
Variables | |
| struct { | |
| size_t ld_nob | |
| int(* ld_ctor )(void *, void *) | |
| void(* ld_dtor )(void *, void *) | |
| void * ld_datum | |
| } | ldata [M0_LOCALITY_LOCKERS_NR] |
| #define CHORES_ENDFOR m0_tl_endfor; } while (0) |
Definition at line 124 of file locality.c.
| #define CHORES_FOR | ( | chvar | ) |
Definition at line 118 of file locality.c.
| #define LOC_ENDFOR } } while (0) |
Definition at line 116 of file locality.c.
| #define LOC_FOR | ( | idx_var, | |
| loc_var | |||
| ) |
Definition at line 109 of file locality.c.
| #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_LIB |
Definition at line 29 of file locality.c.
| anonymous enum |
| Enumerator | |
|---|---|
| M0_CHORE_L_MAGIC | |
| M0_CHORE_L_HEAD_MAGIC | |
| M0_CHORES_G_MAGIC | |
| M0_CHORES_G_HEAD_MAGIC | |
Definition at line 77 of file locality.c.
| anonymous enum |
| Enumerator | |
|---|---|
| M0_LOCALITY_LOCKERS_NR | |
Definition at line 51 of file locality.h.
|
static |
|
static |
Definition at line 386 of file locality.c.


|
static |
Definition at line 337 of file locality.c.


|
static |
Definition at line 397 of file locality.c.


|
static |
Definition at line 392 of file locality.c.


|
static |
Definition at line 360 of file locality.c.


|
static |
Definition at line 425 of file locality.c.


|
static |
Definition at line 369 of file locality.c.


|
static |
Definition at line 508 of file locality.c.


|
static |
Definition at line 518 of file locality.c.


|
static |
Definition at line 529 of file locality.c.


|
static |
Definition at line 548 of file locality.c.


|
static |
Definition at line 325 of file locality.c.


|
static |
Definition at line 330 of file locality.c.


|
static |
Definition at line 489 of file locality.c.


|
static |
Definition at line 501 of file locality.c.


|
static |
Definition at line 560 of file locality.c.


|
static |
Definition at line 190 of file locality.c.


| M0_INTERNAL struct m0_fom_domain * m0_fom_dom | ( | void | ) |
Definition at line 575 of file locality.c.


| M0_INTERNAL void m0_localities_fini | ( | void | ) |
| M0_INTERNAL int m0_localities_init | ( | void | ) |
| M0_INTERNAL struct m0_locality * m0_locality0_get | ( | void | ) |
| int m0_locality_call | ( | struct m0_locality * | loc, |
| int(*)(void *) | cb, | ||
| void * | data | ||
| ) |
Definition at line 570 of file locality.c.


| void m0_locality_chore_fini | ( | struct m0_locality_chore * | chore | ) |
Definition at line 296 of file locality.c.


| int m0_locality_chore_init | ( | struct m0_locality_chore * | chore, |
| const struct m0_locality_chore_ops * | ops, | ||
| void * | datum, | ||
| m0_time_t | interval, | ||
| size_t | datasize | ||
| ) |
Definition at line 270 of file locality.c.


| void m0_locality_chore_quit | ( | struct m0_locality_chore * | chore | ) |
| M0_INTERNAL void m0_locality_chores_run | ( | struct m0_locality * | locality | ) |
Definition at line 305 of file locality.c.


| void * m0_locality_data | ( | int | key | ) |
Definition at line 474 of file locality.c.


| int m0_locality_data_alloc | ( | size_t | nob, |
| int(*)(void *, void *) | ctor, | ||
| void(*)(void *, void *) | dtor, | ||
| void * | datum | ||
| ) |
Definition at line 442 of file locality.c.


| void m0_locality_data_free | ( | int | key | ) |
Definition at line 463 of file locality.c.


| void m0_locality_data_iterate | ( | int | key, |
| void(*)(int idx, void *data, void *datum) | func, | ||
| void * | datum | ||
| ) |
| M0_INTERNAL void m0_locality_dom_set | ( | struct m0_fom_domain * | dom | ) |
Starts using localities from the specified domain.
Definition at line 174 of file locality.c.


| M0_INTERNAL void m0_locality_dom_unset | ( | struct m0_fom_domain * | dom | ) |
Stops using the domain, falls back to a single locality.
Definition at line 182 of file locality.c.


| M0_INTERNAL void m0_locality_fini | ( | struct m0_locality * | loc | ) |
| M0_INTERNAL struct m0_locality * m0_locality_get | ( | uint64_t | value | ) |
Returns locality corresponding in some unspecified, but deterministic way to the supplied value.
Definition at line 156 of file locality.c.


| M0_INTERNAL struct m0_locality * m0_locality_here | ( | void | ) |
Returns locality corresponding to the core the call is made on.
Definition at line 146 of file locality.c.


| M0_INTERNAL void m0_locality_init | ( | struct m0_locality * | loc, |
| struct m0_sm_group * | grp, | ||
| struct m0_fom_domain * | dom, | ||
| size_t | idx | ||
| ) |
| M0_LOCKERS_DECLARE | ( | M0_EXTERN | , |
| m0_locality | , | ||
| M0_LOCALITY_LOCKERS_NR | |||
| ) |
| M0_LOCKERS_DEFINE | ( | M0_INTERNAL | , |
| m0_locality | , | ||
| lo_lockers | |||
| ) |
| M0_TL_DEFINE | ( | chore_l | , |
| static | , | ||
| struct chore_local | |||
| ) |
| M0_TL_DEFINE | ( | chores_g | , |
| static | , | ||
| struct m0_locality_chore | |||
| ) |
| M0_TL_DESCR_DEFINE | ( | chore_l | , |
| "chores-local" | , | ||
| static | , | ||
| struct chore_local | , | ||
| lo_linkage | , | ||
| lo_magix | , | ||
| M0_CHORE_L_MAGIC | , | ||
| M0_CHORE_L_HEAD_MAGIC | |||
| ) |
| M0_TL_DESCR_DEFINE | ( | chores_g | , |
| "chores-global" | , | ||
| static | , | ||
| struct m0_locality_chore | , | ||
| lc_linkage | , | ||
| lc_magix | , | ||
| M0_CHORES_G_MAGIC | , | ||
| M0_CHORES_G_HEAD_MAGIC | |||
| ) |
| int(* ld_ctor) (void *, void *) |
Definition at line 54 of file locality.c.
| void* ld_datum |
Definition at line 56 of file locality.c.
| void(* ld_dtor) (void *, void *) |
Definition at line 55 of file locality.c.
| size_t ld_nob |
Definition at line 53 of file locality.c.
| struct { ... } ldata[M0_LOCALITY_LOCKERS_NR] |