]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/net: implement FixedCPUServerSocket
authorYingxin Cheng <yingxin.cheng@intel.com>
Sun, 19 Jan 2020 06:53:24 +0000 (14:53 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Wed, 12 Feb 2020 02:46:34 +0000 (10:46 +0800)
commitd12c84a971f3b86b79562679cdbe80058a593235
tree0b86c22792fdbc8477d1b96ce80d37520348b682
parent7ac858ca09c4eb35bfcf050a59bd765483ab4675
crimson/net: implement FixedCPUServerSocket

Adopt the policy load_balancing_algorithm::fixed to instruct seastar
(posix-stack) to allocate connected sockets on the designated core, so
we are not able to move them later in our application, which is not
supported by seastar and result in undefined behaviors.

Seastar requires server_socket to accept/listen on all available cores.
We encapsulate the related implementations in the new
FixedCPUServerSocket, so we can have a simpler shard-local crimson
messenger.

Even though FixedCPUServerSocket is a sharded service, only the service
located on the shard where the socket is originally created will be
serving incoming connections. it's not allowed to perform i/o with that
connected socket on other cores.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/net/Socket.h