Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

fixing the config flags for openbsd and bitrig #13

Closed
wants to merge 1 commit into from
Closed

fixing the config flags for openbsd and bitrig #13

wants to merge 1 commit into from

Conversation

dhuseby
Copy link

@dhuseby dhuseby commented Mar 31, 2015

This fixes the configure flags for OpenBSD and Bitrig. This PR puts the change into the dev branch.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see CONTRIBUTING.md for more information.

@alexcrichton
Copy link
Member

Ah we don't actually use our dev branch (we just inherited it from the fork), so we shouldn't need this!

@dhuseby
Copy link
Author

dhuseby commented Mar 31, 2015

@alexcrichton so should I patch the master branch to make sure it gets included in any future jemalloc snapshots?

@alexcrichton
Copy link
Member

So long as it's in upstream jemalloc we should pick it up from now on

@dhuseby
Copy link
Author

dhuseby commented Apr 1, 2015

@alexcrichton but the upstream jemalloc change doesn't work in our fork. Our fork has broken config scripts that don't correctly set the force_tls flag AFAICT.

@alexcrichton
Copy link
Member

Sorry but I don't really understand, we don't really maintain a fork, it's just a point in jemalloc's history where we checked in the configure script. We can update the branch at any time, we just need to check in the configure script. What do you mean that we have a broken configure script? Is this not just because we haven't updated to master in awhile?

@dhuseby
Copy link
Author

dhuseby commented Apr 1, 2015

@alexcrichton Let me double check the jemalloc patch again. I think I don't need the force_tls = 0 in the main jemalloc patch. The sbrk_deprecated=1 seems to do the trick.

@semarie
Copy link

semarie commented Apr 2, 2015

@alexcrichton at some point (near january 25 2015 I think), the configure script of jemalloc/jemalloc didn't needed force_tls=0 for OpenBSD, whereas it was badly detected for rust-lang/jemalloc (TLS=1 was detected). It is mentionned in jemalloc#188, when I request OpenBSD integration in jemalloc.

Now, as @dhuseby has/will do I think, if I recheck the current status (running ./configure and check how TLS is auto-detected under OpenBSD) it seems to be correctly detected with rust-lang/jemalloc. I don't known if it is a change in OpenBSD or in jemalloc.

@dhuseby sorry if I have induced you in error : I don't have rechecked before now.

@dhuseby
Copy link
Author

dhuseby commented Apr 2, 2015

@semarie thanks, I'm trying to sort this out. It seems like when I build rust with force_tls=0, I still get sbrk issues. I tried to disable jemalloc by adding this: https://github.com/rust-lang/rust/blob/master/configure#L778 But that doesn't seem to be the right way to disable jemalloc.

I'm currently in the process of doing a bunch a builds to find what makes the sbrk errors go away. But IIRC, if I configure rust with --disable-jemalloc, the sbrk errors go away. But since I have to do full builds from source, it will take me a couple of days to work out the details.

I'll report on progress here.

@dhuseby
Copy link
Author

dhuseby commented Apr 3, 2015

@semarie I figured out how to correctly disable the use of jemalloc on Bitrig. I built the latest master with it disabled and ran a bunch of tests on it. It seems to be stable (e.g. make check passes) as do all of my test programs. I'm going to just disable jemalloc for now. Here's the PR for disabling it: rust-lang/rust#23990

@semarie
Copy link

semarie commented Apr 6, 2015

@dhuseby I have an explaination about the confusion if TLS is correctly autodetected or not: with the base gcc (4.2.1), the autodetection found TLS=0, whereas with gcc from ports (4.8.4) the autodetection found TLS=1, and it failed at some points...

for reference: jemalloc#223

@dhuseby
Copy link
Author

dhuseby commented Apr 6, 2015

@semarie interesting. well, I just landed a patch in rust to disable jemalloc on Bitrig until I can sort things out. Right now I'm focusing on getting the unit tests to pass so that my buildbot can produce the snapshots automagically instead of me doing it by hand.

alexcrichton pushed a commit that referenced this pull request Sep 2, 2015
Extract szad size quantization into {extent,run}_quantize(), and .
quantize szad run sizes to the union of valid small region run sizes and
large run sizes.

Refactor iteration in arena_run_first_fit() to use
run_quantize{,_first,_next(), and add support for padded large runs.

For large allocations that have no specified alignment constraints,
compute a pseudo-random offset from the beginning of the first backing
page that is a multiple of the cache line size.  Under typical
configurations with 4-KiB pages and 64-byte cache lines this results in
a uniform distribution among 64 page boundary offsets.

Add the --disable-cache-oblivious option, primarily intended for
performance testing.

This resolves #13.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants