Skip to content

Do Not Assume Any Particular Values for Queue Descriptors #4

Description

@ppenna

Description

We currently rely on a hack to decide whether we should call accept() or pop() in a given queue descriptor:

redis/src/ae_demikernel.c

Lines 105 to 109 in 19f0d8a

/* BIG HACK: we always use the first queue descriptor for
listening, so we know to call accept instead of pop */
if (fd == 0)
ret = dmtr_accept(&qt, fd);
else ret = dmtr_pop(&qt, fd);

We cannot make any assumptions about the values of a queue descriptor.

Quoting @iyzhang :

I think the correct fix would be to change Redis to pass into the function whether the socket is for listening or connecting. The issue is that there is just a single function/function pointer to register all sockets because epoll doesn't differentiate between listening sockets and receiving sockets. However, we need to issue the first operation on the socket to get the queue token (vs epoll which just takes a registration for a generic read event).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething Isn't WorkingconfirmedIssue Affects Multiple People

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions