-
Notifications
You must be signed in to change notification settings - Fork 5.7k
SERVER-13452 Added PPC64 as it works as is in little endian #653
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
Conversation
This seems fine. We can merge it after we branch for 2.6 However, unless the IBM Power architecture uses the "processor consistency" as its consistency model, there are almost certainly concurrency errors if you executed this code on a multicore PowerPC system. This is because the MongoDB code base assumes processor consistency somewhat freely, and any porting effort to other architectures will require addressing that behavior. Similarly, does the Power architecture support unaligned loads and stores? If not, the BSON library probably will bus error pretty much immediately without some work. Can you provide a good reference for the Power architecture, including instruction set, memory consistency model, alignment requirements, etc? Perhaps the architecture manuals are available online, as they are for Intel and AMD? I took a look at the 2.4.9-ppc branch from the ibmsoe/mongo repository. It looks like a correct handling of byteswapping. I'd want to chat w/ you and @acmorrow a little before embarking on the byteswapping work on master branch, to make sure we've chosen the right place to put the abstractions. |
@corentinbaron, have you signed our contributor's agreement? We will need this before we can merge your patch. http://www.mongodb.com/contributor |
@andy10gen the unit tests ran with no error on my machine. We just have yet to rebase the byteswapping on this basis. You can find the technical documentation on the power architecture on https://www.power.org/ @kangas There are discussions ongoing between you and IBM and I'm not sure I can sign this agreement on behalf of IBM (I'm even pretty sure I can't right now). |
@kangas I just had the go from IBM's legal department on this, so we can get started officially (I just signed the agreement). |
@corentinbaron, thank you for signing! I will merge as soon as we're unfrozen on master. |
You're welcome. Please let me know when you'll be able to discuss byteswapping. |
Merged to master in 388524c. Thanks! |
In summary: we don't copy hot-backup files; when we load the hot backup metadata file during WiredTiger startup, if there are entries in the metadata file without a valid checkpoint, we assume they're bulk-loaded files and re-create them with no contents. Implement Alex's idea: don't walk the metadata file in the hot-backup code looking for 'file:' objects, instead use __wt_meta_btree_apply() plus a callback instead. Clarify __wt_conn_btree_apply() and __wt_meta_btree_apply(): we talk about EBUSY errors, but all we can handle are bulk-loaded files. Rename __wt_conn_btree_apply_single() to __wt_conn_btree_apply_bulk(), and change it to only operate on bulk-loaded files. Increase the size of the metadata backup line we can handle from 512B to 5KB; this should be a dynamic value, but I'm not going to do it right now. Reference: mongodb#570, mongodb#653.
I have built and run 2.6 successfully on PowerPC64 in little endian mode. Some work will be required on big endian to rebase from our 2.4.9 (did you take look at our code in branch r2.4.9-ppc?)
Regards.