]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/thread: pin thread pool to given CPU 22776/head
authorKefu Chai <kchai@redhat.com>
Fri, 29 Jun 2018 17:33:44 +0000 (01:33 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 29 Jun 2018 17:33:55 +0000 (01:33 +0800)
commit460ad1f8a1e14c3fc10c31111e7c517bf830b886
tree6d1a62735f621a65d51c4ca3fc7d4e83fb924d16
parentfade1ef0494202142cc5ab83aab55871a78f13df
crimson/thread: pin thread pool to given CPU

to take the full advantage of seastar reactor, we need to confine the
alien threads to given CPU core(s). in current setting, it's assumed
that alien threads do not perform CPU-bound tasks, so a single core
would suffice. we can always change the interface to pass a cpu_set_t
or a std::bitset if one CPU core is not enough.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/thread/ThreadPool.cc
src/crimson/thread/ThreadPool.h
src/test/crimson/test_thread_pool.cc