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

Build: create a proper WITH_BLUESTORE option #18357

Merged
merged 1 commit into from Oct 21, 2017

Conversation

Projects
None yet
5 participants
@asomers
Copy link
Contributor

commented Oct 17, 2017

Using Bluestore is not the same thing as having libaio, especially on
non-Linux platforms.

Signed-off-by: Alan Somers asomers@gmail.com

@wjwithagen

This comment has been minimized.

Copy link
Contributor

commented Oct 17, 2017

@asomers
Hi Alan,

There is sort of a (unspoken) convention that the WITH_* options are Cmake options that translate into
HAVE_* defines in the C{++} code.
So you might want the create a HAVE_BLUESTORE and use that in the .c/.h files.

@asomers

This comment has been minimized.

Copy link
Contributor Author

commented Oct 17, 2017

@wjwithagen I'm not sure that convention is relevant here. I count 44 WITH_* variables, but only 9 corresponding HAVE_* variables. All 9 are for stuff like whether a certain library is available (HAVE_RDMA, HAVE_LZ4, etc). Bluestore isn't an external library. It's a configurable feature, like WITH_RADOSGW or WITH_ASAN, neither of which have HAVE_* variables. So I don't think I should add a HAVE_BLUESTORE.

@wjwithagen wjwithagen requested review from tchaikov, liewegas and wjwithagen Oct 18, 2017

@wjwithagen
Copy link
Contributor

left a comment

Build: create a proper WITH_BLUESTORE option
Using Bluestore is not the same thing as having libaio, especially on
non-Linux platforms.

Signed-off-by: Alan Somers <asomers@gmail.com>

@asomers asomers force-pushed the asomers:have_libaio branch from 0222830 to 1430f36 Oct 18, 2017

@asomers

This comment has been minimized.

Copy link
Contributor Author

commented Oct 18, 2017

Rebased to resolve a conflict.

@wjwithagen

This comment has been minimized.

Copy link
Contributor

commented Oct 19, 2017

@tchaikov
Hi Kefu, could you take a look at this PR
and if needed run some of the BlueStore QA on it?
Then we can merge this one and #18202

@tchaikov

This comment has been minimized.

Copy link
Contributor

commented Oct 19, 2017

Using Bluestore is not the same thing as having libaio, especially on non-Linux platforms.

@asomers could you expand on this a little bit? does this imply that you will enable bluestore on FreeBSD where libaio is not available?

@liewegas

This comment has been minimized.

Copy link
Member

commented Oct 19, 2017

BTW longer term I think what is really needed is a portable BlockDevice implementation for *BSD that uses worker thread(s) instead of libaio. I don't think it would particularly difficult to implement (although the performance may not be the best).

@wjwithagen

This comment has been minimized.

Copy link
Contributor

commented Oct 19, 2017

@liewegas
The magic word was: "longer term" :)
I've already tested Alan's AIO code for BlueStore and it looks like it is operational.
And these are the steps leading up to getting this in.
Still have to go through all tests to reenable all the BlueStore tests I disabled.

I don't have BlockDev usage clear, perhaps Alan has. So could very well be beneficial to put that on the ToDo list.

@asomers

This comment has been minimized.

Copy link
Contributor Author

commented Oct 19, 2017

@tchaikov I have indeed enabled Bluestore on FreeBSD. If you're really curious, you can see my branch here: https://github.com/asomers/ceph/tree/bluestore_fbsd . The key thing to remember is that there are basically two different AIO interfaces in the Unix world. POSIX AIO is the standard, implemented by almost all OSes. Libaio is nonstandard and is implemented only on Linux. Linux's implementation of POSIX AIO sucks, so Linux programmers tend to forget that it exists and they go straight to libaio. That's why FreeBSD can implement Bluestore despite not having Libaio.

OTOH, it should also be possible to build Ceph without Bluestore on a system that happens to have libaio installed. That's a second reason for this PR.

P.S. The biggest problem with POSIX AIO is that the standard doesn't specify a high-performance way to get completion notification. The POSIX people considered that to be beyond their remit. Most of the BSDs do it with kqueue(2), but that is nonstandard. I think this deficiency is part of the reason why the Linux folks wrote their own AIO interface.

@tchaikov tchaikov merged commit 4ec719b into ceph:master Oct 21, 2017

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@tchaikov tchaikov referenced this pull request Dec 17, 2018

Closed

bluestore: Allow bluestore to build and test on FreeBSD. #25576

0 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.