thread_config
zone->thread_id = vdo->thread_config.logical_threads[zone_number];
vdo->thread_config.logical_zone_count,
map->zone_count = vdo->thread_config.logical_zone_count;
if (VDO_ASSERT(thread_id < vdo->thread_config.thread_count,
vdo->thread_config.thread_count) != VDO_SUCCESS)
VDO_ASSERT_LOG_ONLY((vdo_get_callback_thread_id() == vdo->thread_config.cpu_thread),
(vdo_get_callback_thread_id() == vdo->thread_config.bio_ack_thread)),
process_release_callback, vdo->thread_config.cpu_thread,
thread_id_t journal_thread = vdo_from_data_vio(data_vio)->thread_config.journal_thread;
thread_id_t journal_thread = vdo_from_data_vio(data_vio)->thread_config.journal_thread;
thread_id_t packer_thread = vdo_from_data_vio(data_vio)->thread_config.packer_thread;
thread_id_t packer_thread = vdo_from_data_vio(data_vio)->thread_config.packer_thread;
thread_id_t cpu_thread = vdo_from_data_vio(data_vio)->thread_config.cpu_thread;
thread_id_t cpu_thread = vdo_from_data_vio(data_vio)->thread_config.cpu_thread;
vdo->thread_config.bio_ack_thread);
result = vdo_make_thread(vdo, vdo->thread_config.dedupe_thread, &uds_queue_type,
vdo->thread_config.dedupe_thread);
zone->thread_id = vdo->thread_config.hash_zone_threads[zone_number];
zone_count_t zone_count = vdo->thread_config.hash_zone_count;
vdo->thread_config.admin_thread, zones, NULL,
return vdo->thread_config.packer_thread;
return vdo->thread_config.cpu_thread;
return vdo->thread_config.journal_thread;
return vdo->thread_config.admin_thread;
vdo->thread_config.admin_thread))
for (id = 0; id < vdo->thread_config.thread_count; id++)
vdo->flusher->thread_id = vdo->thread_config.packer_thread;
completion->vdo->thread_config.packer_thread, NULL);
zone_count_t bio_threads = flusher->vdo->thread_config.bio_thread_count;
return vdo->thread_config.bio_threads[0];
return vdo->thread_config.bio_threads[flusher->bio_queue_rotor];
result = vdo_make_thread(vdo, vdo->thread_config.bio_threads[i],
bio_queue_data->queue = vdo->threads[vdo->thread_config.bio_threads[i]].queue;
vdo->thread_config.admin_thread, zones, NULL,
if (zone_number < vdo->thread_config.logical_zone_count - 1)
zone->thread_id = vdo->thread_config.logical_threads[zone_number];
allocation_zone_number = zone->thread_id % vdo->thread_config.physical_zone_count;
zone_count_t zone_count = vdo->thread_config.logical_zone_count;
packer->thread_id = vdo->thread_config.packer_thread;
zone->thread_id = vdo->thread_config.physical_threads[zone_number];
zone->next = &zones->zones[(zone_number + 1) % vdo->thread_config.physical_zone_count];
zone_count_t zone_count = vdo->thread_config.physical_zone_count;
struct thread_config *config = &vdo->thread_config;
journal->thread_id = vdo->thread_config.journal_thread;
continue_vio_after_io(vio, finish_journal_load, vdo->thread_config.admin_thread);
const struct thread_config *thread_config = &completion->vdo->thread_config;
thread_config->logical_threads[0] :
thread_config->admin_thread);
.thread_id = vdo->thread_config.physical_threads[zone],
const struct thread_config *thread_config = &depot->vdo->thread_config;
thread_config->journal_thread, depot,
if (thread_config->physical_zone_count > slab_count) {
thread_config->physical_zone_count,
vdo->thread_config.physical_zone_count,
depot->zone_count = vdo->thread_config.physical_zone_count;
vdo->thread_config.admin_thread);
vdo->thread_config.admin_thread);
for (id = 0; id < vdo->thread_config.thread_count; id++)
vdo->thread_config.admin_thread);
if (++thread_id == vdo->thread_config.dedupe_thread) {
if (thread_id >= vdo->thread_config.thread_count) {
vdo->thread_config.admin_thread, NULL);
vdo->thread_config.packer_thread,
vdo->thread_config.admin_thread, stats);
BUG_ON(thread_id >= thread->vdo->thread_config.thread_count);
for (zone = 0; zone < vdo->thread_config.logical_zone_count; zone++)
for (zone = 0; zone < vdo->thread_config.physical_zone_count; zone++)
static void uninitialize_thread_config(struct thread_config *config)
VDO_ASSERT_LOG_ONLY((vdo_get_callback_thread_id() == vdo->thread_config.admin_thread),
vdo->thread_config.logical_threads[logical_zone]),
vdo->thread_config.physical_threads[physical_zone]),
memset(config, 0, sizeof(struct thread_config));
static void assign_thread_ids(struct thread_config *config,
struct thread_config *config)
static void get_thread_name(const struct thread_config *thread_config,
if (thread_id == thread_config->journal_thread) {
if (thread_config->packer_thread == thread_id) {
} else if (thread_id == thread_config->admin_thread) {
} else if (thread_id == thread_config->packer_thread) {
} else if (thread_id == thread_config->dedupe_thread) {
} else if (thread_id == thread_config->bio_ack_thread) {
} else if (thread_id == thread_config->cpu_thread) {
if (get_zone_thread_name(thread_config->logical_threads,
thread_config->logical_zone_count,
if (get_zone_thread_name(thread_config->physical_threads,
thread_config->physical_zone_count,
if (get_zone_thread_name(thread_config->hash_zone_threads,
thread_config->hash_zone_count,
if (get_zone_thread_name(thread_config->bio_threads,
thread_config->bio_thread_count,
get_thread_name(&vdo->thread_config, thread_id, queue_name, sizeof(queue_name));
result = initialize_thread_config(config->thread_counts, &vdo->thread_config);
config->thread_counts.hash_zones, vdo->thread_config.thread_count);
result = vdo_allocate(vdo->thread_config.thread_count,
result = vdo_make_thread(vdo, vdo->thread_config.admin_thread,
result = vdo_make_thread(vdo, vdo->thread_config.bio_ack_thread,
result = vdo_make_thread(vdo, vdo->thread_config.cpu_thread, &cpu_q_type,
for (i = 0; i < vdo->thread_config.thread_count; i++)
for (i = 0; i < vdo->thread_config.thread_count; i++) {
uninitialize_thread_config(&vdo->thread_config);
result = VDO_ASSERT(thread_id != vdo->thread_config.dedupe_thread,
struct thread_config thread_config;
return vio->completion.vdo->thread_config.bio_threads[vio->bio_zone];