#include "squid.h"
#include "anyp/PortCfg.h"
#include "comm/Connection.h"
#include "comm/Loops.h"
#include "fde.h"
#include "globals.h"
#include "ICP.h"
#include "mgr/Registration.h"
#include "SquidConfig.h"
#include "StatCounters.h"
#include "StatHist.h"
#include "Store.h"
#include <cerrno>
Go to the source code of this file.
Macros | |
#define | howmany(x, y) (((x)+((y)-1))/(y)) |
#define | NBBY 8 |
#define | FD_MASK_BYTES sizeof(fd_mask) |
#define | FD_MASK_BITS (FD_MASK_BYTES*NBBY) |
#define | MAX_INCOMING_INTEGER 256 |
#define | INCOMING_FACTOR 5 |
#define | MAX_INCOMING_INTERVAL (MAX_INCOMING_INTEGER << INCOMING_FACTOR) |
#define | commCheckUdpIncoming (++udp_io_events > (incoming_udp_interval>> INCOMING_FACTOR)) |
#define | commCheckDnsIncoming (++dns_io_events > (incoming_dns_interval>> INCOMING_FACTOR)) |
#define | commCheckTcpIncoming (++tcp_io_events > (incoming_tcp_interval>> INCOMING_FACTOR)) |
Functions | |
static int | examine_select (fd_set *, fd_set *) |
static int | fdIsTcpListener (int fd) |
static int | fdIsUdpListener (int fd) |
static int | fdIsDns (int fd) |
static int | comm_check_incoming_select_handlers (int nfds, int *fds) |
static void | comm_select_dns_incoming (void) |
static void | commUpdateReadBits (int fd, PF *handler) |
static void | commUpdateWriteBits (int fd, PF *handler) |
static void | comm_select_udp_incoming (void) |
static void | comm_select_tcp_incoming (void) |
static void | commIncomingStats (StoreEntry *sentry) |
Variables | |
static int | MAX_POLL_TIME = 1000 |
static OBJH | commIncomingStats |
static struct timeval | zero_tv |
static fd_set | global_readfds |
static fd_set | global_writefds |
static int | nreadfds |
static int | nwritefds |
static int | udp_io_events = 0 |
static int | dns_io_events = 0 |
static int | tcp_io_events = 0 |
static int | incoming_udp_interval = 16 << INCOMING_FACTOR |
static int | incoming_dns_interval = 16 << INCOMING_FACTOR |
static int | incoming_tcp_interval = 16 << INCOMING_FACTOR |
Macro Definition Documentation
◆ commCheckDnsIncoming
#define commCheckDnsIncoming (++dns_io_events > (incoming_dns_interval>> INCOMING_FACTOR)) |
Definition at line 118 of file ModSelect.cc.
◆ commCheckTcpIncoming
#define commCheckTcpIncoming (++tcp_io_events > (incoming_tcp_interval>> INCOMING_FACTOR)) |
Definition at line 119 of file ModSelect.cc.
◆ commCheckUdpIncoming
#define commCheckUdpIncoming (++udp_io_events > (incoming_udp_interval>> INCOMING_FACTOR)) |
Definition at line 117 of file ModSelect.cc.
◆ FD_MASK_BITS
#define FD_MASK_BITS (FD_MASK_BYTES*NBBY) |
Definition at line 41 of file ModSelect.cc.
◆ FD_MASK_BYTES
#define FD_MASK_BYTES sizeof(fd_mask) |
Definition at line 40 of file ModSelect.cc.
◆ howmany
#define howmany | ( | x, | |
y | |||
) | (((x)+((y)-1))/(y)) |
Definition at line 35 of file ModSelect.cc.
◆ INCOMING_FACTOR
#define INCOMING_FACTOR 5 |
Definition at line 109 of file ModSelect.cc.
◆ MAX_INCOMING_INTEGER
#define MAX_INCOMING_INTEGER 256 |
Definition at line 108 of file ModSelect.cc.
◆ MAX_INCOMING_INTERVAL
#define MAX_INCOMING_INTERVAL (MAX_INCOMING_INTEGER << INCOMING_FACTOR) |
Definition at line 110 of file ModSelect.cc.
◆ NBBY
#define NBBY 8 |
Definition at line 38 of file ModSelect.cc.
Function Documentation
◆ comm_check_incoming_select_handlers()
Definition at line 183 of file ModSelect.cc.
References commUpdateReadBits(), commUpdateWriteBits(), DBG_IMPORTANT, debugs, fd_table, getCurrentTime(), incoming_sockets_accepted, StatCounters::selects, statCounter, StatCounters::syscalls, and zero_tv.
Referenced by comm_select_dns_incoming(), comm_select_tcp_incoming(), and comm_select_udp_incoming().
◆ comm_select_dns_incoming()
|
static |
Definition at line 577 of file ModSelect.cc.
References SquidConfig::average, comm_check_incoming_select_handlers(), StatCounters::comm_dns_incoming, SquidConfig::comm_incoming, Config, StatHist::count(), SquidConfig::dns, dns_io_events, DnsSocketA, DnsSocketB, incoming_dns_interval, INCOMING_DNS_MAX, MAX_INCOMING_INTERVAL, SquidConfig::min_poll, and statCounter.
◆ comm_select_tcp_incoming()
|
static |
Definition at line 288 of file ModSelect.cc.
References SquidConfig::average, comm_check_incoming_select_handlers(), SquidConfig::comm_incoming, StatCounters::comm_tcp_incoming, Config, StatHist::count(), HttpPortList, incoming_tcp_interval, INCOMING_TCP_MAX, Comm::IsConnOpen(), MAX_INCOMING_INTERVAL, MAXTCPLISTENPORTS, statCounter, SquidConfig::tcp, and tcp_io_events.
◆ comm_select_udp_incoming()
|
static |
Definition at line 251 of file ModSelect.cc.
References SquidConfig::average, comm_check_incoming_select_handlers(), SquidConfig::comm_incoming, StatCounters::comm_udp_incoming, Config, StatHist::count(), Comm::Connection::fd, icpIncomingConn, icpOutgoingConn, incoming_udp_interval, INCOMING_UDP_MAX, Comm::IsConnOpen(), MAX_INCOMING_INTERVAL, statCounter, SquidConfig::udp, and udp_io_events.
◆ commIncomingStats()
|
static |
Definition at line 703 of file ModSelect.cc.
References StatCounters::comm_dns_incoming, StatCounters::comm_tcp_incoming, StatCounters::comm_udp_incoming, StatHist::dump(), incoming_dns_interval, INCOMING_FACTOR, incoming_tcp_interval, incoming_udp_interval, statCounter, statHistIntDumper, and storeAppendPrintf().
◆ commUpdateReadBits()
Definition at line 722 of file ModSelect.cc.
References global_readfds, handler(), and nreadfds.
Referenced by comm_check_incoming_select_handlers().
◆ commUpdateWriteBits()
Definition at line 734 of file ModSelect.cc.
References global_writefds, handler(), and nwritefds.
Referenced by comm_check_incoming_select_handlers().
◆ examine_select()
|
static |
Definition at line 641 of file ModSelect.cc.
References commCallCloseHandlers(), DBG_CRITICAL, debugs, F(), fd_table, fdTypeStr, sb, ScheduleCallHere, StatCounters::selects, Squid_MaxFD, statCounter, StatCounters::syscalls, and xstrerr().
◆ fdIsDns()
Definition at line 160 of file ModSelect.cc.
References DnsSocketA, and DnsSocketB.
◆ fdIsTcpListener()
Definition at line 172 of file ModSelect.cc.
References HttpPortList.
◆ fdIsUdpListener()
Definition at line 148 of file ModSelect.cc.
References Comm::Connection::fd, icpIncomingConn, and icpOutgoingConn.
Variable Documentation
◆ commIncomingStats
|
static |
Definition at line 48 of file ModSelect.cc.
◆ dns_io_events
|
static |
Definition at line 112 of file ModSelect.cc.
Referenced by comm_select_dns_incoming().
◆ global_readfds
|
static |
Definition at line 55 of file ModSelect.cc.
Referenced by commUpdateReadBits().
◆ global_writefds
|
static |
Definition at line 56 of file ModSelect.cc.
Referenced by commUpdateWriteBits().
◆ incoming_dns_interval
|
static |
Definition at line 115 of file ModSelect.cc.
Referenced by comm_select_dns_incoming(), and commIncomingStats().
◆ incoming_tcp_interval
|
static |
Definition at line 116 of file ModSelect.cc.
Referenced by comm_select_tcp_incoming(), and commIncomingStats().
◆ incoming_udp_interval
|
static |
Definition at line 114 of file ModSelect.cc.
Referenced by comm_select_udp_incoming(), and commIncomingStats().
◆ MAX_POLL_TIME
|
static |
Definition at line 32 of file ModSelect.cc.
◆ nreadfds
|
static |
Definition at line 57 of file ModSelect.cc.
Referenced by commUpdateReadBits().
◆ nwritefds
|
static |
Definition at line 58 of file ModSelect.cc.
Referenced by commUpdateWriteBits().
◆ tcp_io_events
|
static |
Definition at line 113 of file ModSelect.cc.
Referenced by comm_select_tcp_incoming().
◆ udp_io_events
|
static |
Definition at line 111 of file ModSelect.cc.
Referenced by comm_select_udp_incoming().
◆ zero_tv
|
static |
Definition at line 54 of file ModSelect.cc.
Referenced by comm_check_incoming_select_handlers().