A brief file description. More...
#include "P_AIO.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 AIO.cc.
#define MAX_DISKS_POSSIBLE 100 |
Definition at line 34 of file AIO.cc.
Referenced by ink_aio_init().
static AIO_Reqs* aio_init_fildes | ( | int | fildes, | |
int | fromAPI = 0 | |||
) | [static] |
Definition at line 218 of file AIO.cc.
References AIO_Reqs::aio_cond, AIO_Reqs::aio_mutex, AIO_Reqs::aio_temp_list, api_config_threads_per_disk, ats_malloc(), cache_config_threads_per_disk, eventProcessor, AIO_Reqs::filedes, AIO_Reqs::index, ink_assert, ink_atomiclist_init(), ink_cond_init(), ink_mutex_init(), MAX_THREAD_NAME_LENGTH, REC_ReadConfigInteger, EventProcessor::spawn_thread(), and thread_is_created.
Referenced by aio_queue_req().
static void aio_insert | ( | AIOCallback * | op, | |
AIO_Reqs * | req | |||
) | [static] |
Definition at line 272 of file AIO.cc.
References AIO_LOWEST_PRIORITY, ink_aiocb::aio_reqprio, AIOCallback::aiocb, and AIO_Reqs::queued.
Referenced by aio_move(), and aio_queue_req().
static void aio_move | ( | AIO_Reqs * | req | ) | [static] |
Definition at line 303 of file AIO.cc.
References aio_insert(), AIO_Reqs::aio_temp_list, and ink_atomiclist_popall().
Referenced by aio_queue_req(), and aio_thread_main().
static void aio_queue_req | ( | AIOCallbackInternal * | op, | |
int | fromAPI = 0 | |||
) | [static] |
Definition at line 327 of file AIO.cc.
References AIO_Reqs::aio_cond, ink_aiocb::aio_fildes, aio_init_fildes(), aio_insert(), aio_move(), AIO_Reqs::aio_mutex, AIOCallbackInternal::aio_req, AIO_Reqs::aio_temp_list, AIOCallback::aiocb, AIO_Reqs::filedes, INK_ATOMICLIST_EMPTY, ink_atomiclist_push(), ink_cond_signal(), ink_mutex_acquire(), ink_mutex_release(), ink_mutex_try_acquire(), insert_mutex, and AIO_Reqs::requests_queued.
Referenced by ink_aio_read(), and ink_aio_write().
static int aio_stats_cb | ( | const char * | , | |
RecDataT | data_type, | |||
RecData * | data, | |||
RecRawStatBlock * | rsb, | |||
int | id | |||
) | [static] |
Definition at line 66 of file AIO.cc.
References aio_bytes_read, aio_bytes_written, aio_num_read, aio_num_write, AIO_STAT_KB_READ_PER_SEC, AIO_STAT_KB_WRITE_PER_SEC, AIO_STAT_READ_PER_SEC, AIO_STAT_WRITE_PER_SEC, ink_assert, ink_get_hrtime(), ink_hrtime_to_msec(), RecData::rec_float, RecGetGlobalRawStatCount(), RecGetGlobalRawStatSum(), RecSetGlobalRawStatCount(), and RecSetGlobalRawStatSum().
Referenced by ink_aio_init().
void * aio_thread_main | ( | void * | arg | ) | [static] |
Definition at line 485 of file AIO.cc.
References AIOCallback::action, aio_bytes_read, aio_bytes_written, AIO_CALLBACK_THREAD_AIO, AIO_CALLBACK_THREAD_ANY, AIO_Reqs::aio_cond, AIO_EVENT_DONE, ink_aiocb::aio_fildes, aio_move(), AIO_Reqs::aio_mutex, aio_num_read, aio_num_write, AIO_Reqs::aio_temp_list, AIOCallback::aiocb, cache_op(), Action::cancelled, Action::continuation, eventProcessor, Continuation::handleEvent(), HRTIME_MSECONDS, INK_ATOMICLIST_EMPTY, ink_cond_timedwait(), ink_get_hrtime(), ink_hrtime_to_timespec(), ink_mutex_acquire(), ink_mutex_release(), LIO_WRITE, Action::mutex, Continuation::mutex, MUTEX_LOCK, net_config_poll_timeout, AIOThreadInfo::req, EventProcessor::schedule_imm(), EThread::schedule_imm_signal(), EventProcessor::schedule_imm_signal(), and AIOCallback::thread.
Referenced by AIOThreadInfo::start().
static int cache_op | ( | AIOCallbackInternal * | op | ) | [inline, static] |
Definition at line 399 of file AIO.cc.
References a, ink_aiocb::aio_buf, ink_aiocb::aio_fildes, ink_aiocb::aio_lio_opcode, ink_aiocb::aio_nbytes, ink_aiocb::aio_offset, AIOCallback::aio_result, AIOCallback::aiocb, ink_assert, LIO_READ, AIOCallback::then, and Warning.
Referenced by aio_thread_main(), ink_aio_read(), and ink_aio_write().
void ink_aio_init | ( | ModuleVersion | v | ) |
Definition at line 147 of file AIO.cc.
References AIO_MODULE_VERSION, AIO_STAT_COUNT, AIO_STAT_KB_READ_PER_SEC, AIO_STAT_KB_WRITE_PER_SEC, AIO_STAT_READ_PER_SEC, AIO_STAT_WRITE_PER_SEC, aio_stats_cb(), cache_config_threads_per_disk, checkModuleVersion(), ink_mutex_init(), ink_release_assert, insert_mutex, MAX_DISKS_POSSIBLE, REC_ReadConfigInteger, RecAllocateRawStatBlock(), RECD_FLOAT, RECP_PERSISTENT, RecRegisterRawStat, and RECT_PROCESS.
Referenced by main().
int ink_aio_read | ( | AIOCallback * | op, | |
int | fromAPI | |||
) |
Definition at line 428 of file AIO.cc.
References AIOCallback::action, AIO_EVENT_DONE, ink_aiocb::aio_lio_opcode, aio_queue_req(), AIOCallback::aiocb, cache_op(), Action::continuation, Continuation::handleEvent(), ink_assert, this_ethread(), AIOCallback::thread, and Warning.
Referenced by Vol::evac_range(), Vol::handle_header_read(), Vol::handle_recover_from_data(), CacheVC::handleRead(), Vol::init(), CacheDisk::open(), CacheVC::scanObject(), and TSAIORead().
void ink_aio_set_callback | ( | Continuation * | callback | ) |
Definition at line 141 of file AIO.cc.
Referenced by CacheProcessor::start_internal().
int ink_aio_start | ( | ) |
Definition at line 170 of file AIO.cc.
References ET_CALL, eventProcessor, HRTIME_MSECONDS, and EventProcessor::schedule_in().
bool ink_aio_thread_num_set | ( | int | thread_num | ) |
Definition at line 474 of file AIO.cc.
References api_config_threads_per_disk, and thread_is_created.
Referenced by TSAIOThreadNumSet().
int ink_aio_write | ( | AIOCallback * | op, | |
int | fromAPI | |||
) |
Definition at line 451 of file AIO.cc.
References AIOCallback::action, AIO_EVENT_DONE, ink_aiocb::aio_lio_opcode, aio_queue_req(), AIOCallback::aiocb, cache_op(), Action::continuation, Continuation::handleEvent(), ink_assert, this_ethread(), AIOCallback::thread, and Warning.
Referenced by Vol::aggWrite(), CacheSync::aio_write(), Vol::clear_dir(), CacheDisk::clearDisk(), Vol::handle_dir_clear(), Vol::handle_recover_from_data(), CacheDisk::sync(), and TSAIOWrite().
AIOCallback* new_AIOCallback | ( | void | ) |
Definition at line 135 of file AIO.cc.
Referenced by TSAIORead(), and TSAIOWrite().
uint64_t aio_bytes_read = 0 |
Definition at line 57 of file AIO.cc.
Referenced by aio_stats_cb(), and aio_thread_main().
uint64_t aio_bytes_written = 0 |
Definition at line 59 of file AIO.cc.
Referenced by aio_stats_cb(), and aio_thread_main().
uint64_t aio_num_read = 0 |
Definition at line 56 of file AIO.cc.
Referenced by aio_stats_cb(), and aio_thread_main().
uint64_t aio_num_write = 0 |
Definition at line 58 of file AIO.cc.
Referenced by aio_stats_cb(), and aio_thread_main().
RecRawStatBlock* aio_rsb = NULL |
Definition at line 51 of file AIO.cc.
Referenced by aio_init_fildes(), and ink_aio_thread_num_set().
Definition at line 50 of file AIO.cc.
Referenced by aio_init_fildes(), and ink_aio_init().
ink_mutex insert_mutex [static] |
Definition at line 46 of file AIO.cc.
Referenced by aio_queue_req(), and ink_aio_init().
volatile int num_filedes = 1 |
int thread_is_created = 0 |
Definition at line 48 of file AIO.cc.
Referenced by aio_init_fildes(), and ink_aio_thread_num_set().
int ts_config_with_inkdiskio = 0 |