Age | Commit message (Collapse) | Author | Files | Lines |
|
socket
Otherwise we would not notice a broken connection.
metze
|
|
I some cases the pointer value of tevent_context is the same again,
if we do something like:
ev1 = tevent_context_init();
...
fde = tevent_add_fd(ev1, fd, TEVENT_FD_READ...);
...
talloc_free(ev1);
...
ev2 = tevent_context_init();
if (ev1 == ev2) {
/* this can happen! */
}
if (tevent_fd_get_flags(fde) == 0) {
/* this is always true */
}
But the "talloc_free(ev1)" will set fde->event_ctx to NULL
and tevent_fd_get_flags() will always return 0.
metze
|
|
metze
|
|
tevent_add_fd does not properly set that. At least in epoll and select this is
the only error condition.
Metze, please check!
|
|
Remove two indentation levels by returning early on error.
Metze, please check!
|
|
metze
|
|
metze
|
|
all backends
We need to make sure that we free the sendto and recvfrom requests before
the tdgram_context
metze
|
|
sizeof(struct sockaddr_storage) generates EINVAL.
metze
|
|
It will be replaced by tdgram_context and tstream_context.
metze
|
|
metze
|
|
metze
|
|
metze
|
|
metze
|
|
The desire is to do as less syscalls during the
tdgram_sendto_send/recv() and tdgram_recvfrom_send/recv()
operations.
1. we first try the sendto()/recvfrom() syscall and
only use a fd event if we got EAGAIN.
2. we cache the fd event and only change it's flags
if really needed.
For the highload case we do almost no epoll_ctl() and epoll_wait()/select()
syscalls anymore. This speeds up the LDAP-BENCH-CLDAP test
by more than 20%. (With a modified version of this test
which let the server skip any ldb calls and just return success
I'm getting about 8000 requests per second, while I'm getting
just about 6000 requests per second without optimization)
metze
|
|
The idea is to have a tdgram and a tstream abstraction
which only provide tevent_req based io functions.
metze
|
|
metze
|
|
metze
|
|
It seems that 'sun' is somewhere defined and we can
use it as name for variables or struct/union members.
metze
|
|
metze
|