Closed wtao0221 closed 6 years ago
@wtao0221:
No. Each mTCP context creates its own set of socket descriptors (0 to max_fds) which are non-unique across cores/threads. Passing socket descriptors from one thread context to another will lead to logical bugs, We decided to design our stack in this way to ensure that each thread context follows a run-to-completion model.
@ajamshed
Thanks for the explanation.
Hi, @ajamshed
I have one question about the design choice of mTCP.
Why does mTCP exactly use one physical queue pair (i.e., 1 Tx queue and 1 Rx queue) per core? Does multiple queue pairs benefit in terms of performance?
@wtao0221 ,
I have not really done any performance testing when multiple queues are assigned to 1 CPU. I am not sure what kind of performance gains we will get out of this design. Do you see a potential benefit? Please let me know if there is.
Hi,
In mTCP, suppose that I have created some sockets in the context of Thread 0, can I use
mtcp_epoll_ctl
to change the registered events of these sockets (created in Thread 0) in the context of Thread 1?