Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BoundThreadFactory which creates threads that are bound to a cpu core #67

Closed
wants to merge 3 commits into from

Conversation

sanjosh
Copy link

@sanjosh sanjosh commented Sep 23, 2016

Added BoundThreadFactory which binds each new thread to a specified CPU core. This is useful for NUMA processing

Added test to verify that the threads created by this factory get bound to specified core

Please let me know if there is a portable way in folly or wangle to set thread affinity. Right now, I am using pthread_setaffinity_np()

CPU core

Added test to verify thread gets bound to core
Conflicts:
	wangle/concurrent/BoundThreadFactory.h
	wangle/concurrent/test/ThreadPoolExecutorTest.cpp
@djwatson
Copy link

djwatson commented Jan 6, 2017

We've tried a similar threadpool internally and haven't had great results (although I think one exists in the fbthrift repo), so I'm hesitant to merge because we don't use this internally. If it works for you, great though.

(Maybe we should start a contrib directory instead?)

@djwatson djwatson closed this Jan 6, 2017
facebook-github-bot pushed a commit that referenced this pull request Oct 16, 2020
…ps.py build (#67)

Summary:
Pull Request resolved: facebook/sapling#67

With this change it will be possible to build dependencies of and run integration tests using getdeps.py.

This is the first goal of Q4 as per https://fb.quip.com/v8YzAYNSYgot: "Get Open Source version of integration tests running on Legocastle".

Before this diff:
The OSS integration tests run now on GitHub by:
- Building some test dependencies with getdeps.py
- Building some test dependencies with homebrew/apt-get
- Running tests via python script

The OSS integration tests were not running on Sandcastle.

After this diff:
The OSS integration tests run on Github by:
- Building and executing tests via getdeps.py (execution of tests happens by getdeps.py calling Make calling python script)

The OSS integration tests run on Sandcastle using the same getdeps.py setup as Github.

Reviewed By: krallin

Differential Revision: D24253268

fbshipit-source-id: cae249b72d076222673b8bbe4ec21866dcdbb253
facebook-github-bot pushed a commit that referenced this pull request Mar 3, 2022
Summary:
X-link: facebookincubator/hsthrift#67

Updating `googletest` from `1.8.0` to `1.10.0`

Reviewed By: mzlee, igorsugak, luciang, meyering, r-barnes

Differential Revision: D34351084

fbshipit-source-id: 939b3985ab63a06b6d511ec8711c2d5863bdfea8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants