__decl_hathreads(HA_SPINLOCK_T lock);
unsigned long thread_mask; /* mask of thread IDs authorized to process the task */
unsigned long update_mask; /* mask of thread IDs having an update for fd */
- struct fdlist_entry cache; /* Entry in the fdcache */
struct fdlist_entry update; /* Entry in the global update list */
void (*iocb)(int fd); /* I/O handler */
void *owner; /* the connection or listener associated with this fd, NULL if closed */
unsigned char ev; /* event seen in return of poll() : FD_POLL_* */
unsigned char linger_risk:1; /* 1 if we must kill lingering before closing */
unsigned char cloned:1; /* 1 if a cloned socket, requires EPOLL_CTL_DEL on close */
-};
+}
+#ifdef USE_THREAD
+/* only align on cache lines when using threads; 32-bit small archs
+ * can put everything in 32-bytes when threads are disabled.
+ */
+__attribute__((aligned(64)))
+#endif
+;
/* less often used information */
struct fdinfo {
for (p = 0; p < global.maxsock; p++) {
HA_SPIN_INIT(&fdtab[p].lock);
/* Mark the fd as out of the fd cache */
- fdtab[p].cache.next = -3;
fdtab[p].update.next = -3;
}
obj_base_ptr(conn->target));
chunk_appendf(&trash,
- " flags=0x%08x fd=%d fd.state=%02x fd.cache=%d updt=%d fd.tmask=0x%lx\n",
+ " flags=0x%08x fd=%d fd.state=%02x updt=%d fd.tmask=0x%lx\n",
conn->flags,
conn->handle.fd,
conn->handle.fd >= 0 ? fdtab[conn->handle.fd].state : 0,
- conn->handle.fd >= 0 ? fdtab[conn->handle.fd].cache.next >= -2 : 0,
conn->handle.fd >= 0 ? !!(fdtab[conn->handle.fd].update_mask & tid_bit) : 0,
conn->handle.fd >= 0 ? fdtab[conn->handle.fd].thread_mask: 0);
obj_base_ptr(conn->target));
chunk_appendf(&trash,
- " flags=0x%08x fd=%d fd.state=%02x fd.cache=%d updt=%d fd.tmask=0x%lx\n",
+ " flags=0x%08x fd=%d fd.state=%02x updt=%d fd.tmask=0x%lx\n",
conn->flags,
conn->handle.fd,
conn->handle.fd >= 0 ? fdtab[conn->handle.fd].state : 0,
- conn->handle.fd >= 0 ? fdtab[conn->handle.fd].cache.next >= -2 : 0,
conn->handle.fd >= 0 ? !!(fdtab[conn->handle.fd].update_mask & tid_bit) : 0,
conn->handle.fd >= 0 ? fdtab[conn->handle.fd].thread_mask: 0);