| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | |
| 3 | #ifndef DBENGINE_PDC_H |
| 4 | #define DBENGINE_PDC_H |
| 5 | |
| 6 | #include "../engine/rrdengine.h" |
| 7 | |
| 8 | struct rrdeng_cmd; |
| 9 | |
| 10 | #define PDCJudyLIns JudyLIns |
| 11 | #define PDCJudyLGet JudyLGet |
| 12 | #define PDCJudyLFirst JudyLFirst |
| 13 | #define PDCJudyLNext JudyLNext |
| 14 | #define PDCJudyLLast JudyLLast |
| 15 | #define PDCJudyLPrev JudyLPrev |
| 16 | #define PDCJudyLFirstThenNext JudyLFirstThenNext |
| 17 | #define PDCJudyLLastThenPrev JudyLLastThenPrev |
| 18 | #define PDCJudyLFreeArray JudyLFreeArray |
| 19 | |
| 20 | typedef struct extent_page_details_list EPDL; |
| 21 | typedef void (*execute_extent_page_details_list_t)(struct rrdengine_instance *ctx, EPDL *epdl, enum storage_priority priority); |
| 22 | void pdc_to_epdl_router(struct rrdengine_instance *ctx, struct page_details_control *pdc, execute_extent_page_details_list_t exec_first_extent_list, execute_extent_page_details_list_t exec_rest_extent_list); |
| 23 | void epdl_find_extent_and_populate_pages(struct rrdengine_instance *ctx, EPDL *epdl, bool worker); |
| 24 | |
| 25 | struct aral_statistics *pdc_aral_stats(void); |
| 26 | struct aral_statistics *pd_aral_stats(void); |
| 27 | struct aral_statistics *epdl_aral_stats(void); |
| 28 | struct aral_statistics *deol_aral_stats(void); |
| 29 | struct aral_statistics *epdl_extent_aral_stats(void); |
| 30 | |
| 31 | size_t extent_buffer_cache_size(void); |
| 32 | |
| 33 | void pdc_init(void); |
| 34 | void page_details_init(void); |
| 35 | void epdl_init(void); |
| 36 | void deol_init(void); |
| 37 | void epdl_extent_init(void); |
| 38 | void extent_buffer_cleanup1(void); |
| 39 | |
| 40 | void epdl_cmd_dequeued(void *epdl_ptr); |
| 41 | void epdl_cmd_queued(void *epdl_ptr, struct rrdeng_cmd *cmd); |
| 42 | |
| 43 | struct extent_buffer { |
| 44 | size_t bytes; |
| 45 | |
| 46 | struct { |
| 47 | struct extent_buffer *prev; |
| 48 | struct extent_buffer *next; |
| 49 | } cache; |
| 50 | |
| 51 | uint8_t data[]; |
| 52 | }; |
| 53 | |
| 54 | void extent_buffer_init(void); |
| 55 | struct extent_buffer *extent_buffer_get(size_t size); |
| 56 | void extent_buffer_release(struct extent_buffer *eb); |
| 57 | |
| 58 | #endif // DBENGINE_PDC_H |