struct delta_list { /* The offset of the delta list start, in bits */
u64 start; /* The number of bits in the delta list */
u16 size; /* Where the last search "found" the key, in bits */
u16 save_offset; /* The key for the record just before save_offset */
u32 save_key;
};
struct delta_zone { /* The delta list memory */
u8 *memory; /* The delta list headers */ struct delta_list *delta_lists; /* Temporary starts of delta lists */
u64 *new_offsets; /* Buffered writer for saving an index */ struct buffered_writer *buffered_writer; /* The size of delta list memory */
size_t size; /* Nanoseconds spent rebalancing */
ktime_t rebalance_time; /* Number of memory rebalances */
u32 rebalance_count; /* The number of bits in a stored value */
u8 value_bits; /* The number of bits in the minimal key code */
u16 min_bits; /* The number of keys used in a minimal code */
u32 min_keys; /* The number of keys used for another code bit */
u32 incr_keys; /* The number of records in the index */
u64 record_count; /* The number of collision records */
u64 collision_count; /* The number of records removed */
u64 discard_count; /* The number of UDS_OVERFLOW errors detected */
u64 overflow_count; /* The index of the first delta list */
u32 first_list; /* The number of delta lists */
u32 list_count; /* Tag belonging to this delta index */
u8 tag;
} __aligned(L1_CACHE_BYTES);
struct delta_list_save_info { /* Tag identifying which delta index this list is in */
u8 tag; /* Bit offset of the start of the list data */
u8 bit_offset; /* Number of bytes of list data */
u16 byte_count; /* The delta list number within the delta index */
u32 index;
} __packed;
struct delta_index { /* The zones */ struct delta_zone *delta_zones; /* The number of zones */ unsignedint zone_count; /* The number of delta lists */
u32 list_count; /* Maximum lists per zone */
u32 lists_per_zone; /* Total memory allocated to this index */
size_t memory_size; /* The number of non-empty lists at load time per zone */
u32 load_lists[MAX_ZONES]; /* True if this index is mutable */ boolmutable; /* Tag belonging to this delta index */
u8 tag;
};
/* *Adelta_index_pagedescribesasinglepageofachapterindex.Thedelta_indexfieldallowsthe *pagetobetreatedasanimmutabledelta_index.Weusethedelta_zonefieldtotreatthechapter *indexpageasasinglezoneindex,andwithouttheneedtodoanadditionalmemoryallocation.
*/ struct delta_index_page { struct delta_index delta_index; /* These values are loaded from the delta_page_header */
u32 lowest_list_number;
u32 highest_list_number;
u64 virtual_chapter_number; /* This structure describes the single zone of a delta index page. */ struct delta_zone delta_zone;
};
/* *Notesonthedelta_index_entries: * *Thefieldsdocumentedas"public"canbereadbyanycodethatusesadelta_index.Thefields *documentedas"private"carryinformationbetweendelta_indexmethodcallsandshouldnotbe *usedoutsidethedelta_indexmodule. * *(1)Thedelta_index_entryisusedlikeaniteratorwhensearchingadeltalist. * *(2)Itisalsotheresultofasuccessfulsearchandcanbeusedtorefertotheelementfound *bythesearch. * *(3)Itisalsotheresultofanunsuccessfulsearchandcanbeusedtorefertotheinsertion *pointforanewrecord. * *(4)Ifat_endistrue,thedelta_listentrycanonlybeusedastheinsertionpointforanew *recordattheendofthelist. * *(5)Ifat_endisfalseandis_collisionistrue,thedelta_listentryfieldsrefertoa *collisionentryinthelist,andthedelta_listentrycanbeusedasareferencetothis *entry. * *(6)Ifat_endisfalseandis_collisionisfalse,thedelta_listentryfieldsrefertoa *non-collisionentryinthelist.Suchdelta_listentriescanbeusedasareferencetoa *foundentry,oraninsertionpointforanon-collisionentrybeforethisentry,oran *insertionpointforacollisionentrythatcollideswiththisentry.
*/ struct delta_index_entry { /* Public fields */ /* The key for this entry */
u32 key; /* We are after the last list entry */ bool at_end; /* This record is a collision */ bool is_collision;
/* Private fields */ /* This delta list overflowed */ bool list_overflow; /* The number of bits used for the value */
u8 value_bits; /* The number of bits used for the entire entry */
u16 entry_bits; /* The delta index zone */ struct delta_zone *delta_zone; /* The delta list containing the entry */ struct delta_list *delta_list; /* The delta list number */
u32 list_number; /* Bit offset of this entry within the list */
u16 offset; /* The delta between this and previous entry */
u32 delta; /* Temporary delta list for immutable indices */ struct delta_list temp_delta_list;
};
struct delta_index_stats { /* Number of bytes allocated */
size_t memory_allocated; /* Nanoseconds spent rebalancing */
ktime_t rebalance_time; /* Number of memory rebalances */
u32 rebalance_count; /* The number of records in the index */
u64 record_count; /* The number of collision records */
u64 collision_count; /* The number of records removed */
u64 discard_count; /* The number of UDS_OVERFLOW errors detected */
u64 overflow_count; /* The number of delta lists */
u32 list_count;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.