ModPoll.cc File Reference
#include "squid.h"
#include "anyp/PortCfg.h"
#include "comm/Connection.h"
#include "comm/Loops.h"
#include "fd.h"
#include "fde.h"
#include "globals.h"
#include "ICP.h"
#include "mgr/Registration.h"
#include "profiler/Profiler.h"
#include "SquidConfig.h"
#include "SquidTime.h"
#include "StatCounters.h"
#include "Store.h"
#include <cerrno>
Include dependency graph for ModPoll.cc:

Go to the source code of this file.

Macros

#define POLLRDNORM   POLLIN
 
#define POLLWRNORM   POLLOUT
 
#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 fdIsTcpListen (int fd)
 
static int fdIsUdpListen (int fd)
 
static int fdIsDns (int fd)
 
static int comm_check_incoming_poll_handlers (int nfds, int *fds)
 
static void comm_poll_dns_incoming (void)
 
static void comm_poll_udp_incoming (void)
 
static void comm_poll_tcp_incoming (void)
 
static void commPollRegisterWithCacheManager (void)
 
static void commIncomingStats (StoreEntry *sentry)
 

Variables

static int MAX_POLL_TIME = 1000
 
static OBJH commIncomingStats
 
static int udp_io_events = 0
 I/O events passed since last UDP receiver socket poll. More...
 
static int dns_io_events = 0
 I/O events passed since last DNS socket poll. More...
 
static int tcp_io_events = 0
 I/O events passed since last TCP listening socket poll. More...
 
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

#define commCheckDnsIncoming   (++dns_io_events > (incoming_dns_interval>> INCOMING_FACTOR))

Definition at line 120 of file ModPoll.cc.

#define commCheckTcpIncoming   (++tcp_io_events > (incoming_tcp_interval>> INCOMING_FACTOR))

Definition at line 121 of file ModPoll.cc.

#define commCheckUdpIncoming   (++udp_io_events > (incoming_udp_interval>> INCOMING_FACTOR))

Definition at line 119 of file ModPoll.cc.

#define FD_MASK_BITS   (FD_MASK_BYTES*NBBY)

Definition at line 52 of file ModPoll.cc.

#define FD_MASK_BYTES   sizeof(fd_mask)

Definition at line 51 of file ModPoll.cc.

#define howmany (   x,
 
)    (((x)+((y)-1))/(y))

Definition at line 46 of file ModPoll.cc.

#define INCOMING_FACTOR   5

Definition at line 111 of file ModPoll.cc.

Referenced by commIncomingStats().

#define MAX_INCOMING_INTEGER   256

Definition at line 110 of file ModPoll.cc.

#define MAX_INCOMING_INTERVAL   (MAX_INCOMING_INTEGER << INCOMING_FACTOR)
#define NBBY   8

Definition at line 49 of file ModPoll.cc.

#define POLLRDNORM   POLLIN

Definition at line 36 of file ModPoll.cc.

Referenced by comm_check_incoming_poll_handlers().

#define POLLWRNORM   POLLOUT

Definition at line 39 of file ModPoll.cc.

Referenced by comm_check_incoming_poll_handlers().

Function Documentation

static void commPollRegisterWithCacheManager ( void  )
static

Definition at line 613 of file ModPoll.cc.

References commIncomingStats, and Mgr::RegisterAction().

static int fdIsDns ( int  fd)
static

Definition at line 165 of file ModPoll.cc.

References DnsSocketA, and DnsSocketB.

static int fdIsTcpListen ( int  fd)
static

Definition at line 177 of file ModPoll.cc.

References HttpPortList, and NULL.

static int fdIsUdpListen ( int  fd)
static

Definition at line 153 of file ModPoll.cc.

References Comm::Connection::fd, icpIncomingConn, icpOutgoingConn, and NULL.

Variable Documentation

OBJH commIncomingStats
static

Definition at line 58 of file ModPoll.cc.

Referenced by commPollRegisterWithCacheManager().

int dns_io_events = 0
static

Definition at line 114 of file ModPoll.cc.

Referenced by comm_poll_dns_incoming().

int incoming_dns_interval = 16 << INCOMING_FACTOR
static

Definition at line 117 of file ModPoll.cc.

Referenced by comm_poll_dns_incoming(), and commIncomingStats().

int incoming_tcp_interval = 16 << INCOMING_FACTOR
static

Definition at line 118 of file ModPoll.cc.

Referenced by comm_poll_tcp_incoming(), and commIncomingStats().

int incoming_udp_interval = 16 << INCOMING_FACTOR
static

Definition at line 116 of file ModPoll.cc.

Referenced by comm_poll_udp_incoming(), and commIncomingStats().

int MAX_POLL_TIME = 1000
static

Definition at line 43 of file ModPoll.cc.

int tcp_io_events = 0
static

Definition at line 115 of file ModPoll.cc.

Referenced by comm_poll_tcp_incoming().

int udp_io_events = 0
static

Definition at line 113 of file ModPoll.cc.

Referenced by comm_poll_udp_incoming().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors