uint32_t pending_polls; /* state */
struct netmsg_base poll_netmsg;
+ struct netmsg_base poll_more_netmsg;
int poll_cpuid;
int pollhz;
uint32_t poll_each_burst; /* tunable */
union ifpoll_time poll_start_t; /* state */
- uint32_t poll_handlers; /* next free entry in pr[]. */
- struct iopoll_rec pr[IFPOLL_LIST_LEN];
-
- struct netmsg_base poll_more_netmsg;
-
uint32_t poll_burst; /* state */
uint32_t poll_burst_max; /* tunable */
uint32_t user_frac; /* tunable */
uint32_t kern_frac; /* state */
+ uint32_t poll_handlers; /* next free entry in pr[]. */
+ struct iopoll_rec pr[IFPOLL_LIST_LEN];
+
struct sysctl_ctx_list poll_sysctl_ctx;
struct sysctl_oid *poll_sysctl_tree;
} __cachealign;
static __inline void
ifpoll_time_get(union ifpoll_time *t)
{
- if (tsc_present)
+ if (__predict_true(tsc_present))
t->tsc = rdtsc();
else
microuptime(&t->tv);
static __inline int
ifpoll_time_diff(const union ifpoll_time *s, const union ifpoll_time *e)
{
- if (tsc_present) {
+ if (__predict_true(tsc_present)) {
return (((e->tsc - s->tsc) * 1000000) / tsc_frequency);
} else {
return ((e->tv.tv_usec - s->tv.tv_usec) +