A brief file description. More...
#include "P_ClusterCache.h"
Go to the source code of this file.
A brief file description.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file P_ClusterInternal.h.
#define ALIGN_DOUBLE | ( | _p | ) | ((((uintptr_t) (_p)) + 7) & ~7) |
Definition at line 42 of file P_ClusterInternal.h.
#define ALLOC_DATA_MAGIC 0xA5 |
Definition at line 53 of file P_ClusterInternal.h.
Referenced by ClusterControl::free_data(), ClusterProcessor::free_remote_data(), and ClusterControl::real_alloc_data().
#define ALLOCA_DOUBLE | ( | _sz | ) | ALIGN_DOUBLE(alloca((_sz) + 8)) |
Definition at line 43 of file P_ClusterInternal.h.
#define CL_NOTE "cluster_note" |
Definition at line 118 of file P_ClusterInternal.h.
Referenced by ClusterHandler::build_initial_vector(), ClusterAccept::ClusterAcceptMachine(), ClusterHandler::connectClusterEvent(), ClusterHandler::machine_down(), and ClusterHandler::startClusterEvent().
#define CL_PROTO "cluster_proto" |
Definition at line 120 of file P_ClusterInternal.h.
Referenced by ClusterHandler::build_freespace_descriptors(), ClusterHandler::update_channels_written(), and ClusterHandler::valid_for_freespace_write().
#define CL_TRACE "cluster_trace" |
Definition at line 121 of file P_ClusterInternal.h.
Referenced by ClusterHandler::alloc_channel(), ClusterHandler::complete_channel_read(), ClusterHandler::do_open_local_requests(), ClusterHandler::free_channel(), ClusterVConnection::start(), ClusterHandler::update_channels_partial_read(), and ClusterHandler::update_channels_written().
#define CL_WARN "cluster_warn" |
Definition at line 119 of file P_ClusterInternal.h.
Referenced by ClusterHandler::build_initial_vector().
#define CLUSTER_ACTIVE 1 |
Definition at line 107 of file P_ClusterInternal.h.
#define CLUSTER_BUCKETS 64 |
Definition at line 62 of file P_ClusterInternal.h.
Referenced by cluster_reschedule_offset(), and ClusterHandler::process_write().
#define CLUSTER_BUMP_LENGTH 1 |
Definition at line 82 of file P_ClusterInternal.h.
#define CLUSTER_BUMP_NO_REMOVE -1 |
Definition at line 496 of file P_ClusterInternal.h.
#define CLUSTER_CHANNEL_INACTIVITY_TIMEOUT (10 * HRTIME_SECONDS(60)) |
Definition at line 99 of file P_ClusterInternal.h.
#define CLUSTER_CONFIG 1 |
Definition at line 115 of file P_ClusterInternal.h.
Referenced by machine_config_change(), and ClusterProcessor::start().
#define CLUSTER_CONNECT_RETRY HRTIME_MSECONDS(20) |
Definition at line 91 of file P_ClusterInternal.h.
Referenced by ClusterVConnection::start().
#define CLUSTER_CONNECT_TIMEOUT HRTIME_SECONDS(10) |
Definition at line 89 of file P_ClusterInternal.h.
#define CLUSTER_CONTROL_CHANNEL 0 |
Definition at line 74 of file P_ClusterInternal.h.
Referenced by ClusterHandler::build_initial_vector(), ClusterHandler::free_locks(), ClusterHandler::get_read_locks(), ClusterHandler::get_write_locks(), ClusterHandler::process_freespace_msgs(), ClusterHandler::update_channels_partial_read(), ClusterHandler::update_channels_read(), and ClusterHandler::update_channels_written().
#define CLUSTER_DELAY_BETWEEN_WRITES HRTIME_MSECONDS(10) |
Definition at line 93 of file P_ClusterInternal.h.
#define CLUSTER_INITIAL_PRIORITY CLUSTER_PHASES |
Definition at line 79 of file P_ClusterInternal.h.
#define CLUSTER_MAX_RUN_TIME HRTIME_MSECONDS(100) |
Definition at line 66 of file P_ClusterInternal.h.
Referenced by ClusterHandler::process_write().
#define CLUSTER_MAX_THREAD_STEAL_TIME HRTIME_MSECONDS(10) |
Definition at line 68 of file P_ClusterInternal.h.
Referenced by ClusterHandler::process_write().
#define CLUSTER_MEMBER_DELAY HRTIME_SECONDS(1) |
Definition at line 83 of file P_ClusterInternal.h.
Referenced by ClusterProcessor::connect(), ClusterHandler::connectClusterEvent(), and ClusterHandler::protoZombieEvent().
#define CLUSTER_NOT_ACTIVE 0 |
Definition at line 108 of file P_ClusterInternal.h.
#define CLUSTER_PERIOD HRTIME_MSECONDS(10) |
Definition at line 63 of file P_ClusterInternal.h.
Referenced by ClusterHandler::startClusterEvent().
#define CLUSTER_PHASES 1 |
Definition at line 77 of file P_ClusterInternal.h.
#define CLUSTER_RETRY HRTIME_MSECONDS(10) |
Definition at line 92 of file P_ClusterInternal.h.
#define CLUSTER_STATS 1 |
Definition at line 39 of file P_ClusterInternal.h.
Referenced by ClusterHandler::add_small_controlmsg_descriptors().
#define CLUSTER_THREAD_STEALING 1 |
Definition at line 37 of file P_ClusterInternal.h.
#define CLUSTER_TOMCAT 1 |
Definition at line 38 of file P_ClusterInternal.h.
#define COMPLETION_CALLBACK_PERIOD HRTIME_MSECONDS(10) |
Definition at line 103 of file P_ClusterInternal.h.
Referenced by ClusterHandler::startClusterEvent().
#define CONTROL_DATA (128*1024) |
Definition at line 50 of file P_ClusterInternal.h.
Referenced by ClusterHandler::build_controlmsg_descriptors(), and ClusterState::ClusterState().
#define DOT_SEPARATED | ( | _x | ) |
((unsigned char*)&(_x))[0], ((unsigned char*)&(_x))[1], \ ((unsigned char*)&(_x))[2], ((unsigned char*)&(_x))[3]
Definition at line 215 of file P_ClusterInternal.h.
#define DOUBLE_ALIGN | ( | _x | ) | ((((uintptr_t)_x)+7)&~7) |
#define enter_exit | ( | _x, | ||
_y | ||||
) |
Definition at line 212 of file P_ClusterInternal.h.
Referenced by ClusterHandler::build_freespace_descriptors(), and ClusterHandler::build_write_descriptors().
#define FORCE_CLOSE_ON_OPEN_CHANNEL -2 |
Definition at line 111 of file P_ClusterInternal.h.
Referenced by ClusterHandler::close_ClusterVConnection().
#define LAST_DEDICATED_CHANNEL 0 |
Definition at line 75 of file P_ClusterInternal.h.
Referenced by ClusterHandler::check_channel(), ClusterHandler::compute_active_channels(), and ClusterHandler::free_channel().
#define MACHINE_CONFIG 0 |
Definition at line 114 of file P_ClusterInternal.h.
Referenced by machine_config_change(), and ClusterProcessor::start().
#define MAGIC_COUNT | ( | _x | ) |
(0xBADBAD ^ ~(uint32_t)_x.msg.count \ ^ ~(uint32_t)_x.msg.descriptor_cksum \ ^ ~(uint32_t)_x.msg.control_bytes_cksum \ ^ ~(uint32_t)_x.msg.unused \ ^ ~((uint32_t)_x.msg.control_bytes << 16) ^_x.sequence_number)
Definition at line 131 of file P_ClusterInternal.h.
Referenced by ClusterHandler::process_read(), and ClusterHandler::process_write().
#define MAX_CHANNELS ((32*1024) - 1) |
Definition at line 72 of file P_ClusterInternal.h.
Referenced by ClusterHandler::check_channel().
#define MAX_COMPLETION_CALLBACK_EVENTS 16 |
Definition at line 104 of file P_ClusterInternal.h.
Referenced by ClusterHandler::startClusterEvent().
#define MAX_FAST_CONTROL_MESSAGE 504 |
Definition at line 126 of file P_ClusterInternal.h.
Referenced by ClusterControl::fast_data().
#define MAX_TCOUNT 128 |
Definition at line 49 of file P_ClusterInternal.h.
Referenced by ClusterHandler::build_controlmsg_descriptors(), ClusterHandler::build_freespace_descriptors(), ClusterHandler::build_write_descriptors(), ClusterState::ClusterState(), and ClusterHandler::get_read_locks().
#define MIN_CHANNELS 4096 |
Definition at line 71 of file P_ClusterInternal.h.
#define MISS_TEST 0 |
Definition at line 143 of file P_ClusterInternal.h.
#define READ_BANK_BUF_INDEX (DEFAULT_BUFFER_SIZES-1) |
Definition at line 52 of file P_ClusterInternal.h.
#define READ_BANK_BUF_SIZE DEFAULT_MAX_BUFFER_SIZE |
Definition at line 51 of file P_ClusterInternal.h.
#define READ_LOCK_SPIN_COUNT 1 |
Definition at line 54 of file P_ClusterInternal.h.
Referenced by ClusterHandler::build_initial_vector(), ClusterHandler::finish_delayed_reads(), ClusterHandler::get_read_locks(), and ClusterHandler::valid_for_freespace_write().
#define SMALL_CONTROL_MESSAGE MAX_FAST_CONTROL_MESSAGE |
Definition at line 127 of file P_ClusterInternal.h.
Referenced by ClusterHandler::build_controlmsg_descriptors().
#define TEST_ENTER_EXIT 0 |
Definition at line 150 of file P_ClusterInternal.h.
#define TEST_ENTER_EXIT 0 |
Definition at line 150 of file P_ClusterInternal.h.
#define TEST_PARTIAL_READS 0 |
Definition at line 145 of file P_ClusterInternal.h.
#define TEST_PARTIAL_WRITES 0 |
Definition at line 144 of file P_ClusterInternal.h.
#define TEST_READ_LOCK_MIGHT_FAIL false |
Definition at line 188 of file P_ClusterInternal.h.
#define TEST_READ_LOCKS_MISSED 0 |
Definition at line 147 of file P_ClusterInternal.h.
#define TEST_TIMING 0 |
Definition at line 146 of file P_ClusterInternal.h.
#define TEST_WRITE_LOCK_MIGHT_FAIL false |
Definition at line 193 of file P_ClusterInternal.h.
#define TEST_WRITE_LOCKS_MISSED 0 |
Definition at line 148 of file P_ClusterInternal.h.
#define TIMEOUT_TESTS | ( | _x, | ||
_y | ||||
) |
Definition at line 174 of file P_ClusterInternal.h.
#define TTEST | ( | _x | ) |
Definition at line 173 of file P_ClusterInternal.h.
#define TTTEST | ( | _x | ) |
Definition at line 172 of file P_ClusterInternal.h.
#define WRITE_LOCK_SPIN_COUNT 1 |
Definition at line 55 of file P_ClusterInternal.h.
Referenced by ClusterHandler::get_write_locks(), and ClusterHandler::valid_for_data_write().
#define WRITE_MESSAGE_ALREADY_BUILT -1 |
Definition at line 129 of file P_ClusterInternal.h.
typedef int(ClusterHandler::* ClusterContHandler)(int, void *) |
Definition at line 479 of file P_ClusterInternal.h.
typedef int(ClusterVConnection::* ClusterVConnHandler)(int, void *) |
Definition at line 485 of file P_ClusterInternal.h.
typedef int(OutgoingControl::* OutgoingCtrlHandler)(int, void *) |
Definition at line 482 of file P_ClusterInternal.h.
int64_t bytes_IOBufferBlockList | ( | IOBufferBlock * | , | |
int64_t | ||||
) |
Definition at line 184 of file ClusterLib.cc.
References IOBufferBlock::next, IOBufferBlock::read_avail(), and IOBufferBlock::write_avail().
Referenced by ClusterState::build_do_io_vector(), ClusterHandler::build_initial_vector(), CacheContinuation::replyOpEvent(), OutgoingControl::set_data(), CacheContinuation::setupReadBufTunnel(), and ClusterHandler::valid_for_data_write().
void ClearHighBit | ( | int * | val | ) | [inline] |
Definition at line 442 of file P_ClusterInternal.h.
Referenced by ClusterHandler::process_incoming_callouts().
IOBufferBlock* clone_IOBufferBlockList | ( | IOBufferBlock * | , | |
int | , | |||
int | , | |||
IOBufferBlock ** | ||||
) |
Definition at line 90 of file ClusterLib.cc.
References IOBufferBlock::clone(), IOBufferBlock::consume(), IOBufferBlock::fill(), ink_release_assert, IOBufferBlock::next, and IOBufferBlock::read_avail().
Referenced by ClusterHandler::valid_for_data_write(), ClusterHandler::valid_for_freespace_write(), and CacheContinuation::VCdataRead().
void cluster_bump | ( | ClusterHandler * | , | |
ClusterVConnectionBase * | , | |||
ClusterVConnState * | , | |||
int | ||||
) |
void cluster_disable | ( | ClusterHandler * | , | |
ClusterVConnection * | , | |||
ClusterVConnState * | ||||
) |
void cluster_lower_priority | ( | ClusterHandler * | , | |
ClusterVConnState * | ||||
) |
void cluster_raise_priority | ( | ClusterHandler * | , | |
ClusterVConnState * | ||||
) |
void cluster_reschedule | ( | ClusterHandler * | , | |
ClusterVConnection * | , | |||
ClusterVConnState * | ||||
) |
void cluster_reschedule_offset | ( | ClusterHandler * | , | |
ClusterVConnection * | , | |||
ClusterVConnState * | , | |||
int | ||||
) |
Definition at line 55 of file ClusterLib.cc.
References CLUSTER_BUCKETS, ClusterVC_enqueue_read(), ClusterVC_enqueue_write(), ClusterVC_remove_read(), ClusterVC_remove_write(), ClusterHandlerBase::cur_vcs, ClusterVConnState::queue, ClusterVConnectionBase::read, ClusterHandlerBase::read_vcs, ClusterVConnectionBase::write, and ClusterHandlerBase::write_vcs.
Referenced by ClusterHandler::build_freespace_descriptors(), and ClusterHandler::build_write_descriptors().
void cluster_schedule | ( | ClusterHandler * | , | |
ClusterVConnection * | , | |||
ClusterVConnState * | ||||
) |
Definition at line 38 of file ClusterLib.cc.
void cluster_set_priority | ( | ClusterHandler * | , | |
ClusterVConnState * | , | |||
int | ||||
) |
void cluster_update_priority | ( | ClusterHandler * | , | |
ClusterVConnection * | , | |||
ClusterVConnState * | , | |||
int64_t | , | |||
int64_t | ||||
) |
void clusterAPI_init | ( | ) |
Definition at line 277 of file ClusterAPI.cc.
References ET_CALL, eventProcessor, HRTIME_SECONDS, ink_atomiclist_init(), ink_release_assert, MUTEX_TRY_LOCK, new_ProxyMutex(), EventProcessor::schedule_every(), and this_ethread().
Referenced by ClusterProcessor::init().
void clusterVCAllocator_free | ( | ClusterVConnection * | vc | ) |
Definition at line 50 of file ClusterVConnection.cc.
References ClusterVConnectionBase::action_, clusterVCAllocator, ClusterVConnection::free(), ClusterVConnection::in_vcs, Continuation::mutex, and ClusterVConnection::type.
Referenced by ClusterHandler::close_ClusterVConnection(), ClusterProcessor::connect_local(), ClusterProcessor::open_local(), and ClusterVConnection::start().
IOBufferBlock* consume_IOBufferBlockList | ( | IOBufferBlock * | , | |
int64_t | ||||
) |
Definition at line 152 of file ClusterLib.cc.
References IOBufferBlock::clone(), IOBufferBlock::consume(), IOBufferBlock::fill(), ink_release_assert, IOBufferBlock::next, and IOBufferBlock::read_avail().
Referenced by ClusterHandler::build_initial_vector().
void do_machine_config_change | ( | void * | , | |
const char * | ||||
) |
Definition at line 220 of file ClusterConfig.cc.
References machine_config_change(), REC_ReadConfigString, RecData::rec_string, and RECD_STRING.
Referenced by ClusterProcessor::start().
int IsHighBitSet | ( | int * | val | ) | [inline] |
Definition at line 448 of file P_ClusterInternal.h.
Referenced by ClusterHandler::process_incoming_callouts().
Definition at line 182 of file ClusterConfig.cc.
References cluster_config, CLUSTER_CONFIG, free_MachineList(), MACHINE_CONFIG, machines_config, make_cluster_connections(), read_MachineList(), and RecData::rec_string.
Referenced by do_machine_config_change(), and ClusterProcessor::start().
void machine_offline_APIcallout | ( | int | ) |
Definition at line 419 of file ClusterAPI.cc.
References ink_atomiclist_push(), IP_TO_NODE_HANDLE, and NODE_OFFLINE.
Referenced by ClusterHandler::machine_down().
void machine_online_APIcallout | ( | int | ) |
Definition at line 408 of file ClusterAPI.cc.
References ink_atomiclist_push(), IP_TO_NODE_HANDLE, and NODE_ONLINE.
Referenced by ClusterHandler::startClusterEvent().
void SetHighBit | ( | int * | val | ) | [inline] |
Definition at line 436 of file P_ClusterInternal.h.
Referenced by ClusterHandler::process_small_control_msgs().
int cluster_port |
Definition at line 32 of file ClusterConfig.cc.
Referenced by ClusterAccept::ClusterAcceptEvent(), ClusterHandler::connectClusterEvent(), ClusterConfiguration::find(), ClusterProcessor::init(), ClusterProcessor::start(), and ClusterHandler::startClusterEvent().